
Originally Posted by
xav0989
Why send a request between listing.php and xml_listing.php? Most likely these files are using the same database.
splotch: Here's a small idea I've had:
Database:

day - Forgot to add this one, the day of the month the show is on (eg. 1 - sunday, 2 - monday, etc)
(All times where show starts/ends is minutes since day start)
(Additional ideas: Description of show to be shown on current show)
And then add code that's something like following:
PHP Code:
// In a loop that loops items returned by db query that returns items for current day (ordered by start ASC)
$currentTime = 60 * date('G') + date('i'); // Minutes since start of day
if($row['start'] < $currentTime) {
// Code for show already shown
} elseif ($row['start'] >= $currentTime && $row['end'] < $currentTime) {
// Code for current show
} else {
// Code for upcoming show
}
Of course there are several bugs in code, eg. Shows that end in new day.