Example #1
0
function reserveCheckClass($con, $startdatetime, $enddatetime, $stationid, $nowdate)
{
    $reserve = reserveCheck($con, $startdatetime, $enddatetime, $stationid);
    $reservecheck = searchStartEndTime($reserve, $startdatetime, $enddatetime);
    $reservedClass = '';
    if ($nowdate < $startdatetime) {
        if ($reservecheck == 1 || $reservecheck == 2) {
            $reservedClass = ' class="reservedtitle"';
        }
    } else {
        if ($reservecheck == 1 || $reservecheck == 2) {
            $reservedClass = ' class="pastreservedtitle"';
        } else {
            $reservedClass = ' class="pasttitle"';
        }
    }
    return $reservedClass;
}
Example #2
0
} elseif ($progcat == "etc") {
    $progcat = 'その他';
} elseif ($progcat == "stage") {
    $progcat = '演劇';
}
$epgid = $epgid;
$stationid = htmlspecialchars($rowdata[10]);
if ($now > $endfoltime) {
    print "この番組はすでに終了しているため、録画されません。<br>";
} elseif ($now > $startfoltime) {
    print "この番組はすでに放映開始しているため、録画されません。<br>";
} elseif ($now > $startfoltime - 10) {
    print "この番組は放映直前なため、録画されない可能性があります。<br>";
}
print "<form name=\"recordingsetting\" method=\"POST\" action=\"reserveepgcomp.php\">\n";
$chkoverwrap = reserveCheck($con, $startfoltime, $endfoltime, $stationid);
$reserveCheck = searchStartEndTime($chkoverwrap, $startfoltime, $endfoltime);
if (!$chkoverwrap) {
    // 重複なし
    print "<input type=\"submit\" value=\"予約\" ><br>\n";
} else {
    if ($reserveCheck == 1) {
        print "<strong>この番組は既に予約済みです。</strong><br>\n";
    } else {
        if ($reserveCheck == 2) {
            print "<strong>この番組は既に一部予約済みです。</strong><br>\n";
        }
    }
    print '<table width="60%" style="width: 60%">';
    print '<tr><th>削除</th><th>予約番組名</th><th>開始</th><th>終了</th><th>尺(分)</th></tr>';
    foreach ($chkoverwrap as $item) {
Example #3
0
if (!$rowdata) {
    // 番組データがない
    $colmnums = 2;
} else {
    $colmnums = 0;
    do {
        $colmnums++;
        $timetablehash[$rowdata[0]] = $colmnums;
        //print "$rowdata[0]:$i+1 <br>\n";
    } while ($rowdata = $rs->fetch());
}
//print "colmnums $colmnums <br>\n";
//・局ごとに縦に配列入れていく
foreach ($stationhash as $stationname) {
    $stationid = $stationinfo[$stationname]['stationid'];
    $reserve = reserveCheck($con, $epgstart, $epgend, $stationid);
    $query = "\n\t  SELECT\n        startdatetime,\n        enddatetime,\n        lengthmin,\n        epgtitle,\n        epgdesc,\n        epgcategory,\n        ontvchannel,\n        epgid,\n        epgcategory\n      FROM foltia_epg\n      WHERE foltia_epg.ontvchannel = ?\n        AND enddatetime  > ?\n        AND startdatetime  < ?\n\t  ORDER BY foltia_epg.startdatetime  ASC";
    $statiodh = sql_query($con, $query, "DBクエリに失敗しました", array($stationname, $epgstart, $epgend));
    $stationrowdata = $statiodh->fetch();
    if (!$stationrowdata) {
        $item[0]["{$stationname}"] = ">番組データがありません";
    } else {
        do {
            $startdatetime = $stationrowdata['startdatetime'];
            $enddatetime = $stationrowdata['enddatetime'];
            $printstarttime = substr($startdatetime, 8, 2) . ':' . substr($startdatetime, 10, 2);
            $tdclass = 't' . substr($startdatetime, 8, 2) . substr($startdatetime, 10, 2);
            $title = $stationrowdata['epgtitle'];
            $title = htmlspecialchars(z2h($title));
            $desc = $stationrowdata['epgdesc'];
            $desc = htmlspecialchars(z2h($desc));