View Full Version : Whats on now TV schedule thingy needed
jreitz
05-24-2005, 08:51 PM
I run a local cable television channel. I don't know where to start with this. What I am looking for is a way to show the channels schedule for what is on at the given moment. So like if "show A" is on from 3-4pm and its 3:25pm then when i go to the page it will say, ON NOW: "show A"
This is something dynamic i know maybe something aleardy has been built for this? any guidence as to where i start? PHP? cgi?
AaronW
05-24-2005, 09:39 PM
You'd need a database of some sort that stores the shows and their showtimes with duration. Then you'd use PHP or ASP or whatever to query said database for the show playing at the given time.
Do you have some kind of show database? If not, you're going to have to train a monkey to update it manually every 30 minutes or so ;)
jreitz
05-24-2005, 09:52 PM
well, the schedule never changes, I dont need individual episodes and that stuff, just the basic name of show. I have php and mysql on the server, but dont have enough rights to add a new database :(.... could I use a flatfile (txt file)? it basically needs to look at the file, compare the entries to the current time and date and then print the entry that qualifies right?
difficult?
jalarie
05-25-2005, 09:55 PM
If your users can be expected to have Javascript, you could build the schedule into the page and post whatever is playing now.
Kurashu
05-25-2005, 10:42 PM
<?php
/*
CREATE TABLE shows (
id SERIAL NOT NULL,
name VARCHAR(50) NOT NULL,
start INT NOT NULL,
end INT NOT NULL
);
*/
$connect = pg_connect('host=localhost dbname=channel user=admin');
$time = time();
$query = sprintf('SELECT name FROM shows WHERE start < %1$s AND end > %1$s', $time);
$result = pg_query($connect, $query);
$row = pg_fetch_row($result, 0, PGSQL_ASSOC);
echo 'Currently Playing: ' . $row['name'];
?>
Quick example.
jreitz
05-26-2005, 04:21 PM
wow. thanks, that code looks liek this is a pretty simple problem. BUT... I dont know much PHP yet, and i dont know how to implament it without some commenting especially the database connection and set up part *(i swear i have a book and am learning it, but that stuff is at the end of the book!)
so, alittle guidence?
thanks
Itchybug
05-26-2005, 04:50 PM
*(i swear i have a book and am learning it, but that stuff is at the end of the book!)
LOL :)
jreitz
05-26-2005, 09:02 PM
well you wouldnt want to me skip ahead and miss out on the fun parts in the middle would you? :D
Hello there, I know this thread has AGES old, but it is exactly what I need to do and I am having a hell of a problem solving it.
What I have so far is:
$nowdate = date("m/d/Y"); //Get full today date
$nowmonth = date("m"); //Get just month
$nowday = date("d"); //Get just day number
$nowyear = date ("Y"); //Get only year
$nowhour = date ("H"); //Get only hour 24h format
$nowminutes = date("i"); //Get minutes
$nowhourcst = $nowhour + 1; //Get CST time
$nowhourmst = $nowhour; //The server uses MST time.. maybe I can set timezone from php instead?
$nowhourpst = $nowhour - 1; // Convert time to PST
$nowhourest = $nowhour + 2; // Time to EST
$nowhourhalf = $nowhourcst.$nowminutes.'00'; //This is what I use to compare with time from database
$nowhourfull = $nowhourcst.'00'.'00'; //Tried this to get half-hour shows
$query ="SELECT hour, title FROM schedule WHERE date = '".$nowdate."'"; // The query gets all shows from today
$result = mysql_query($query);// Execute the query
$i = 1; // Start my counter to show only 6 records from the results of all day
while ($row = mysql_fetch_array($result, MYSQL_NUM)) { // Starts while, is there a way to insert all rows on another array? so I can have an index of each row and call them with prev and next?
$hourrow = str_replace(':','', $row[0]);// I am comparing the hours as a whole number, I am not sure if logical operators also work with hour in 00:00:00 format, so I remove the : and compare a single string of numbers
if ($nowhourfull <= $hourrow) { // Here's the comparision. The problem here is that I also need to compare with $nowhourhalf, if I dont do this, I dont get shows from current half hour (for example, if it is 8:32 am it will show current show the next one, at 9:00 am and that is NOT the current show on air.
if ($i < 6){// used to show only 6 records
printf("%s %s %s<br>", $row[0], $row[1]); // Prints only 6 records
$i++; // Increment $i so when reaching 6... no print!
} //closing 2nd if
} //closing 1st if
}// closing while
But I can't:
1. Print the 6-10am show
2. Print half hour shows
I hope someone can help me, I am really turning into a monster trying to solve this!!:mad:
jalarie
01-30-2009, 12:29 AM
There was mention of a static schedule and diviculty in creating a new database, so I feel that building the schedule into the web page and displaying what is needed using JavaScript. I'll be sending a private message with an example page in a moment.
mlseim
01-30-2009, 04:57 AM
This example is from another post similar to your question ...
See attached file ... "schedule.txt".
That is your "flat file" database.
Upload it to your directory.
Now, upload this script:
<?php
// To adjust for the difference in server timezone to your timezone ...
// Get the current hour and add or subtract to make it correct.
$hour=date("H")+0;
// Get the current time and make it one value.
$now=($hour*100)+date("i");
// Get current day of week.
// These will match the first field in your .txt file
$cday=date("w")+1;// 0=Mon, 1=Tue, 2=Wed, 3=Thu, 4=Fri, 5=Sat, 6=Sun
// Put the schedule into an array.
$list = file("schedule.txt");
// Set a flag to save the correct line when it's found.
$flag=0;
// Loop through the schedule and pick out the correct line.
for($i = 0; $i < count($list); $i++) {
list ($day, $start, $stop, $title, $dj, $url) = split ('\|', $list[$i]);
if($day == $cday){
// Parse-out the Hours and Minutes from the timeslot.
list ($start_hour, $start_minute)=split(':',$start);
$str=($start_hour*100)+$start_minute;
list ($stop_hour, $stop_minute)=split(':',$stop);
$stp=($stop_hour*100)+$stop_minute;
// Adjust midnight so the math works correctly (for stop time only).
if($stp == 0){
$stp="2500";
}
// Do the math to determine if the current time fits into the schedule.
if($now >= $str && $now < $stp && $flag==0){
// Load the current line - what is on now.
$now_title=$title;
$now_dj=$dj;
$now_title_url=$url;
// Look ahead one line and see what is coming next.
$x=$i+1;
if($x > count($list)){
$x=0;
}
list ($day, $start, $stop, $title, $dj, $url) = split ('\|', $list[$x]);
$next_title=$title;
$next_dj=$dj;
$next_title_url=$url;
// Latch the flag so no more lines are read.
$flag=1;
echo"
<div>
<b>On Air Now:</b><br />
<a href='$now_title_url'>$now_title</a><br />
$now_dj<br /><br />
<b>On Air Next:</b><br />
<a href='$next_title_url'>$next_title</a><br />
$next_dj<br />
</div>
";
}//if $now
}//if $day
}//for loop
// If no matches were found, display a default message.
if($flag == 0){
echo"
<div>
<b>Enjoy Our Show</b><br />
</div>
";
}
?>
To display on your webpage, do this:
<?php include("schedule.php")?>
You can format the HTML within this script, or using CSS on your page.
gemgfx
02-06-2009, 08:56 PM
Good Day mlseim,
I know this is a really old thread, and I don't even know if you guys are still around. But this code is exactly what I need for a radio website I'm working on. Just have one question. Is there some way I can modify this code to display an Image in addition to the information about the various programs.
For example. When the particular program is on and the code displays the "On Air Now" information. Could I have an image of the Dj being displayed alongside this info and apply a link to it so that when clicked, it will send you to a page introducing the dj?
I will appreciate it if someone could point me in the right direction even.
Thanks in Advance.
Regards,
GemGfx
mlseim
02-07-2009, 07:13 PM
Certainly ...
1) Create a directory for your photos (example, called "photos") and
upload all of your DJ photos into there.
2) Modify the "schedule.txt" file.
At the end of every line, add a pipe | and the filename of the photo the corresponds ...
and then the URL to has the page for the DJ ...
Example, |billsmith.jpg|http://www.mytvsite.com/billsmith.html
3) The new script would be like this ...
<?php
// To adjust for the difference in server timezone to your timezone ...
// Get the current hour and add or subtract to make it correct.
$hour=date("H")+0;
// Get the current time and make it one value.
$now=($hour*100)+date("i");
// Get current day of week.
// These will match the first field in your .txt file
$cday=date("w")+1;// 0=Mon, 1=Tue, 2=Wed, 3=Thu, 4=Fri, 5=Sat, 6=Sun
// Put the schedule into an array.
$list = file("schedule.txt");
// Set a flag to save the correct line when it's found.
$flag=0;
// Loop through the schedule and pick out the correct line.
for($i = 0; $i < count($list); $i++) {
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $list[$i]);
if($day == $cday){
// Parse-out the Hours and Minutes from the timeslot.
list ($start_hour, $start_minute)=split(':',$start);
$str=($start_hour*100)+$start_minute;
list ($stop_hour, $stop_minute)=split(':',$stop);
$stp=($stop_hour*100)+$stop_minute;
// Adjust midnight so the math works correctly (for stop time only).
if($stp == 0){
$stp="2500";
}
// Do the math to determine if the current time fits into the schedule.
if($now >= $str && $now < $stp && $flag==0){
// Load the current line - what is on now.
$now_title=$title;
$now_dj=$dj;
$now_title_url=$url;
$now_photo=$photo;
$now_djurl=$djurl;
// Look ahead one line and see what is coming next.
$x=$i+1;
if($x > count($list)){
$x=0;
}
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $list[$x]);
$next_title=$title;
$next_dj=$dj;
$next_title_url=$url;
$next_photo=$photo;
$next_djurl=$djurl;
// Latch the flag so no more lines are read.
$flag=1;
echo"
<div>
<b>On Air Now:</b><br />
<a href='$now_title_url'>$now_title</a><br />
<a href='$now_djurl'><img src='photos/$now_photo' alt='$now_dj' title='$now_dj' border='0' /></a><br />
<a href='$now_djurl'>$now_dj</a><br /><br />
<b>On Air Next:</b><br />
<a href='$next_title_url'>$next_title</a><br />
<a href='$next_djurl'><img src='photos/$next_photo' alt='$next_dj' title='$next_dj' border='0' /></a><br />
<a href='$next_djurl'>$next_dj</a><br /><br />
</div>
";
}//if $now
}//if $day
}//for loop
// If no matches were found, display a default message.
if($flag == 0){
echo"
<div>
<b>Enjoy Our Show</b><br />
</div>
";
}
?>
gemgfx
02-13-2009, 11:05 AM
Thank you my brother. This was extremely helpful. I had to do a bit of modification but it works great. Thanks again.
Best Regards,
GemGfx
aidukonis
12-15-2009, 10:02 PM
Certainly ...
1) Create a directory for your photos (example, called "photos") and
upload all of your DJ photos into there.
2) Modify the "schedule.txt" file.
At the end of every line, add a pipe | and the filename of the photo the corresponds ...
and then the URL to has the page for the DJ ...
Example, |billsmith.jpg|http://www.mytvsite.com/billsmith.html
3) The new script would be like this ...
<?php
// To adjust for the difference in server timezone to your timezone ...
// Get the current hour and add or subtract to make it correct.
$hour=date("H")+0;
// Get the current time and make it one value.
$now=($hour*100)+date("i");
// Get current day of week.
// These will match the first field in your .txt file
$cday=date("w")+1;// 0=Mon, 1=Tue, 2=Wed, 3=Thu, 4=Fri, 5=Sat, 6=Sun
// Put the schedule into an array.
$list = file("schedule.txt");
// Set a flag to save the correct line when it's found.
$flag=0;
// Loop through the schedule and pick out the correct line.
for($i = 0; $i < count($list); $i++) {
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $list[$i]);
if($day == $cday){
// Parse-out the Hours and Minutes from the timeslot.
list ($start_hour, $start_minute)=split(':',$start);
$str=($start_hour*100)+$start_minute;
list ($stop_hour, $stop_minute)=split(':',$stop);
$stp=($stop_hour*100)+$stop_minute;
// Adjust midnight so the math works correctly (for stop time only).
if($stp == 0){
$stp="2500";
}
// Do the math to determine if the current time fits into the schedule.
if($now >= $str && $now < $stp && $flag==0){
// Load the current line - what is on now.
$now_title=$title;
$now_dj=$dj;
$now_title_url=$url;
$now_photo=$photo;
$now_djurl=$djurl;
// Look ahead one line and see what is coming next.
$x=$i+1;
if($x > count($list)){
$x=0;
}
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $list[$x]);
$next_title=$title;
$next_dj=$dj;
$next_title_url=$url;
$next_photo=$photo;
$next_djurl=$djurl;
// Latch the flag so no more lines are read.
$flag=1;
echo"
<div>
<b>On Air Now:</b><br />
<a href='$now_title_url'>$now_title</a><br />
<a href='$now_djurl'><img src='photos/$now_photo' alt='$now_dj' title='$now_dj' border='0' /></a><br />
<a href='$now_djurl'>$now_dj</a><br /><br />
<b>On Air Next:</b><br />
<a href='$next_title_url'>$next_title</a><br />
<a href='$next_djurl'><img src='photos/$next_photo' alt='$next_dj' title='$next_dj' border='0' /></a><br />
<a href='$next_djurl'>$next_dj</a><br /><br />
</div>
";
}//if $now
}//if $day
}//for loop
// If no matches were found, display a default message.
if($flag == 0){
echo"
<div>
<b>Enjoy Our Show</b><br />
</div>
";
}
?>
mlseim, your code is absolutely brilliant! Thanks a lot.
Is it possible to do the following issues with it:
1. Display all programs for particular day in format like this:
hour:minute program title with active url (first program)
... (second program)
...
2. Show 5 programs in total - 1st "Whats on now" + 4 upcoming programs (display less, if there is less left for today). Now it shows "Whats on now" + next. Is it possible to make 4 of such next? Have tried like this:
// Look ahead two lines and see what is coming next.
$x=$i+1;
if($x > count($list)){
$x=0;
}
list ($day, $start, $stop, $title, $dj, $url) = split ('\|', $list[$x]);
$3_title=$next_title;
$3_dj=$next_dj;
$3_title_url=$next_title_url;
But doesn't work.
3. Display all programs only from 18:00 hour (basically it means evening program).
These are 3 filters for users to make TV Schedule very convenient to view. Could you please help showing how to do it?
Any resources for further reading would be also very appreciated.
mlseim
12-16-2009, 02:24 PM
That script from way back in January ...
I have also added something similar to what you're looking for.
Both of these scripts are used here: http://www.starpointradio.com
You'll notice there's a deal about timezones. That's a cookie that a user
can set to adjust their own timezone relative the Starpoint Radio's timezone.
All of this stuff should really be done using MySQL, but they didn't want to
deal with that ... just a simple text file database ... My script is not really the
most elegantly written, but it seems to work.
Here is the 2nd script that uses the same "schedule.txt" flat-file database.
<?php
// Programme Schedule - Star Point Radio
// Rev. 03/10/2009
$timeadjust=0;
// Read the Timezone Clock Adjust Cookie (if it exists)
if (isset($_COOKIE["clock"])){
$timeadjust=$_COOKIE["clock"];
}
// To adjust for the difference in server timezone to your timezone ...
// Get the current hour and add or subtract to make it correct.
$hour=date("H")+0;
// Get the current time and make it one value.
$now=($hour*100)+date("i");
// Get current day of week.
// These will match the first field in your .txt file
$cday=date("D");// Sun, Mon, Tue, Wed, Thu, Fri, Sat
$days=array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
// Put the schedule into an array.
$list = file("schedule.txt");
// Read the Day of Week Cookie (if it exists)
if (isset($_COOKIE["day"])){
$d=$_COOKIE["day"];
}
$daily=array();
$lines=array();
$ct=0;
$dt=0;
// Loop through the schedule and pick out the correct line.
for($q = 0; $q < count($list); $q++) {
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $list[$q]);
if($day=="Mon" || $day=="Tue" || $day=="Wed" || $day=="Thu" || $day=="Fri" || $day=="Sat" || $day=="Sun"){
$lines[$ct]=$list[$q];
if($d==$day){
$daily[$dt]=$list[$q];
$dt++;
}
$ct++;
}
}
if (isset($_COOKIE["day"])){
// Display one day
$flag=0;
$begin=0;
$bday=$d;
$flag2=1;
if($bday=="Mon"){$begin=0;}
if($bday=="Tue"){$begin=1;}
if($bday=="Wed"){$begin=2;}
if($bday=="Thu"){$begin=3;}
if($bday=="Fri"){$begin=4;}
if($bday=="Sat"){$begin=5;}
if($bday=="Sun"){$begin=6;}
// Loop through the schedule and pick out the correct lines.
for($i = 0; $i < count($lines); $i++) {
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $lines[$i]);
if($day==$d){
if($flag2==1){
echo "<br /><b><font face=\"Arial\" size=\"4\" color=\"#1775D5\">Programmes for $days[$begin]</font></b><br />
<table cellspacing='3' cellpadding='3'>
";
$flag2=2;
$count=0;
}
// Parse-out the Hours and Minutes from the timeslot.
list ($start_hour, $start_minute)=split(':',$start);
$str=($start_hour*100)+$start_minute;
list ($stop_hour, $stop_minute)=split(':',$stop);
$stp=($stop_hour*100)+$stop_minute;
$flag88=0;
$sp_hour=(($stop_hour+$timeadjust)*1);
$st_hour=(($start_hour+$timeadjust)*1);
if($start_hour+$timeadjust <0){
$st_hour=24-(($start_hour+$timeadjust)*-1);
}
if($stop_hour+$timeadjust <0){
$sp_hour=24-(($stop_hour+$timeadjust)*-1);
}
if($start_hour+$timeadjust >24){
$st_hour=(($start_hour+$timeadjust)*+1)-24;
}
if($stop_hour+$timeadjust >24){
$sp_hour=(($stop_hour+$timeadjust)*+1)-24;
}
$start_hour = ltrim($st_hour, '0');
$stop_hour = ltrim($sp_hour, '0');
if($start_hour > 12){
$show_times=($start_hour-12)." pm";
}
else{
$show_times=($start_hour)." am";
}
if($start_hour == 0 && $start_minute == 0){
$show_times="Midnight";
}
if($start_hour == 12 && $start_minute == 0){
$show_times="Noon";
}
$flag3=0;
if($stop_hour == 0 && $stop_minute == 0){
$show_times=$show_times." - "."Midnight";
$flag3=1;
}
if($stop_hour == 12 && $stop_minute == 0){
$show_times=$show_times." - "."Noon";
$flag3=1;
}
if($flag3==0){
if($stop_hour > 12){
$show_times=$show_times." - ".($stop_hour-12)." pm";
}
else{
$show_times=$show_times." - ".($stop_hour)." am";
}
}
$bgcolor='#f5f5f5';
if($count==1){
$bgcolor='#ffffff';
}
if($flag88==1){
$bgcolor="#dddddd";
}
echo"
<tr bgcolor='$bgcolor'>
<td valign='top' width='120'><font face=\"verdana\" color=\"#000080\">$show_times</font></td>
<td valign='top' width='350'><font face=\"verdana\" color=\"#000080\"><b>$title</b><br />$dj<br />$url</font></td>
</tr>
";
$count++;
if($count==2){
$count=0;
}
$next=$i+1;
if($next>count($lines)){
$next=0;
}
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $lines[$next]);
if($bday == $day){
// do nothing
}
else{
$bday=$day;
$flag2=1;
$begin++;
echo "</table>\n";
}
}//if $day
}//for loop
echo"</table>\n";
}// display one day
else{
// Display ALL WEEK
// DISPLAY =================================================
if($timeadjust<0){
$begin=6;
}
if($timeadjust >= 0){
$begin=0;
}
echo"<table cellspacing='3' cellpadding='3'>";
echo "<br /><b><font face=\"Arial\" size=\"4\" color=\"#1775D5\">Programmes for $days[$begin]</font></b><br />
";
$count=0;
if(!$bday){
$begin++;
}
if($begin>6){
$begin=0;
}
// Loop through the schedule and pick out the correct lines.
for($i = 0; $i < count($lines); $i++) {
list ($day, $start, $stop, $title, $dj, $url, $photo, $djurl) = split ('\|', $lines[$i]);
if($day=="Mon" || $day=="Tue" || $day=="Wed" || $day=="Thu" || $day=="Fri" || $day=="Sat" || $day=="Sun"){
// Parse-out the Hours and Minutes from the timeslot.
list ($start_hour, $start_minute)=split(':',$start);
$str=($start_hour*100)+$start_minute;
list ($stop_hour, $stop_minute)=split(':',$stop);
$stp=($stop_hour*100)+$stop_minute;
$sp_hour=(($stop_hour+$timeadjust)*1);
$st_hour=(($start_hour+$timeadjust)*1);
if($start_hour+$timeadjust < 0){
$st_hour=24-(($start_hour+$timeadjust)*-1);
}
if($stop_hour+$timeadjust < 0){
$sp_hour=24-(($stop_hour+$timeadjust)*-1);
}
if($start_hour+$timeadjust >=24){
$st_hour=($start_hour+$timeadjust)-24;
}
if($stop_hour+$timeadjust >=24){
$sp_hour=($stop_hour+$timeadjust)-24;
}
$start_hour = ltrim($st_hour, '0');
$stop_hour = ltrim($sp_hour, '0');
$st=0;
if($start_hour > 12){
$show_times=($start_hour-12)." pm";
$st=1;
}
else{
$show_times=($start_hour)." am";
}
if($start_hour == 0 && $start_minute == 0){
$show_times="Midnight";
}
if($start_hour == 12 && $start_minute == 0){
$show_times="Noon";
}
$flag3=0;
if($stop_hour == 0 && $stop_minute == 0){
$show_times=$show_times." - "."Midnight";
$flag3=1;
$st++;
}
if($stop_hour == 12 && $stop_minute == 0){
$show_times=$show_times." - "."Noon";
$flag3=1;
}
if($flag3==0){
if($stop_hour > 12){
$show_times=$show_times." - ".($stop_hour-12)." pm";
}
else{
$show_times=$show_times." - ".($stop_hour)." am";
$st++;
}
}
$bgcolor='#f5f5f5';
if($count==1){
$bgcolor='#ffffff';
}
if ($bday && $begin <= $cd){
echo"
<tr bgcolor='$bgcolor'>
<td valign='top' width='120'><font face=\"verdana\" color=\"#000080\">$show_times</font></td>
<td valign='top' width='350'><font face=\"verdana\" color=\"#000080\"><b>$title</b><br />$dj<br />$url</font></td>
</tr>
";
$count++;
if($count==2){
$count=0;
}
if($st>1){
echo"</table><table cellspacing='3' cellpadding='3'>";
echo "<br /><b><font face=\"Arial\" size=\"4\" color=\"#1775D5\">Programmes for $days[$begin]</font></b><br />
";
$count=0;
$begin++;
if($begin>6){
$begin=0;
}
}
}
// Display every day
if(!$bday){
echo"
<tr bgcolor='$bgcolor'>
<td valign='top' width='120'><font face=\"verdana\" color=\"#000080\">$show_times</font></td>
<td valign='top' width='350'><font face=\"verdana\" color=\"#000080\"><b>$title</b><br />$dj<br />$url</font></td>
</tr>
";
$count++;
if($count==2){
$count=0;
}
if($st>1){
echo"</table><table cellspacing='3' cellpadding='3'>";
echo "<br /><b><font face=\"Arial\" size=\"4\" color=\"#1775D5\">Programmes for $days[$begin]</font></b><br />
";
$count=0;
$begin++;
if($begin>6){
$begin=0;
}
}
}
}//if $day
}//for loop
echo"</table>\n";
}// display all week
?>
aidukonis
12-16-2009, 10:39 PM
Are you sure this code works?
I have tried it on test environment at http://www.darbas.de/test/ and it shows only text "Programmes for Monday". Despite it is Wednesday, more important that it doesn't shows anything else - the programs are missing.
schedule.txt from your attachment
schedule.php from you code
index.php with <?php include("schedule.php")?>
What could be wrong?
mlseim
12-17-2009, 12:53 AM
The script in post #16...
I know what the problem is.
Instead of having the "schedule.txt" look like this,
0|23:00|00:00|Night Time|Auto DJ|djpage.htm
1|00:00|07:00|Night Time|Auto DJ|djpage.htm
I changed the numbers to "days" ... like this:
Sun|23:00|00:00|Night Time|Auto DJ|djpage.htm
Mon|00:00|07:00|Night Time|Auto DJ|djpage.htm
0 is Sunday
1 is Monday
.
.
6 is Saturday
That will fix the "schedule.php" script, but mess up the other script.
You'll have to find the differences. I made this change because the
client could never figure out which number was which day.
I noticed that it will only display one day if a cookie
exists. Yours will display the whole week ... I don't have the
cookie scripts in front of me right now, so I can't show you
how those are done.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.