Beispiel #1
0
     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);
     $cp = cellwidth($pcv, $fromtime, $dconf['timewidth']);
     //dbg("cp" , $cp );
     // if a program is shorter than a value we have
     // set for shorter cell length -> colspan will be 0
     if ($dconf['displayshort'] == "no" && $cp['s'] < 1) {
         // fill the hole...
     } else {
         $cellclass = cellclass_category($pcv, $chv['def_cat']);
         print "<td align=\"left\" valign=\"top\" width=\"" . $cp['w'] . "%\" colspan=\"" . $cp['s'] . "\" class=\"" . $cellclass . "\">\n";
         //print hmins($pcv['start_time']) . " - " . hmins($pcv['end_time']) . "<br>\n";
         print hmins($pcv['start_time']) . "<br>\n";
         print "<b>";
Beispiel #2
0
    //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";
        print "  <td align=\"center\">\n";
        print hmins($chv['start_time']) . " - " . hmins($chv['end_time']);
        print "  </td>\n";
        $cellclass = cellclass_category($chv, $chann['def_cat']);