logextra("Deleting requests older than 1 hour".$result_delete_old);
# Remove stale requests from this IP Address after 15 minutes.
# This should be enough to deter attackers while been short enough to allow real hosts to request a show.
$query_delete="DELETE FROM reservations WHERE reservations.ip = '$ip' AND reservations.timestamp + INTERVAL 15 MINUTE <= UTC_TIMESTAMP() AND reservations.status = 'REQUEST_UNVERIFIED'";
$query=mysqli_query($connection,"SELECT COUNT(*) as count_reserve_queue FROM reservations WHERE status = 'RESERVE_SHOW_SUBMITTED' AND ip = '127.0.0.1';");
$response_array=mysqli_fetch_row($query);
$count_reserve_queue=$response_array[0];
print"<!-- count_reserve_queue is $count_reserve_queue -->\n";
// --------------------------------------------
// Get the number of shows in the reserve queue yet to be processed.
$query=mysqli_query($connection,"SELECT COUNT(*) as count_reserve_queue_unprocessed FROM reservations WHERE status = 'RESERVE_SHOW_SUBMITTED' AND ip != '127.0.0.1';");
$ep_retrieve="SELECT hosts.host, eps.id, eps.title, eps.date FROM eps, hosts WHERE eps.valid=1 AND eps.hostid = hosts.hostid AND eps.date >= '$current_episode_date' ORDER BY date DESC";
Thereareonly<strong><?phpecho"${days_to_wait}";?></strong> days to wait until next free slot. Please consider <a aria-label="Help on Recording a podcast" href="<?php echo "${baseurl}about.html#recording_a_podcast"; ?>">recording</a> a show for us.
</p>
<ol>
<li>Reviewtheupdated<em><aaria-label="Learn the Stuff you need to know"href="<?php echo "${baseurl}about.html#agreement"; ?>">Stuff you need to know</a></em> page.</li>
<li>Selectadate,orposttothereservequeue.</li>
<li>Clickthelinkintheconfirmationemail</li>
<li>Then<aaria-label="Help on Adding an episode"href="<?php echo "${baseurl}about.html#adding_an_episode"; ?>">fill in a form</a>.</li>
<aaria-label="Post to the reserve queue"href="<?php echo "${hubBaseurl}"; ?>request.php?id=9999">Postyourshowtothe<strong>reservequeue</strong></a>ifyoudon'tcarewhenitwillbereleased.<small><aaria-label="Help on the reserve queue"href="<?php echo "${baseurl}about.html#reserve_queue"; ?>">ⓘ</a></small>
<strong>Schedule</strong>therelease</a>dayyourshowwillbeaired.<small><aaria-label="Help on the scheduling guidelines"href="<?php echo "${baseurl}about.html#scheduling_guidelines"; ?>">ⓘ</a></small>
</p>
<h3>NextTwoMonths<small><aaria-label="Help on the HPR processing workflow"href="<?php echo "${baseurl}about.html#workflow"; ?>">ⓘ</a></small></h3>
echo"<span style=\"font-family:monospace;\">".date('D Y-m-d',strtotime($show_array[$slot]["date"])).": <a aria-label=\"Go directly to the show hpr${slot}\" href=\"${baseurl}eps/hpr${slot}/index.html\">hpr${slot}</a></span> <strong>".$show_array[$slot]["title"]."</strong> by <em>".$show_array[$slot]["host"]."</em><br />\n";
echo"<span style=\"font-family:monospace;\">${this_episode_date}: <a aria-label=\"Upload to the slot hpr${slot}\" href=\"${hubBaseurl}/request.php?id=${slot}\">hpr${slot}</span> is available - upload now</a>.<br />\n";
echo"<span style=\"font-family:monospace;\">".date('D Y-m-d',strtotime($show_array[$slot]["date"])).": <a aria-label=\"Go directly to the show hpr${slot}\" href=\"${baseurl}eps/hpr${slot}/index.html\">hpr${slot}</a></span> <strong>".$show_array[$slot]["title"]."</strong> by <em>".$show_array[$slot]["host"]."</em><br />\n";
Ifyouwishtopickanavailableslotinthenext12monthsthengodirectlytothe<aaria-label="Go to the request page"href="<?php echo "${hubBaseurl}"; ?>request.php">requestpage</a>.
TheHPRstatisticsareregeneratedevery15minutesandareavailablein<aaria-label="Go to the stats json page"href="<?php echo "${hubBaseurl}"; ?>stats.json">jsonformat</a>.Notetheformatisliabletochangewithoutnotice.</p>