Exemplo n.º 1
0
 if ($chv['export'] != "1") {
     continue;
 }
 print "\n<!-- " . $chv['display_name'] . " -->\n";
 print "<tr class=\"nowshowing_tablebody\">\n";
 print "  <td class=\"nowshowing_firstcell\" width=\"" . $dconf['firstcellwidth'] . "%\" align=\"center\" valign=\"center\">\n";
 print "<a href=\"nowonchannel.php?id=" . $chv['id'] . "&time=" . $fromtime . "\">\n";
 if ($chv['logo']) {
     print "<img src=\"" . $dconf['urllogos'] . "/" . $dconf['logosdir'] . $chv['xmltvid'] . ".png\" border=0><br>\n";
 }
 print $chv['display_name'] . "<br>\n";
 if ($chv['url']) {
     print "<a href=\"" . $chv['url'] . "\" target=\"_new\">" . $chv['url'] . "</a>\n";
 }
 print "</a></td>\n";
 $prgchunk = extract_programs($chv['id'], $fromtime, $totime);
 //dbg("prgchunk",$prgchunk);
 if (!$prgchunk) {
     $hole['channel_id'] = $chv['id'];
     $hole['start_time'] = date("Y-m-d H:i:s", $fromtime);
     $hole['end_time'] = date("Y-m-d H:i:s", $totime);
     $hole['title'] = $lngstrns['nodata'];
     $hole['description'] = $lngstrns['nodatadesc'];
     $hole['category'] = "hole";
     //dbg("hole",$hole);
     $prgchunk[] = $hole;
 }
 $prgchunk = fix_programs($prgchunk, $fromtime, $totime);
 reset($prgchunk);
 while (list($pck, $pcv) = each($prgchunk)) {
     //dbg("program",$pcv);
Exemplo n.º 2
0
}
if (!$fromtime) {
    //$fromtime = time();
    $fromtime = 1155647837;
    //dbg("fromtime",$fromtime);
    // find last 'timewidth' point before requested time
    // as this is the actual starting time
    $da = getdate($fromtime);
    $da['minutes'] = (int) ($da['minutes'] / $dconf['grantimebar']) * $dconf['grantimebar'];
    $da['seconds'] = 0;
    $fromtime = mktime($da['hours'], $da['minutes'], $da['seconds'], $da['mon'], $da['mday'], $da['year']);
}
$totime = $fromtime + $dconf['timewidth'] * 60;
//dbg("fromtime",$fromtime);
//dbg("totime",$totime);
$pdb = extract_programs($channel_id, $fromtime, $totime);
if ($debug) {
    dbg("programs", $pdb);
}
$pdb = fix_programs($pdb, $fromtime, $totime);
if ($pdb) {
    print "\n<!-- now showing table -->\n";
    print "<table width=\"75%\" border=\"0\" cellpadding=\"4\" cellspacing=\"2\" class=\"nowshowing\">\n";
    print "<tr class=\"tableMenuTitle\">\n";
    print "  <td class=\"tableMenuBody\">Time</td>\n";
    print "  <td class=\"tableMenuBody\">Program</td>\n";
    print "</tr>\n";
    $pdb = array_sort($pdb, "start_time");
    reset($pdb);
    while (list($chk, $chv) = each($pdb)) {
        print "<tr class=\"tableBody\">\n";