generated; $precision = 1; // minutes $timeSteps = 1440 / $precision; // how many cells each row $time = time(); function secondsToDayTime($seconds) { $duration = secondsToDuration($seconds); $parts = explode(":", $duration); unset($parts[2]); return implode(":", $parts); } ?>
= $currentCellTime && $time <= $currentCellTimeNext) { $class .= " now "; } if ($i % 15 === 0) { echo ''; } } ?> sites as $key => $value) { if ($key == $_REQUEST['site']) { $site = $value; foreach ($site->channels as $users_id => $channel) { $identification = User::getNameIdentificationById($users_id); foreach ($channel->playlists as $playlist) { if (!PlayLists::showOnTV($playlist->playlists_id)) { continue; } echo ""; if (!empty($playlist->programme)) { $pl = new PlayList($playlist->playlists_id); ?> programme as $plItem) { //$content = "-Next:{$currentCellTimeNextDate}
-Stop: {$plItem->stop_date}
-$currentCellTimeNext >= $plItem->stop
" ; if ($currentCellTime >= $plItem->start && $currentCellTimeNext <= $plItem->stop) { $images = Video::getImageFromFilename($plItem->filename); $img = "
"; $title = addcslashes("{$img} {$plItem->title}
{$plItem->start_date}", '"'); $tooltip = "data-toggle=\"tooltip\" data-html=\"true\" data-original-title=\"{$title}\" data-placement=\"bottom\" "; $colspan++; $class .= " hasVideo "; $link = PlayLists::getLinkToLive($playlist->playlists_id); $content = " " . $plItem->duration . "
".$plItem->title.""; //$content = "
Stop: {$plItem->stop_date}
Next:{$currentCellTimeNextDate}
$currentCellTimeNext >= $plItem->stop
" . $plItem->title; if ($time >= $plItem->start && $time <= $plItem->stop) { $class .= " playingNow "; } else if ($time >= $plItem->stop) { $class .= " finished "; } for (; $i < $timeSteps + 1; $i++) { $currentCellTime = strtotime("today " . secondsToDuration($i * $precision * 60)); $currentCellDate = date("Y/m/d H:i:s", $currentCellTime); if ($currentCellTime <= $plItem->stop) { $colspan++; continue; } else { break; } } break; } else if ($currentCellTime >= $plItem->start && $currentCellTime <= $plItem->stop) { $images = Video::getImageFromFilename($plItem->filename); $img = "
"; $title = addcslashes("{$img} {$plItem->title}
{$plItem->start_date}", '"'); $tooltip = "data-toggle=\"tooltip\" data-html=\"true\" data-original-title=\"{$title}\" data-placement=\"bottom\" "; $colspan++; $class .= " hasVideo "; $link = PlayLists::getLinkToLive($playlist->playlists_id); $content = " " . $plItem->duration . "
".$plItem->title.""; //$content = "
Stop: {$plItem->stop_date}
Next:{$currentCellTimeNextDate}
$currentCellTimeNext >= $plItem->stop
" . $plItem->title; if ($time >= $plItem->start && $time <= $plItem->stop) { $class .= " playingNow "; } else if ($time >= $plItem->stop) { $class .= " finished "; } break; } } if ($colspan) { $colspan = " colspan='{$colspan}' "; } else { $colspan = ""; } $id = ""; if($firstColumns){ $firstColumns = false; $id = "id=\"col{$currentCellTime}\""; } echo ''; } } echo ""; } } } } ?>
' . $duration . '00:00
playlists_id, " ", $pl->getName(); ?>
' . $content . '