From 236cd08e6f867a0ff54b19f82338406a6f52a1e9 Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Wed, 23 Oct 2024 10:18:52 +0200 Subject: [PATCH] Removed gomax as it was not used and it didn't work Added a future switch to switch before `now()` and after Cleaned up some commented out lines --- www/rss.php | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/www/rss.php b/www/rss.php index 10d7444..18b505f 100644 --- a/www/rss.php +++ b/www/rss.php @@ -35,6 +35,11 @@ switch ($atomurl) { $mimetype = "audio/mpeg"; $feed = "total"; break; + case "/rss-future.php": + $format = "mp3"; + $mimetype = "audio/mpeg"; + $feed = "future"; + break; case "/hpr_ogg_rss.php": $format = "ogg"; $mimetype = "audio/ogg"; @@ -116,15 +121,11 @@ if (isset($_GET['full'])) { } } -$gomax = "0"; -if (isset($_GET['gomax'])) { - $gomax = $_GET['gomax']; - if ( $gomax === "1" ) { - $gomax = "1"; - } +if ( $feed === "future" ) { + $query = "${query}\nAND eps.date >= UTC_DATE() "; } -if ( $gomax === "0" ) { - $query = "${query}\nAND eps.date <= UTC_DATE() "; +else { + $query = "${query}\nAND eps.date <= UTC_DATE() "; } if (isset($_GET['hostid'])) { @@ -184,7 +185,6 @@ print '' . "\n"; Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License feedback@NOSPAM-hackerpublicradio.org (HPR Feedback) - HPR Volunteer admin@hackerpublicradio.org @@ -237,16 +237,13 @@ if ($result = mysqli_query($connection, $query)) { $itunes_summary = htmlspecialchars(stripslashes(strip_tags(substr($row["notes"],0,4000)))); if ( $html == 1 ) { -# $show_notes = "

This show has been flagged as $episode_explicit by the host.

\n" . $row["notes"]; - $show_notes = $row["notes"]; - $warning = "

This show has been flagged as $episode_explicit by the host.

\n"; + $show_notes = $row["notes"]; + $warning = "

This show has been flagged as $episode_explicit by the host.

\n"; } else { -# $show_notes = "This show has been flagged as $episode_explicit by the host.\n" . htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ; - $show_notes = htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ; - $warning = "This show has been flagged as $episode_explicit by the host.\n"; + $show_notes = htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ; + $warning = "This show has been flagged as $episode_explicit by the host.\n"; } -# $show_notes = utf8_encode ( $show_notes ); $warning = utf8_encode ( $warning ); echo " \n"; if ( $episode_explicit === "Clean" ) { @@ -272,7 +269,6 @@ if ($result = mysqli_query($connection, $query)) { else { echo " \n\n"; } -// echo " \n\n"; echo " \n\n"; echo " " .date(DATE_RFC1123, strtotime($row['date'])) . "\n"; $length = $row['size']; @@ -284,8 +280,6 @@ if ($result = mysqli_query($connection, $query)) { } } -//Display non-connection errors -//Close sql connection mysqli_close($connection); echo "