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";
The HPR Schedule is entirely community driven and we recommend that <strong>you</strong> decide when your show will be released.
</p>
<p>
There are only <strong><?php echo "${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>Review the updated <em><a aria-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>Select a date, or post to the reserve queue.</li>
<li>Click the link in the confirmation email</li>
<li>Then <a aria-label="Help on Adding an episode" href="<?php echo "${baseurl}about.html#adding_an_episode"; ?>">fill in a form</a>.</li>
</ol>
<h2 id="reserve_queue">Add to the Reserve Queue ?</h2>
<p>
<a aria-label="Post to the reserve queue" href="<?php echo "${hubBaseurl}"; ?>request.php?id=9999">Post your show to the <strong>reserve queue</strong></a> if you don't care when it will be released. <small><a aria-label="Help on the reserve queue" href="<?php echo "${baseurl}about.html#reserve_queue"; ?>">ⓘ</a></small>
</p>
<h2 id="current_schedule">Select a date in the current schedule ?</h2>
<p>
<strong>Schedule</strong> the release</a> day your show will be aired. <small><a aria-label="Help on the scheduling guidelines" href="<?php echo "${baseurl}about.html#scheduling_guidelines"; ?>">ⓘ</a></small>
</p>
<h3>Next Two Months <small><a aria-label="Help on the HPR processing workflow" href="<?php echo "${baseurl}about.html#workflow"; ?>">ⓘ</a></small></h3>
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";
If you wish to pick an available slot in the next 12 months then go directly to the <a aria-label="Go to the request page" href="<?php echo "${hubBaseurl}"; ?>request.php">request page</a>.
The HPR statistics are regenerated every 15 minutes and are available in <a aria-label="Go to the stats json page" href="<?php echo "${hubBaseurl}"; ?>stats.json">json format</a>. Note the format is liable to change without notice.</p>