[mythtv] MythWeb

Russell Hatch mythtv-dev@snowman.net
Fri, 6 Dec 2002 15:14:54 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C29D3A.3B330AA0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_000D_01C29D3A.3B330AA0"


------=_NextPart_001_000D_01C29D3A.3B330AA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Attached is a more recent cvs diff for mythweb, so if you're gonna do it =
this weekend, use this one.  I cleaned up the main program listing guide =
in addition to everything else i listed for the previous patch.  I =
wouldn't mind getting some feedback for this from people, so if you're =
bored, check it out, it makes the web interface a lot more useable IMO.

Russell Hatch
------=_NextPart_001_000D_01C29D3A.3B330AA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Attached is a more recent cvs diff for =
mythweb, so=20
if you're gonna do it this weekend, use this one.&nbsp; I cleaned up the =
main=20
program listing guide in addition to everything else i listed for the =
previous=20
patch.&nbsp; I wouldn't mind getting some feedback for this from people, =
so if=20
you're bored, check it out, it makes the web interface a lot more =
useable=20
IMO.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Russell =
Hatch</FONT></DIV></BODY></HTML>

------=_NextPart_001_000D_01C29D3A.3B330AA0--

------=_NextPart_000_000C_01C29D3A.3B330AA0
Content-Type: application/octet-stream;
	name="mythweb-20021204.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="mythweb-20021204.patch"

? mythweb/images/icons=0A=
Index: mythweb/banner.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/banner.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 banner.php=0A=
--- mythweb/banner.php	27 Sep 2002 20:06:20 -0000	1.4=0A=
+++ mythweb/banner.php	5 Dec 2002 21:41:40 -0000=0A=
@@ -29,6 +29,14 @@=0A=
 =0A=
 	print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 =
Transitional//EN\">\n");=0A=
 	print("<HTML>\n");=0A=
+=0A=
+	print("<STYLE TYPE=3D\"text/css\">");=0A=
+	print("A:link    { text-decoration: none; color: $link_color; }");=0A=
+	print("A:visited { text-decoration: none; color: $link_visited_color; =
}");=0A=
+	print("A:active  { text-decoration: none; color: $link_active_color; =
}");=0A=
+	print("A:hover   { color: $link_hover_color; }");=0A=
+	print("</STYLE>");=0A=
+=0A=
 	print("\t<HEAD>\n");=0A=
 	print("\t\t<META HTTP-EQUIV=3D\"Content-Type\" CONTENT=3D\"text/html; =
charset=3DUTF-8\">\n");=0A=
 	print("\t\t<TITLE>MythWEB</TITLE>\n");=0A=
Index: mythweb/classes.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/classes.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 classes.php=0A=
--- mythweb/classes.php	27 Sep 2002 20:06:20 -0000	1.4=0A=
+++ mythweb/classes.php	5 Dec 2002 21:41:40 -0000=0A=
@@ -37,10 +37,10 @@=0A=
    	//	the listings table).=0A=
    	//=0A=
    =0A=
-	function setColour($a, $b)=0A=
+	function setColour($fg, $bg)=0A=
  	{=0A=
-		$this->fgColour =3D $a;=0A=
-		$this->bgColour =3D $b;=0A=
+		$this->fgColour =3D $fg;=0A=
+		$this->bgColour =3D $bg;=0A=
 	}=0A=
 =0A=
 	//=0A=
@@ -50,7 +50,7 @@=0A=
 	function printYourself()=0A=
 	{=0A=
 		print("\t\t\t\t\t<TD BGCOLOR=3D\"$this->bgColour\">\n");=0A=
-		print("\t\t\t\t\t\t&nbsp; $this->humantime\n");=0A=
+		print("\t\t\t\t\t\t&nbsp; <font =
style=3D\"color:$this->fgcolor\">$this->humantime</font>\n");=0A=
 		print("\t\t\t\t\t</TD>\n");=0A=
 	}=0A=
 =0A=
@@ -95,7 +95,12 @@=0A=
 class Recording=0A=
 {=0A=
 	var $chanid;=0A=
+	var $channum;=0A=
 	var $starttime;=0A=
+	var $endtime;=0A=
+	var $title;=0A=
+	var $subtitle;=0A=
+	var $description;=0A=
 }=0A=
 =0A=
 =0A=
@@ -139,7 +144,7 @@=0A=
 		$this->typeColour =3D $b;=0A=
 	}=0A=
 =0A=
-	function printYourself($descFlag, $width, $anOffset)=0A=
+	function printYourself($width, $anOffset)=0A=
 	{=0A=
 =0A=
 		print("<TD VALIGN=3D\"TOP\" WIDTH=3D\"17%\" COLSPAN=3D\"$width\" =
BGCOLOR=3D\"$this->typeColour\">");=0A=
@@ -150,22 +155,14 @@=0A=
 		print("<TR VALIGN=3D\"TOP\"><TD VALIGN=3D\"TOP\" HEIGHT=3D\"100%\">");=0A=
 =0A=
 =0A=
-		print("<A =
HREF=3D\"main.php?mode=3Dsingle&channel=3D$this->chanid&starttime=3D$this=
->startts&endtime=3D$this->endts&refoffset=3D$anOffset\">$this->title");=0A=
-		if(strlen($this->subtitle) > 0)=0A=
-		{=0A=
-			print(": $this->subtitle");=0A=
-		}=0A=
+		print("<A STYLE=3D\"color:");=0A=
+		if ($this->typeColour =3D=3D $GLOBALS['list_default_colour']) =
print($GLOBALS['text_dark']);=0A=
+		else print($GLOBALS['text_light']);=0A=
+		print("\" =
HREF=3D\"main.php?mode=3Dsingle&channel=3D$this->chanid&starttime=3D$this=
->startts&endtime=3D$this->endts&refoffset=3D$anOffset\">$this->title");=0A=
+		if ($GLOBALS['includeSubTitle'] && strlen($this->subtitle) > 0) =
print(": $this->subtitle");=0A=
+		if ($GLOBALS['includeDescription'] && strlen($this->description) > 0) =
print(" - $this->description");=0A=
+		if ($GLOBALS['includeProgramType'] && strlen($this->progType) > 0) =
print(" ($this->progType)");=0A=
 		print("</A>");=0A=
-		if(strlen($this->progType) > 0)=0A=
-		{=0A=
-			print(" ($this->progType) ");=0A=
-		}=0A=
-		if($descFlag =3D=3D "TRUE")=0A=
-		{=0A=
-			print(" $this->description");=0A=
-		}=0A=
-=0A=
-=0A=
 		print("</TD></TR>");=0A=
 		print("</TABLE>");=0A=
 =0A=
@@ -173,26 +170,6 @@=0A=
 		print("</TABLE>");=0A=
 =0A=
 		print("</TD>");=0A=
-/*=0A=
-		print "\t<TD VALIGN=3D\"CENTER\" =
HEIGHT=3D\"100%\"colspan=3D\"$width\" =
BGCOLOR=3D\"$this->typeColour\"><TABLE WIDTH=3D\"100%\" =
HEIGHT=3D\"100%\" BORDER=3D\"0\" CELLSPACING=3D\"0\" CELLPADDING=3D\"2\" =
BGCOLOR=3D\"$this->recordColour\">\n\t\t<TR HEIGHT=3D\"100%\" =
WIDTH=3D\"100%\">\n\t\t\t<TD HEIGHT=3D\"100%\" WIDTH=3D\"100%\">\n";=0A=
-		print "\t\t\t\t<TABLE WIDTH=3D\"100%\" HEIGHT=3D\"100%\" =
BORDER=3D\"0\" CELLSPACING=3D\"0\" CELLPADDING=3D\"2\" =
BGCOLOR=3D\"$this->typeColour\">\n\t\t\t\t\t<TR =
HEIGHT=3D\"100%\">\n\t\t\t\t\t\t<TD HEIGHT=3D\"100%\">\n";=0A=
-		print("<A =
HREF=3D\"main.php?mode=3Dsingle&channel=3D$this->channel&starttime=3D$thi=
s->startts\">$this->title");=0A=
-		if(strlen($this->subtitle) > 0)=0A=
-		{=0A=
-			print(": $this->subtitle");=0A=
-		}=0A=
-		print("</A>");=0A=
-		if(strlen($this->progType) > 0)=0A=
-		{=0A=
-			print(" ($this->progType) ");=0A=
-		}=0A=
-		if($descFlag =3D=3D "TRUE")=0A=
-		{=0A=
-			print(" $this->description");=0A=
-		}=0A=
-		print "\n\t\t\t\t\t\t</TD>\n\t\t\t\t\t</TR>\n\t\t\t\t</TABLE>\n";=0A=
-		print "\t\t\t</TD>\n\t\t</TR>\n\t</TABLE>\n</TD>";=0A=
-*/=0A=
 	}=0A=
 }=0A=
 =0A=
