foltia:EPG予約:Error\n"; die_exit("登録番組がありません
"); } print " foltia:EPG予約:$epgid \n"; $now = date("YmdHi"); //タイトル取得 $query = " SELECT epgid,startdatetime,enddatetime,lengthmin, ontvchannel,epgtitle,epgdesc,epgcategory , stationname , stationrecch ,stationid FROM foltia_epg , foltia_station WHERE epgid='$epgid' AND foltia_station.ontvcode = foltia_epg.ontvchannel ";//4812 $rs = m_query($con, $query, "DBクエリに失敗しました"); $maxrows = pg_num_rows($rs); if ($maxrows == 0) { die_exit("登録番組がありません
"); } $rowdata = pg_fetch_row($rs, 0); //$title = htmlspecialchars($rowdata[0]); ?>

番組予約


EPGから下記番組を録画予約します。
$endfoltime){ print "この番組はすでに終了しているため、録画されません。
"; }elseif($now > $startfoltime){ print "この番組はすでに放映開始しているため、録画されません。
"; }elseif($now > ($startfoltime - 10) ){ print "この番組は放映直前なため、録画されない可能性があります。
"; } //重複確認 $query = " SELECT foltia_program .title, foltia_program .tid, stationname, foltia_station.stationid , foltia_subtitle.countno, foltia_subtitle.subtitle, foltia_subtitle.startdatetime , foltia_subtitle.lengthmin , foltia_tvrecord.bitrate , foltia_subtitle.startoffset , foltia_subtitle.pid FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid AND foltia_subtitle.startdatetime ='$startfoltime' AND foltia_subtitle.enddatetime = '$endfoltime' AND foltia_station.stationid = '$stationid' UNION SELECT foltia_program .title, foltia_program .tid, stationname, foltia_station.stationid , foltia_subtitle.countno, foltia_subtitle.subtitle, foltia_subtitle.startdatetime , foltia_subtitle.lengthmin , foltia_tvrecord.bitrate , foltia_subtitle.startoffset , foltia_subtitle.pid FROM foltia_tvrecord LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) LEFT OUTER JOIN foltia_program on (foltia_tvrecord.tid = foltia_program.tid ) LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) WHERE foltia_tvrecord.stationid = 0 AND foltia_subtitle.startdatetime ='$startfoltime' AND foltia_subtitle.enddatetime = '$endfoltime' AND foltia_station.stationid = '$stationid' "; $rs = m_query($con, $query, "DBクエリに失敗しました"); $maxrows = pg_num_rows($rs); //print ""; print "
\n"; if ($maxrows == 0) { //重複なし print "
\n"; }else{ $chkoverwrap = pg_fetch_row($rs, 0); $prereservedtitle = htmlspecialchars($chkoverwrap[0]); $tid = htmlspecialchars($chkoverwrap[1]); $pid = htmlspecialchars($chkoverwrap[2]); print "
この番組は既に予約済みです。 \n"; if ($tid > 1){ print "予約番組名:$prereservedtitle
\n"; }else{ print "予約方法:EPG録画
\n"; } } print "
放送局$stationjname
放送開始$startprinttime
放送終了$endprinttime
尺(分)$lengthmin
放送チャンネル$recch
番組名$progname
内容$progdesc
ジャンル$progcat
番組ID$epgid
局コード$stationid
"; ?>