<? /* Main include info */ ini_set('include_path',"/usr/web/sites/tuve.tv/include/"); include("site.inc"); /* Assign the page title */ $data[tpl]->assign("PAGE_TITLE","Channel List"); /* Main defines */ $data[tpl]->define(array(index=>"index/index.html")); $data[tpl]->define(array(body=>"/channels.html")); //DoSession(); $query = "SELECT * FROM channels LEFT JOIN videos ON channels.nowplaying = videos.vid ORDER BY channel"; $result = mysql_query($query); for ($i=0;$i<mysql_numrows($result);$i++) { $channel = mysql_result($result,$i,'channel'); $artist = mysql_result($result,$i,'artist'); $title = mysql_result($result,$i,'title'); $thumb = mysql_result($result,$i,'thumb'); $topic = mysql_result($result,$i,'topic'); if ($thumb == "") $thumb = "UbixCube.gif"; $chan2 = substr($channel,1,strlen($channel)-1); $rw .= "<TR><TD><A HREF=\"javascript:startTUve('$chan2')\"><IMG BORDER=\"0\" SRC=\"$thumb\" WIDTH=\"75\"></A></TD><TD> </TD><TH ALIGN=\"LEFT\">Channel:<BR>Topic:<BR>Now Playing:</TH><TD> </TD><TD>$channel<BR>$topic<BR>$artist - $title</TD></TR>\n"; $rw .= "<TR><TD COLSPAN=\"5\"><HR></TD></TR>\n"; } $data['tpl']->assign("ROWS",$rw); /* Parse and print */ $data[tpl]->parse(BODY, array("body")); $data[tpl]->parse(INDEX, array("index")); $data[tpl]->FastPrint("INDEX"); ?>