チェンジセット 94: trunk/install/php/reserveepg.php
- コミット日時:
- 2010/02/28 22:28:26 (15 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/php/reserveepg.php
r70 r94 56 56 stationname , stationrecch ,stationid 57 57 FROM foltia_epg , foltia_station 58 WHERE epgid ='$epgid'AND foltia_station.ontvcode = foltia_epg.ontvchannel58 WHERE epgid = ? AND foltia_station.ontvcode = foltia_epg.ontvchannel 59 59 ";//4812 60 $rs = m_query($con, $query, "DBクエリに失敗しました");61 $ maxrows = pg_num_rows($rs);62 63 if ($maxrows == 0) {60 // $rs = m_query($con, $query, "DBクエリに失敗しました"); 61 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($epgid)); 62 $rowdata = $rs->fetch(); 63 if (! $rowdata) { 64 64 die_exit("登録番組がありません<BR>"); 65 65 } 66 $rowdata = pg_fetch_row($rs, 0); 66 67 67 //$title = htmlspecialchars($rowdata[0]); 68 68 ?> … … 136 136 $query = " 137 137 SELECT 138 foltia_program .title, 139 foltia_program .tid, 140 stationname, 141 foltia_station.stationid , 142 foltia_subtitle.countno, 143 foltia_subtitle.subtitle, 144 foltia_subtitle.startdatetime , 145 foltia_subtitle.lengthmin , 146 foltia_tvrecord.bitrate , 147 foltia_subtitle.startoffset , 148 foltia_subtitle.pid 138 foltia_program.title, foltia_program.tid, stationname, 139 foltia_station.stationid, foltia_subtitle.countno, 140 foltia_subtitle.subtitle, foltia_subtitle.startdatetime, 141 foltia_subtitle.lengthmin, foltia_tvrecord.bitrate, 142 foltia_subtitle.startoffset, foltia_subtitle.pid 149 143 FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord 150 144 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 151 AND foltia_subtitle.startdatetime = '$startfoltime'152 AND foltia_subtitle.enddatetime = '$endfoltime'153 AND foltia_station.stationid = '$stationid'145 AND foltia_subtitle.startdatetime = ? 146 AND foltia_subtitle.enddatetime = ? 147 AND foltia_station.stationid = ? 154 148 UNION 155 149 SELECT 156 foltia_program .title, 157 foltia_program .tid, 158 stationname, 159 foltia_station.stationid , 160 foltia_subtitle.countno, 161 foltia_subtitle.subtitle, 162 foltia_subtitle.startdatetime , 163 foltia_subtitle.lengthmin , 164 foltia_tvrecord.bitrate , 165 foltia_subtitle.startoffset , 166 foltia_subtitle.pid 150 foltia_program.title, foltia_program.tid, stationname, 151 foltia_station.stationid, foltia_subtitle.countno, 152 foltia_subtitle.subtitle, foltia_subtitle.startdatetime, 153 foltia_subtitle.lengthmin, foltia_tvrecord.bitrate, 154 foltia_subtitle.startoffset, foltia_subtitle.pid 167 155 FROM foltia_tvrecord 168 156 LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) … … 170 158 LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) 171 159 WHERE foltia_tvrecord.stationid = 0 172 AND foltia_subtitle.startdatetime = '$startfoltime'173 AND foltia_subtitle.enddatetime = '$endfoltime'174 AND foltia_station.stationid = '$stationid'160 AND foltia_subtitle.startdatetime = ? 161 AND foltia_subtitle.enddatetime = ? 162 AND foltia_station.stationid = ? 175 163 "; 176 164 177 178 179 $rs = m_query($con, $query, "DBクエリに失敗しました");180 $maxrows = pg_num_rows($rs);181 182 165 //print "<!--$query \n $maxrows\n -->"; 183 166 184 167 print "<form name=\"recordingsetting\" method=\"POST\" action=\"reserveepgcomp.php\">\n"; 185 168 186 if ($maxrows == 0) { 169 //$rs = m_query($con, $query, "DBクエリに失敗しました"); 170 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($startfoltime,$endfoltime,$stationid,$startfoltime,$endfoltime,$stationid)); 171 $chkoverwrap = $rs->fetch(); 172 if (! $chkoverwrap) { 187 173 //重複なし 188 174 print "<input type=\"submit\" value=\"予約\" ><br>\n"; 189 175 }else{ 190 $chkoverwrap = pg_fetch_row($rs, 0);191 176 $prereservedtitle = htmlspecialchars($chkoverwrap[0]); 192 177 $tid = htmlspecialchars($chkoverwrap[1]);