Index: mythweb/functions.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/functions.php,v=0A=
retrieving revision 1.3=0A=
diff -u -r1.3 functions.php=0A=
--- mythweb/functions.php	27 Sep 2002 20:06:20 -0000	1.3=0A=
+++ mythweb/functions.php	5 Dec 2002 21:41:40 -0000=0A=
@@ -60,7 +60,7 @@=0A=
 //	to record that program whenever it's shown=0A=
 //=0A=
 =0A=
-function recordAlways($programName)=0A=
+function recordAlways($programName, $theChannel)=0A=
 {=0A=
 	if(strlen($programName) > 0) // Are there program names as short as =
one character?=0A=
 	{=0A=
@@ -71,7 +71,9 @@=0A=
 			//	This program name is not in the allrecord table,=0A=
 			//	so we need to add it=0A=
 			//=0A=
-			mysql_query("insert into allrecord (title) values =
(\"$programName\")");	=0A=
+			//  See if the program is being always recorded just on a certain =
channel=0A=
+			if ($theChannel) mysql_query("insert into allrecord (title,chanid) =
values (\"$programName\",\"$theChannel\")");=0A=
+			else mysql_query("insert into allrecord (title) values =
(\"$programName\")");=0A=
 			=0A=
 			//=0A=
 			//	In case this is elsewhere, we should (?) delete it=0A=
@@ -169,6 +171,21 @@=0A=
 }=0A=
 =0A=
 //=0A=
+//	Boolean check to see if a given title=0A=
+//	is set to always record on a certain channel=0A=
+//=0A=
+=0A=
+function isInChannelAlwaysRecord($theChannel, $theTitle)=0A=
+{=0A=
+	$aQuery =3D mysql_query("select * from allrecord where title =3D =
\"$theTitle\" and chanid =3D \"$theChannel\"");=0A=
+	if(mysql_num_rows($aQuery) > 0)=0A=
+	{=0A=
+		return(TRUE);=0A=
+	}=0A=
+	return(FALSE);=0A=
+}=0A=
+=0A=
+//=0A=
 //	Boolean check to see if a given title is in =0A=
 //	the timeslotrecord table=0A=
 //=0A=
@@ -235,13 +252,19 @@=0A=
 //=0A=
 function setupRecordings()=0A=
 {=0A=
-	$recordQuery =3D mysql_query("SELECT * FROM singlerecord") or die("Uh =
oh, I couldn't open the singlerecord table");;=0A=
+	$theQuery =3D "select singlerecord.*,channel.channum from =
singlerecord,channel where channel.chanid =3D singlerecord.chanid order =
by singlerecord.starttime asc;";=0A=
+	$recordQuery =3D mysql_query($theQuery) or die("Uh oh, I couldn't open =
the singlerecord table");;=0A=
 	$i =3D 0;=0A=
-	while($recordTupple =3D mysql_fetch_array($recordQuery, MYSQL_ASSOC))=0A=
+	while($recordTuple =3D mysql_fetch_array($recordQuery, MYSQL_ASSOC))=0A=
 	{=0A=
 		$aRecord =3D new Recording;=0A=
-		$aRecord->chanid =3D $recordTupple["chanid"];=0A=
-		$aRecord->starttime =3D $recordTupple["starttime"];=0A=
+		$aRecord->chanid =3D $recordTuple["chanid"];=0A=
+		$aRecord->channum =3D $recordTuple["channum"];=0A=
+		$aRecord->starttime =3D $recordTuple["starttime"];=0A=
+		$aRecord->endtime =3D $recordTuple["endtime"];=0A=
+		$aRecord->title =3D $recordTuple["title"];=0A=
+		$aRecord->subtitle =3D $recordTuple["subtitle"];=0A=
+		$aRecord->description =3D $recordTuple["description"];=0A=
 		$recordArray[$i] =3D $aRecord;=0A=
 		$i +=3D 1;=0A=
 	}=0A=
@@ -320,5 +343,64 @@=0A=
 	return $programarray;=0A=
 }=0A=
 =0A=
+// Functions added by Russell Hatch=0A=
+=0A=
+// gather info from the allrecord table=0A=
+function setupAllRecordings() {=0A=
+	$theQuery =3D "select * from allrecord order by title asc;";=0A=
+	$recordQuery =3D mysql_query($theQuery) or die("ERROR: Unable to open =
the allrecord table");=0A=
+	$i =3D 0;=0A=
+	while($recordTuple =3D mysql_fetch_array($recordQuery, MYSQL_ASSOC)) {=0A=
+		$aRecord =3D new Recording;=0A=
+		$aRecord->title =3D $recordTuple['title'];=0A=
+		if ($recordTuple['chanid']) { // see if this program is always =
recorded on a certain channel=0A=
+			$aRecord->chanid =3D $recordTuple['chanid'];=0A=
+			$chanQuery =3D mysql_query("select channum from channel where =
chanid=3D\"$aRecord->chanid\";");=0A=
+			$aRow =3D mysql_fetch_row($chanQuery);=0A=
+			$aRecord->channum =3D $aRow[0];=0A=
+		}=0A=
+		$recordArray[$i] =3D $aRecord;=0A=
+		$i++;=0A=
+	}=0A=
+	return($recordArray);=0A=
+}=0A=
+=0A=
+// gather information from the timeslotrecord table=0A=
+function setupTimeSlotRecordings() {=0A=
+	$theQuery =3D "select timeslotrecord.*,channel.channum from =
timeslotrecord,channel where timeslotrecord.chanid=3Dchannel.chanid =
order by title asc;";=0A=
+	$recordQuery =3D mysql_query($theQuery) or die("ERROR: Unable to open =
the timeslotrecord table");;=0A=
+	$i =3D 0;=0A=
+	while($recordTuple =3D mysql_fetch_array($recordQuery, MYSQL_ASSOC))=0A=
+	{=0A=
+		$aRecord =3D new Recording;=0A=
+		$aRecord->chanid =3D $recordTuple["chanid"];=0A=
+		$aRecord->channum =3D $recordTuple["channum"];=0A=
+		$aRecord->starttime =3D $recordTuple["starttime"];=0A=
+		$aRecord->endtime =3D $recordTuple["endtime"];=0A=
+		$aRecord->title =3D $recordTuple["title"];=0A=
+		$recordArray[$i] =3D $aRecord;=0A=
+		$i++;=0A=
+	}=0A=
+	return $recordArray;=0A=
+}=0A=
+=0A=
+// parse the time strings into an array=0A=
+function parseTime($time) {=0A=
+	$theTime['year'] =3D substr($time, 0, 4);=0A=
+	$theTime['month'] =3D substr($time, 4, 2); =0A=
+	$theTime['day'] =3D substr($time, 6, 2);=0A=
+	$theTime['hour'] =3D substr($time, 8, 2);=0A=
+	$theTime['minute'] =3D substr($time, 10, 2);=0A=
+=0A=
+	return($theTime);=0A=
+}=0A=
+=0A=
+// since the timeslotrecord table stores times differently, here is =
another function to parse it=0A=
+function parseTimeSlotTime($time) {=0A=
+	$theTime['hour'] =3D substr($time, 0, 2);=0A=
+	$theTime['minute'] =3D substr($time, 3, 2);=0A=
+	$theTime['second'] =3D substr($time, 6, 2);=0A=
 =0A=
+	return($theTime);=0A=
+}=0A=
 ?>=0A=
Index: mythweb/listings.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/listings.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 listings.php=0A=
--- mythweb/listings.php	9 Nov 2002 21:47:51 -0000	1.4=0A=
+++ mythweb/listings.php	5 Dec 2002 21:41:41 -0000=0A=
@@ -17,8 +17,6 @@=0A=
 //	shows current listings.=0A=
 //=0A=
 =0A=
-=0A=
-=0A=
 //=0A=
 //	See if we got passed a time offset on the URL (GET)=0A=
 //	or (if not) use the current system time.=0A=
@@ -52,19 +50,19 @@=0A=
 //	set the colour and show the lines =0A=
 //	between programs=0A=
 //	=0A=
-print("\n\n\t\t<TABLE WIDTH=3D\"100%\" BORDER=3D\"0\" =
CELLPADDING=3D\"0\" CELLSPACING=3D\"0\" =
BGCOLOR=3D\"$list_fg_colour\">\n\t\t\t<TR>\n\t\t\t\t<TD>\n");=0A=
+print("\n\n\t\t<TABLE WIDTH=3D\"100%\" BORDER=3D\"0\" =
CELLPADDING=3D\"0\" CELLSPACING=3D\"0\" =
BGCOLOR=3D\"$list_bg_colour\">\n\t\t\t<TR>\n\t\t\t\t<TD>\n");=0A=
 =0A=
 //=0A=
 //	A second table where the actual <TR><TD>=0A=
 //	data goes (with CELLSPACING "holes" to=0A=
 //	see the background colour through)=0A=
 //=0A=
-print("\t\t\t\t\t<TABLE WIDTH=3D\"100%\" BORDER=3D\"0\" =
CELLPADDING=3D\"0\" CELLSPACING=3D\"5\" =
BGCOLOR=3D\"$list_fg_colour\">\n");=0A=
+print("\t\t\t\t\t<TABLE WIDTH=3D\"100%\" BORDER=3D\"0\" =
CELLPADDING=3D\"0\" CELLSPACING=3D\"1\" =
BGCOLOR=3D\"$list_bg_colour\">\n");=0A=
 =0A=
 //=0A=
 //	A full width cell that display the date=0A=
 //=0A=
-print("\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t<TD>\n\t\t\t\t\t\t\t</TD>\n\t\t\t=
\t\t\t\t<TD ALIGN=3D\"CENTER\" COLSPAN=3D\"$timeSlots\" =
BGCOLOR=3D\"$list_bg_colour\">\n\t\t\t\t\t\t\t\t");=0A=
+print("\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t<TD>\n\t\t\t\t\t\t\t</TD>\n\t\t\t=
\t\t\t\t<TD ALIGN=3D\"CENTER\" COLSPAN=3D\"$timeSlots\" =
BGCOLOR=3D\"$list_fg_colour\">\n\t\t\t\t\t\t\t\t");=0A=
 printTheDate($sqlstarttime, $theOffset, $timeSlots);=0A=
 print("\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t</TR>\n");=0A=
 =0A=
@@ -84,7 +82,7 @@=0A=
 for ($timeslot =3D 0; $timeslot < $timeSlots; $timeslot +=3D 1)=0A=
 {=0A=
     $theTime =3D $timearray[$timeslot];=0A=
-    $theTime->setColour($list_fg_colour, $list_bg_colour);=0A=
+    $theTime->setColour($text_dark, $list_fg_colour);=0A=
     $theTime->printYourself();=0A=
 }=0A=
 =0A=
@@ -94,21 +92,16 @@=0A=
 print "<TD><A =
HREF=3D\"main.php?mode=3Dlistings&timeoffset=3D$futureOffset\"><IMG =
SRC=3D\"images/right.gif\" BORDER=3D\"0\" ALT=3D\"right\"></A></TD>";=0A=
 print "\t</tr>\n";=0A=
 =0A=
-=0A=
 //=0A=
 //	Sort down by channels and across by program=0A=
 //=0A=
 $channelindex =3D 0;=0A=
+$timebar =3D 0;=0A=
 while ($mychannel =3D $channelarray[$channelindex])=0A=
 {=0A=
-	print "\t\t<TR><td>" . $mychannel->channum . "<br>" . =0A=
-	$mychannel->callsign . "</td>\n";=0A=
-	//=0A=
-	//	NOTE TO SELF Icon stuff (needs work)=0A=
-	//=0A=
-	//print("\t\t<TR HEIGHT=3D\"100%\"><TD>");=0A=
-	//print("<IMG SRC=3D\"$mychannel->icon\" =
ALT=3D\"$mychannel->channum\">");=0A=
-	//print("</TD>");=0A=
+	print "\t\t<TR><td><center><font size=3D\"-1\">" . $mychannel->channum =
. " " . $mychannel->callsign . "</font>";=0A=
+	if ($includeIcon && is_file($mychannel->icon)) print("<br><img =
src=3D\"$mychannel->icon\">");=0A=
+	print("</center></td>\n");=0A=
 =0A=
 	$lasttitle =3D " ";=0A=
 	$lastsubtitle =3D " ";=0A=
@@ -119,7 +112,7 @@=0A=
                 if ($proginfo =3D=3D null)=0A=
                     continue;=0A=
 =0A=
-		$finalColour =3D $list_bg_colour;=0A=
+		$finalColour =3D $list_default_colour;=0A=
 		if ($proginfo->title !=3D $lasttitle || $proginfo->subtitle !=3D =
$lastsubtitle)=0A=
 		{=0A=
 			$cellwidth =3D 1;=0A=
@@ -150,7 +143,7 @@=0A=
 			}=0A=
 			if ($finalColour =3D=3D "")=0A=
 			{=0A=
-				$finalColour =3D $list_bg_colour;=0A=
+				$finalColour =3D $list_default_colour;=0A=
 			}=0A=
 			$proginfo->setColours($finalColour, $finalColour);=0A=
 			$recordArrayIndex =3D 0;=0A=
@@ -173,20 +166,33 @@=0A=
 			//	always record or a timeslot=0A=
 			//	record=0A=
 			//=0A=
+			// fixed a bug here, $proginfo->channel should have been =
$proginfo->chanid - Russ=0A=
 			if(isInAlwaysRecord($proginfo->title) || =0A=
-			isInTimeslotRecord($proginfo->channel, $proginfo->startts, =
$proginfo->endts, $proginfo->title))=0A=
+			isInTimeslotRecord($proginfo->chanid, $proginfo->startts, =
$proginfo->endts, $proginfo->title))=0A=
 			{=0A=
 				$proginfo->setColours($list_reccolour, $finalColour);=0A=
 			}=0A=
-			//print "\t\t<td colspan=3D\"$cellwidth\" VALIGN=3D\"TOP\" =
BGCOLOR=3D\"$list_bg_colour\">";=0A=
-			$proginfo->printYourself($includeDescription, $cellwidth, =
$theOffset);=0A=
-			//print "</td>";=0A=
+=0A=
+			$proginfo->printYourself($cellwidth, $theOffset);=0A=
 		}=0A=
 		$lasttitle =3D $proginfo->title;=0A=
 		$lastsubtitle =3D $proginfo->subtitle;=0A=
 	}=0A=
 	print "\t</tr>\n";=0A=
+=0A=
+	if ($timebar =3D=3D $timeBarCount) { // print the time listing every =
15 channels=0A=
+		print "<tr><td>";=0A=
+		for ($timeslot =3D 0; $timeslot < $timeSlots; $timeslot +=3D 1) {=0A=
+			$theTime =3D $timearray[$timeslot];=0A=
+		    $theTime->setColour($text_dark, $list_fg_colour);=0A=
+			$theTime->printYourself();=0A=
+		}=0A=
+		$timebar =3D 0;=0A=
+		print "</td></tr>";=0A=
+	}=0A=
+=0A=
 	$channelindex +=3D 1;=0A=
+	$timebar +=3D 1;=0A=
 }=0A=
 print "</TABLE></TD></TR></TABLE>\n";=0A=
 =0A=
Index: mythweb/recordings.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/recordings.php,v=0A=
retrieving revision 1.1=0A=
diff -u -r1.1 recordings.php=0A=
--- mythweb/recordings.php	11 Sep 2002 04:08:52 -0000	1.1=0A=
+++ mythweb/recordings.php	5 Dec 2002 21:41:41 -0000=0A=
@@ -13,10 +13,132 @@=0A=
 =0A=
 //=0A=
 //	recordings.php lets us see what's in the=0A=
-// 	recordings database. Some day, it may let us=0A=
-//	do something with that content=0A=
+// 	recordings database.=0A=
 //=0A=
 =0A=
-print("<BR><BR><BR><CENTER>Sorry, recordings doesn't do anything =
yet</CENTER><BR><BR><BR>");=0A=
+// return a nice time string to print=0A=
+function getTimeString($time) {=0A=
+	$theTime =3D parseTime($time);=0A=
+	$theHour =3D $theTime['hour'];=0A=
+	if ($theHour > 12) {=0A=
+		$theHour -=3D 12;=0A=
+		$ampm =3D "pm";=0A=
+	}=0A=
+	else if ($theHour =3D=3D 0) {=0A=
+		$theHour =3D 12;=0A=
+		$ampm =3D "am";=0A=
+	}=0A=
+	else $ampm =3D "am";=0A=
+	$returnTime =3D $theTime['month'] . "/" . $theTime['day'] . "/" . =
$theTime['year'] . " " . $theHour . ":" . $theTime['minute'] . $ampm;=0A=
+	return($returnTime);=0A=
+}=0A=
 =0A=
+// delete the program if they hit delete=0A=
+if ($_POST['delete']) dontRecord($_POST['title'], $_POST['chanid'], =
$_POST['starttime']);=0A=
+=0A=
+// gather information from all the recording tables=0A=
+$singlerecordings =3D setupRecordings();=0A=
+$allrecordings =3D setupAllRecordings();=0A=
+$timeslotrecordings =3D setupTimeSlotRecordings();=0A=
+=0A=
+print("<TABLE WIDTH=3D\"100%\" BGCOLOR=3D\"$list_bg_colour\" =
CELLSPACING=3D\"10\" CELLPADDING=3D\"7\"><TR><TD>");=0A=
+=0A=
+// print all the entries from the singlerecord table=0A=
+print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLSPACING=3D\"5\" =
CELLPADDING=3D\"5\">");=0A=
+=0A=
+$index =3D 0;=0A=
+if ($singlerecordings[$index]) {=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD></TD><TD>Programs scheduled to record =
once.</TD></TR>");=0A=
+	while ($show =3D $singlerecordings[$index]) {=0A=
+		$starttime =3D getTimeString($show->starttime);=0A=
+		$endtime =3D getTimeString($show->endtime);=0A=
+=0A=
+		print("<form action=3D\"main.php?mode=3Drecordings\" =
method=3D\"post\">");=0A=
+		print("<input type=3D\"hidden\" name=3D\"title\" =
value=3D\"$show->title\"><input type=3D\"hidden\" name=3D\"chanid\" =
value=3D\"$show->chanid\">");=0A=
+		print("<input type=3D\"hidden\" name=3D\"starttime\" =
value=3D\"$show->starttime\"><input type=3D\"hidden\" name=3D\"delete\" =
value=3D\"1\">");=0A=
+		print("<TR VALIGN=3D\"TOP\"><TD>Program:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">");=0A=
+		print("<a =
href=3D\"main.php?mode=3Dsingle&channel=3D$show->chanid&starttime=3D$show=
->starttime\">$show->title</a>");=0A=
+		if ($show->subtitle) print(" - $show->subtitle");=0A=
+		print("</TD><TD><input type=3D\"submit\" name=3D\"deletebutton\" =
value=3D\"Delete\"></TD></TR><TR VALIGN=3D\"TOP\">");=0A=
+		print("<TD>Airdate:</TD><TD BGCOLOR=3D\"$list_fg_colour\">$starttime =
to $endtime on channel $show->channum</TD></TR>");=0A=
+		if ($show->description) print("<TR =
VALIGN=3D\"TOP\"><TD>Description:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$show->description</TD></TR>");=0A=
+		print("<TR></TR><TR></TR></form>");=0A=
+		$index++;=0A=
+	}=0A=
+}=0A=
+else print("<TR><TD>You currently do not have any single programs =
scheduled to record.</TD></TR>");=0A=
+print("</table><br><br>");=0A=
+=0A=
+// print all the time slot recordings=0A=
+print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLSPACING=3D\"5\" =
CELLPADDING=3D\"5\">");=0A=
+=0A=
+$index=3D0;=0A=
+if ($timeslotrecordings[$index]) {=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Programs scheduled to record in a =
certain time slot</TD></TR>");=0A=
+	while ($show =3D $timeslotrecordings[$index]) {=0A=
+		$starttime =3D parseTimeSlotTime($show->starttime);=0A=
+		$endtime =3D parseTimeSlotTime($show->endtime);=0A=
+=0A=
+		$sHour =3D $starttime['hour'];=0A=
+		if ($sHour > 12) {=0A=
+			$sHour -=3D 12;=0A=
+			$ampm =3D "pm";=0A=
+		}=0A=
+		else if ($sHour =3D=3D 0) {=0A=
+			$sHour =3D 12;=0A=
+			$ampm =3D "am";=0A=
+		}=0A=
+		else $ampm =3D "am";=0A=
+		$sMinute =3D $starttime['minute'];=0A=
+		$starttime =3D $sHour . ":" . $sMinute . $ampm;=0A=
+=0A=
+		$eHour =3D $endtime['hour'];=0A=
+		if ($eHour > 12) {=0A=
+			$eHour -=3D 12;=0A=
+			$ampm =3D "pm";=0A=
+		}=0A=
+		else if ($eHour =3D=3D 0) {=0A=
+			$eHour =3D 12;=0A=
+			$ampm =3D "am";=0A=
+		}=0A=
+		else $ampm =3D "am";=0A=
+		$eMinute =3D $endtime['minute'];=0A=
+		$endtime =3D $eHour . ":" . $eMinute . $ampm;=0A=
+=0A=
+		print("<form action=3D\"main.php?mode=3Drecordings\" =
method=3D\"post\">");=0A=
+		print("<input type=3D\"hidden\" name=3D\"title\" =
value=3D\"$show->title\"><input type=3D\"hidden\" name=3D\"chanid\" =
value=3D\"$show->chanid\">");=0A=
+		print("<input type=3D\"hidden\" name=3D\"starttime\" =
value=3D\"$show->starttime\"><input type=3D\"hidden\" name=3D\"delete\" =
value=3D\"1\">");=0A=
+		print("<TR VALIGN=3D\"TOP\" =
BGCOLOR=3D\"$list_fg_colour\"><TD>$show->title</TD>");=0A=
+		print("<TD>$starttime to $endtime on channel $show->channum</TD>");=0A=
+		print("<TD BGCOLOR=3D\"$list_bg_colour\"><input type=3D\"submit\" =
name=3D\"deletebutton\" value=3D\"Delete\"></TR></form>");=0A=
+		$index++;=0A=
+	}=0A=
+}=0A=
+else print("<TR><TD>You currently do not have any time slots scheduled =
to record</TD></TR>");=0A=
+print("</table><br><br>");=0A=
+=0A=
+// print the shows that are always set to record=0A=
+print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLSPACING=3D\"5\" =
CELLPADDING=3D\"5\">");=0A=
+=0A=
+$index=3D0;=0A=
+if ($allrecordings[$index]) {=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Programs scheduled to always =
record</TD></TR>");=0A=
+	while ($show =3D $allrecordings[$index]) {=0A=
+		$theTitle =3D $show->title;=0A=
+		$theChanId =3D $show->chanid;=0A=
+		$theChannel =3D $show->channum;=0A=
+		print("<form action=3D\"main.php?mode=3Drecordings\" =
method=3D\"post\">");=0A=
+		print("<input type=3D\"hidden\" name=3D\"title\" =
value=3D\"$theTitle\"><input type=3D\"hidden\" name=3D\"chanid\" =
value=3D\"");=0A=
+		if ($theChanId) print($theChanId);=0A=
+		else print("NULL");=0A=
+		print("\"><input type=3D\"hidden\" name=3D\"starttime\" =
value=3D\"NULL\"><input type=3D\"hidden\" name=3D\"delete\" =
value=3D\"1\">");=0A=
+		print("<TR VALIGN=3D\"TOP\"><TD =
BGCOLOR=3D\"$list_fg_colour\">$theTitle");=0A=
+		if ($theChanId) print(" on channel $theChannel");=0A=
+		print("</TD><TD><input type=3D\"submit\" name=3D\"deletebutton\" =
value=3D\"Delete\"></TD></TR></form>");=0A=
+		$index++;=0A=
+	}=0A=
+}=0A=
+else print("<TR><TD>You currently do not have any programs set to =
always record.</TD></TR>");=0A=
+print("</table><br><br>");=0A=
+print("</td></tr></table>");=0A=
 ?>=0A=
Index: mythweb/search.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/search.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 search.php=0A=
--- mythweb/search.php	14 Nov 2002 05:12:48 -0000	1.4=0A=
+++ mythweb/search.php	5 Dec 2002 21:41:41 -0000=0A=
@@ -44,19 +44,19 @@=0A=
 // Show the search form=0A=
 //=0A=
 =0A=
-print("<TABLE BGCOLOR=3D\"$list_fg_colour\" WIDTH=3D\"100%\"><TR><TD>");=0A=
+print("<TABLE BGCOLOR=3D\"$list_bg_colour\" WIDTH=3D\"100%\"><TR><TD>");=0A=
 print("<CENTER>");=0A=
-print("<TABLE BGCOLOR=3D\"$list_fg_colour\" CELLPADDING=3D\"2\" =
CELLSPACING=3D\"8\"");=0A=
+print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLPADDING=3D\"2\" =
CELLSPACING=3D\"8\"");=0A=
 print("<TR>");=0A=
 print("<TD VALIGN=3D\"TOP\">");	=0A=
 print("Search for:");=0A=
 print("</TD>");=0A=
-print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 print("<FORM ACTION=3D\"main.php\" METHOD=3D\"GET\">");=0A=
 print("<CENTER><INPUT TYPE=3D\"TEXT\" SIZE=3D\"25\" NAME=3D\"query\" =
VALUE=3D\"$theQuery\"></CENTER>");=0A=
 print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"mode\" VALUE=3D\"search\">");=0A=
 print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"refoffset\" =
VALUE=3D\"$theRefOffset\">");=0A=
-print("</TD></TR><TR><TD VALIGN=3D\"TOP\">In:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">");=0A=
+print("</TD></TR><TR><TD VALIGN=3D\"TOP\">In:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">");=0A=
 =0A=
 //=0A=
 //	What columns should we search?=0A=
@@ -99,7 +99,7 @@=0A=
 //	and what time periods?=0A=
 //=0A=
 =0A=
-print("</TD></TR><TR><TD VALIGN=3D\"TOP\">Time:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">");=0A=
+print("</TD></TR><TR><TD VALIGN=3D\"TOP\">Time:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">");=0A=
 =0A=
 print("<INPUT TYPE=3D\"RADIO\" NAME=3D\"searchtime\" =
VALUE=3D\"forward\" ");=0A=
 if($searchtime =3D=3D "forward")=0A=
@@ -157,7 +157,7 @@=0A=
 if(strlen($theQuery) > 0)=0A=
 {=0A=
 	$searchingSomething =3D FALSE;=0A=
-	$queryString =3D "select chanid, starttime, endtime, title from =
program ";=0A=
+	$queryString =3D "select channel.channum, starttime, endtime, title, =
program.chanid from program,channel ";=0A=
 	//=0A=
 	//	Figure out which columns to query=0A=
 	//=0A=
@@ -213,6 +213,9 @@=0A=
 		$searchingSomething =3D TRUE;=0A=
 	}=0A=
 	=0A=
+	// Get the actual channel its on instead of the chanid=0A=
+	$queryString .=3D ") AND channel.chanid =3D program.chanid";=0A=
+=0A=
 	//=0A=
 	//	Set the sorting order=0A=
 	//=0A=
@@ -221,18 +224,16 @@=0A=
 	=0A=
 	if($searchtime =3D=3D "forward")=0A=
 	{=0A=
-		$queryString .=3D ") AND starttime > \"$rightNow\" ORDER BY starttime =
ASC " ;=0A=
+		$queryString .=3D " AND starttime > \"$rightNow\"  ORDER BY starttime =
ASC " ;=0A=
 	}=0A=
 	elseif($searchtime =3D=3D "backward")=0A=
 	{=0A=
-		$queryString .=3D " ) AND starttime < \"$rightNow\" ORDER BY =
starttime DESC " ;=0A=
+		$queryString .=3D "  AND starttime < \"$rightNow\" ORDER BY starttime =
DESC " ;=0A=
 	}=0A=
 	else=0A=
 	{=0A=
-		$queryString .=3D " ) ORDER BY starttime ASC " ;=0A=
+		$queryString .=3D " ORDER BY starttime ASC " ;=0A=
 	}=0A=
-=0A=
-	=0A=
 		=0A=
 	if($searchingSomething =3D=3D TRUE)=0A=
 	{=0A=
@@ -244,29 +245,29 @@=0A=
 			//=0A=
 =0A=
 			print("\t\t<TABLE WIDTH=3D\"100%\" CELLPADDING=3D\"0\" =
CELLSPACING=3D\"0\" BORDER=3D\"0\"><TR BGCOLOR=3D\"#000000\"><TD><IMG =
SRC=3D\"images/1x1.gif\" WIDTH=3D\"1\" HEIGHT=3D\"2\" =
ALT=3D\"\"></TD></TR></TABLE>\n");=0A=
-			print("\t\t<TABLE WIDTH=3D\"100%\" CELLPADDING=3D\"0\" =
CELLSPACING=3D\"0\" BORDER=3D\"0\"><TR BGCOLOR=3D\"$list_fg_colour\"><TD =
BGCOLOR=3D\"$list_bg_colour\"><CENTER><FONT =
COLOR=3D\"$list_fg_colour\">Results:</FONT></CENTER></TD></TR></TABLE>\n"=
);=0A=
+			print("\t\t<TABLE WIDTH=3D\"100%\" CELLPADDING=3D\"0\" =
CELLSPACING=3D\"0\" BORDER=3D\"0\"><TR BGCOLOR=3D\"$list_bg_colour\"><TD =
BGCOLOR=3D\"$list_fg_colour\"><CENTER><FONT =
COLOR=3D\"$list_bg_colour\">Results:</FONT></CENTER></TD></TR></TABLE>\n"=
);=0A=
 			print("\t\t<TABLE WIDTH=3D\"100%\" CELLPADDING=3D\"0\" =
CELLSPACING=3D\"0\" BORDER=3D\"0\"><TR BGCOLOR=3D\"#000000\"><TD><IMG =
SRC=3D\"images/1x1.gif\" WIDTH=3D\"1\" HEIGHT=3D\"2\" =
ALT=3D\"\"></TD></TR></TABLE>\n");=0A=
 =0A=
 			//=0A=
 			//	Show the results=0A=
 			//=0A=
 =0A=
-			print("<TABLE BGCOLOR=3D\"$list_fg_colour\" =
WIDTH=3D\"100%\"><TR><TD>");=0A=
+			print("<TABLE BGCOLOR=3D\"$list_bg_colour\" =
WIDTH=3D\"100%\"><TR><TD>");=0A=
 			print("<CENTER>");=0A=
-			print("<TABLE BGCOLOR=3D\"$list_fg_colour\" CELLPADDING=3D\"2\" =
CELLSPACING=3D\"8\"");=0A=
+			print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLPADDING=3D\"2\" =
CELLSPACING=3D\"8\"");=0A=
 =0A=
 	=0A=
 			print("<TR>");=0A=
-			print("<TD BGCOLOR=3D\"$list_bg_colour\">");	=0A=
+			print("<TD BGCOLOR=3D\"$list_fg_colour\">");	=0A=
 			print("Channel");=0A=
 			print("</TD>");=0A=
-			print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+			print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 			print("Date");=0A=
 			print("</TD>");=0A=
-			print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+			print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 			print("Time");=0A=
 			print("</TD>");	=0A=
-			print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+			print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 			print("Program");=0A=
 			print("</TD>");=0A=
 			print("</TR>");=0A=
@@ -274,22 +275,32 @@=0A=
 			{=0A=
 				print("<TR>");=0A=
 =0A=
-				print("<TD BGCOLOR=3D\"$list_bg_colour\">");	=0A=
+				print("<TD BGCOLOR=3D\"$list_fg_colour\">");	=0A=
 				print("$searchRow[0]");	=0A=
 				print("</TD>");=0A=
 =0A=
 				$theDate =3D substr($searchRow[1], 4, 2) . "/" . =
substr($searchRow[1], 6, 2);=0A=
-				print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+				print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 				print("$theDate");=0A=
 				print("</TD>");=0A=
 	=0A=
-				$theTime =3D substr($searchRow[1], 8, 2) . ":" . =
substr($searchRow[1], 10, 2);=0A=
-				print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+				$theHour =3D substr($searchRow[1], 8, 2);=0A=
+				if ($theHour > 12) {=0A=
+					$theHour -=3D 12;=0A=
+					$ampm =3D "pm";=0A=
+				}=0A=
+				else if ($theHour =3D=3D 0) {=0A=
+					$theHour =3D 12;=0A=
+					$ampm =3D "am";=0A=
+				}=0A=
+				else $ampm =3D "am";=0A=
+				$theTime =3D $theHour . ":" . substr($searchRow[1], 10, 2) . $ampm;=0A=
+				print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 				print("$theTime");=0A=
 				print("</TD>");=0A=
 =0A=
-				print("<TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
-				print("<A =
HREF=3D\"main.php?mode=3Dsingle&channel=3D$searchRow[0]&starttime=3D$sear=
chRow[1]&endtime=3D$searchRow[2]&refoffset=3D0\">$searchRow[3]</A>");=0A=
+				print("<TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
+				print("<A =
HREF=3D\"main.php?mode=3Dsingle&channel=3D$searchRow[4]&starttime=3D$sear=
chRow[1]&endtime=3D$searchRow[2]&refoffset=3D0\">$searchRow[3]</A>");=0A=
 				print("</TD>");=0A=
 =0A=
 				print("</TR>");=0A=
Index: mythweb/settings.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/settings.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 settings.php=0A=
--- mythweb/settings.php	12 Sep 2002 16:47:46 -0000	1.4=0A=
+++ mythweb/settings.php	5 Dec 2002 21:41:41 -0000=0A=
@@ -28,11 +28,18 @@=0A=
 	$db_dbname	=3D "mythconverg";=0A=
 =0A=
 	//=0A=
-	//	Display options=0A=
+	//	listing Display options=0A=
 	//=0A=
-	=0A=
-	$timeSlots		=3D 6;		// How many 30 minute columns to display =0A=
-	$includeDescription	=3D "TRUE"; 	// Anything but "TRUE" is false=0A=
+	// what kind of info to display on the listings=0A=
+	// everything disabled by default (i like my listings simple)=0A=
+	$includeSubTitle	=3D FALSE; 	// show the programs subtitle=0A=
+	$includeDescription	=3D FALSE;    // show the full program description=0A=
+	$includeProgramType =3D FALSE;    // show what category of program it =
is=0A=
+	// include the channel icon (must copy all icons from =
~/.mythtv/channels to mythwebroot/images/icons)=0A=
+	$includeIcon		=3D FALSE;=0A=
+=0A=
+	$timeSlots	  =3D 6;		// How many 30 minute columns to display =0A=
+	$timeBarCount =3D 15;		// How many lines to skip before redisplaying =
the timebar on the listings=0A=
 =0A=
 	//=0A=
 	//	Default Search=0A=
@@ -59,29 +66,26 @@=0A=
 	$main_fontsize	=3D "2";=0A=
 	$menu_bg_colour	=3D "#3181B4";=0A=
 	$menu_fg_colour =3D "#DEDEDE";=0A=
-	$list_bg_colour	=3D "#DEDEDE";=0A=
-	$list_fg_colour =3D "#3181B4";=0A=
+=0A=
+	// listing colors=0A=
+	$list_bg_colour	=3D "#3181B4";=0A=
+	$list_fg_colour =3D "#DEDEDE";=0A=
+	$list_default_colour =3D "#FFFFFF";=0A=
 	$list_reccolour =3D "#FF0000";=0A=
-	$movie_colour	=3D "#AAAAFF";=0A=
 =0A=
-	$colorArray["Sports"] =3D "#FFCC00";=0A=
-	$colorArray["Sport - Events"] =3D "#FFCCOO";=0A=
-	$colorArray["Talk"] =3D "#FFCCCC";=0A=
-	$colorArray["News"] =3D "#99CCFF";=0A=
-	$colorArray["Comedy"] =3D "#AAAACC";=0A=
-	$colorArray["Children"] =3D "#CC99FF";=0A=
-	$colorArray["Children's"] =3D "#CC99FF";=0A=
-	$colorArray["Reality"] =3D "#EEDD99";=0A=
-	$colorArray["Soap"] =3D "#CC99CC";=0A=
-	$colorArray["Soaps"] =3D "#CC99CC";=0A=
-	$colorArray["Drama"] =3D "#AACCCC";=0A=
-	$colorArray["Edu"] =3D "#DC143C";=0A=
-	$colorArray["Educational"] =3D "#DC143C";=0A=
-	$colorArray["Doc"] =3D "#BC8F8F";=0A=
-	$colorArray["Documentary"] =3D "#BC8F8F";=0A=
-	$colorArray["Nature"] =3D "#309930";=0A=
-	$colorArray["House/Garden"] =3D "#309930";=0A=
-	$colorArray["Cooking"] =3D "#309930";=0A=
-	$colorArray["How-to"] =3D "#CC9966";=0A=
-	$colorArray["Special"] =3D "#CCFF33";=0A=
+	// what contrasting colors to use for text on the listing=0A=
+	$text_light =3D "#FFFFFF";=0A=
+	$text_dark =3D "#000000";=0A=
+=0A=
+	// doesn't affect the listings=0A=
+	$link_color		=3D "#3181B4";=0A=
+	$link_visited_color	=3D "#3181B4";=0A=
+	$link_active_color	=3D "#990033";=0A=
+	$link_hover_color	=3D "#CC0000";=0A=
+=0A=
+	// colors for certain categories=0A=
+	// everything besides what is listed here is list_default_colour=0A=
+	$movie_colour	=3D "#DE9D00";=0A=
+	$colorArray["Sports"] =3D "#108800";=0A=
+	$colorArray["Sport - Events"] =3D "#108800";=0A=
 ?>=0A=
Index: mythweb/single.php=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /var/lib/cvs/mythweb/single.php,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 single.php=0A=
--- mythweb/single.php	27 Sep 2002 20:06:20 -0000	1.4=0A=
+++ mythweb/single.php	5 Dec 2002 21:41:42 -0000=0A=
@@ -50,7 +50,14 @@=0A=
 		//=0A=
 		//	We want to always record this program=0A=
 		//=0A=
-		recordAlways($theProgram);=0A=
+		recordAlways($theProgram, FALSE);=0A=
+	}=0A=
+	if($theRecordSettings =3D=3D "RC")=0A=
+	{=0A=
+		//=0A=
+		//	We want to always record this program on this channel=0A=
+		//=0A=
+		recordAlways($theProgram, $theChannel);=0A=
 	}=0A=
 	if($theRecordSettings =3D=3D "RO")=0A=
 	{=0A=
@@ -97,17 +104,17 @@=0A=
 	//	some forms=0A=
 	//=0A=
 =0A=
-	print("<TABLE WIDTH=3D\"100%\" BGCOLOR=3D\"$list_fg_colour\" =
CELLSPACING=3D\"10\" CELLPADDING=3D\"7\"><TR><TD>");=0A=
+	print("<TABLE WIDTH=3D\"100%\" BGCOLOR=3D\"$list_bg_colour\" =
CELLSPACING=3D\"10\" CELLPADDING=3D\"7\"><TR><TD>");=0A=
 	print("<CENTER>");=0A=
-	print("<TABLE BGCOLOR=3D\"$list_fg_colour\" CELLSPACING=3D\"5\" =
CELLPADDING=3D\"5\">");=0A=
-	print("<TR VALIGN=3D\"TOP\"><TD>Program:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[3] (Click for <A =
HREF=3D\"http://www.google.com/search?q=3D$aRow[3]\">Google =
Search</A>)</TD>");=0A=
+	print("<TABLE BGCOLOR=3D\"$list_bg_colour\" CELLSPACING=3D\"5\" =
CELLPADDING=3D\"5\">");=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Program:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[3] (Click for <A =
HREF=3D\"http://www.google.com/search?q=3D$aRow[3]\">Google =
Search</A>)</TD>");=0A=
 =0A=
 	//=0A=
 	//	If it's a movie, add an IMDB button=0A=
 	//=0A=
 	if(smellsLikeMovie($aRow[7], $aRow[6]))=0A=
 	{=0A=
-		print("<TD BGCOLOR=3D\"$list_fg_colour\"><CENTER>");=0A=
+		print("<TD BGCOLOR=3D\"$list_bg_colour\"><CENTER>");=0A=
 		print("<FORM ACTION=3D\"http://www.imdb.com/Find\" =
method=3D\"post\">");=0A=
 		print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"select\" =
VALUE=3D\"Titles\">");=0A=
 		print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"for\" =
VALUE=3D\"$aRow[3]\">");=0A=
@@ -115,23 +122,26 @@=0A=
 		print("</FORM>");=0A=
 		print("</CENTER></TD>");=0A=
 	}=0A=
-	print("</TR><TR VALIGN=3D\"TOP\"><TD>Category:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[6]</TD></TR>");=0A=
-	if(strlen($aRow[4]) > 0)=0A=
-	{=0A=
-		print("<TR VALIGN=3D\"TOP\"><TD>Episode:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[4]</TD></TR>");=0A=
-	}=0A=
-	print("<TR VALIGN=3D\"TOP\"><TD>Channel:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[10]</TD></TR>");=0A=
-	print("<TR VALIGN=3D\"TOP\"><TD>Description:</TD><TD WIDTH=3D\"300\" =
BGCOLOR=3D\"$list_bg_colour\">$aRow[5]</TD></TR>");=0A=
+	if(strlen($aRow[6]) > 0) print("</TR><TR =
VALIGN=3D\"TOP\"><TD>Category:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[6]</TD></TR>");=0A=
+	if(strlen($aRow[4]) > 0) print("<TR =
VALIGN=3D\"TOP\"><TD>Episode:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[4]</TD></TR>");=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Channel:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[10]</TD></TR>");=0A=
+	if(strlen($aRow[5]) > 0) print("<TR =
VALIGN=3D\"TOP\"><TD>Description:</TD><TD WIDTH=3D\"300\" =
BGCOLOR=3D\"$list_fg_colour\">$aRow[5]</TD></TR>");=0A=
 	if($aRow[8] > 12)=0A=
 	{=0A=
 		$aRow[8] -=3D 12;=0A=
+		$ampm =3D "pm";=0A=
 	}=0A=
-	if($aRow[9] < 10)=0A=
+	else if ($aRow[8] =3D=3D 0) {=0A=
+		$aRow[8] =3D 12;=0A=
+		$ampm =3D "am";=0A=
+	}=0A=
+	else $ampm =3D "am";=0A=
+	if($aRow[9] < 10) // i'm not doing to modify this, but is this desired =
behavior? -- Russ=0A=
 	{=0A=
 		$aRow[9] =3D "0" . $aRow[9];=0A=
 	}=0A=
-	print("<TR VALIGN=3D\"TOP\"><TD>Start:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[8]:$aRow[9]</TD></TR>");=0A=
-	print("<TR VALIGN=3D\"TOP\"><TD>Duration:</TD><TD =
BGCOLOR=3D\"$list_bg_colour\">$aRow[7]</TD></TR>");=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Start:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[8]:$aRow[9]$ampm</TD></TR>");=0A=
+	print("<TR VALIGN=3D\"TOP\"><TD>Duration:</TD><TD =
BGCOLOR=3D\"$list_fg_colour\">$aRow[7] minutes</TD></TR>");=0A=
 =0A=
 	//=0A=
 	//	Need to check if this is being recorded=0A=
@@ -141,6 +151,7 @@=0A=
 	=0A=
 	$isBeingSingleRecorded =3D FALSE;=0A=
 	$isBeingTimeslotRecorded =3D isInTimeslotRecord($aRow[0], $aRow[1], =
$aRow[2], $aRow[3]);=0A=
+	$isBeingChannelAlwaysRecorded =3D isInChannelAlwaysRecord($aRow[0], =
$aRow[3]);=0A=
 	$isBeingAlwaysRecorded =3D isInAlwaysRecord($aRow[3]);=0A=
 	$recordArrayIndex =3D 0;=0A=
 	while($aRecord =3D $recordArray[$recordArrayIndex])=0A=
@@ -153,7 +164,7 @@=0A=
 			=0A=
 		$recordArrayIndex +=3D 1;	=0A=
 	}=0A=
-	print("<TR><TD></TD><TD BGCOLOR=3D\"$list_bg_colour\">");=0A=
+	print("<TR><TD></TD><TD BGCOLOR=3D\"$list_fg_colour\">");=0A=
 	=0A=
 	//=0A=
 	//	Create a form to update the recording settings=0A=
@@ -183,12 +194,19 @@=0A=
 	}=0A=
 	print(">Record this program in this timeslot every day<BR>");=0A=
 =0A=
+	print("<INPUT TYPE=3D\"RADIO\" NAME=3D\"recordsettings\" =
VALUE=3D\"RC\" ");=0A=
+	if($isBeingChannelAlwaysRecorded =3D=3D TRUE)=0A=
+	{=0A=
+		print("CHECKED ");=0A=
+	}=0A=
+	print(">Always record this program on this channel<BR>");=0A=
+=0A=
 	print("<INPUT TYPE=3D\"RADIO\" NAME=3D\"recordsettings\" =
VALUE=3D\"RA\" ");=0A=
-	if($isBeingAlwaysRecorded =3D=3D TRUE)=0A=
+	if($isBeingAlwaysRecorded =3D=3D TRUE && =
!$isBeingChannelAlwaysRecorded)=0A=
 	{=0A=
 		print("CHECKED ");=0A=
 	}=0A=
-	print(">Always record this program<BR><BR>");=0A=
+	print(">Always record this program wherever<BR><BR>");=0A=
 =0A=
 	print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"mode\" VALUE=3D\"single\">");=0A=
 	print("<INPUT TYPE=3D\"HIDDEN\" NAME=3D\"channel\" =
VALUE=3D\"$theChannel\">");=0A=

------=_NextPart_000_000C_01C29D3A.3B330AA0--