チェンジセット 94: trunk/install/php/delreserve.php
- コミット日時:
- 2010/02/28 22:28:26 (15 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/php/delreserve.php
r70 r94 44 44 <?php 45 45 46 47 $tid = getgetnumform(tid); 46 $tid = getgetnumform("tid"); 48 47 if ($tid == "") { 49 48 die_exit("番組がありません<BR>"); 50 49 } 51 $sid = getgetnumform(sid);50 $sid = getgetnumform("sid"); 52 51 if ($sid == "") { 53 52 die_exit("局がありません<BR>"); … … 70 69 foltia_tvrecord.stationid 71 70 FROM foltia_tvrecord , foltia_program , foltia_station 72 WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; 73 74 $rs = m_query($con, $query, "DBクエリに失敗しました"); 75 $maxrows = pg_num_rows($rs); 76 77 if ($maxrows == 0) { 71 WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? "; 72 73 // $rs = m_query($con, $query, "DBクエリに失敗しました"); 74 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); 75 $rowdata = $rs->fetch(); 76 77 if (! $rowdata ) { 78 78 die_exit("登録番組がありません<BR>"); 79 79 } 80 $rowdata = pg_fetch_row($rs, 0);81 82 80 $tid = htmlspecialchars($rowdata[0]); 83 81 $stationname = htmlspecialchars($rowdata[1]); … … 107 105 DELETE 108 106 FROM foltia_tvrecord 109 WHERE foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; 110 $rs = m_query($con, $query, "DBクエリに失敗しました"); 107 WHERE foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? "; 108 $rs->closeCursor(); 109 // $rs = m_query($con, $query, "DBクエリに失敗しました"); 110 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); 111 111 } 112 112 … … 164 164 FROM foltia_subtitle , foltia_program ,foltia_station 165 165 WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid 166 AND foltia_subtitle.startdatetime >= '$now' AND foltia_program.tid ='$tid'166 AND foltia_subtitle.startdatetime >= ? AND foltia_program.tid = ? 167 167 ORDER BY foltia_subtitle.startdatetime ASC 168 168 "; 169 $rs = m_query($con, $query, "DBクエリに失敗しました");170 $ maxrows = pg_num_rows($rs);171 172 if ($maxrows == 0) {169 // $rs = m_query($con, $query, "DBクエリに失敗しました"); 170 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($now,$tid)); 171 $rowdata = $rs->fetch(); 172 if (! $rowdata) { 173 173 echo("放映予定はありません<BR>"); 174 } 175 else{ 176 $maxcols = pg_num_fields($rs); 174 }else{ 175 $maxcols = $rs->columnCount(); 177 176 ?> 178 177 <table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%" BGCOLOR="#bcf1be"> … … 192 191 <?php 193 192 /* テーブルのデータを出力 */ 194 for ($row = 0; $row < $maxrows; $row++) { /* 行に対応 */193 do { 195 194 echo("<tr>\n"); 196 /* pg_fetch_row で一行取り出す */197 $rowdata = pg_fetch_row($rs, $row);198 199 195 for ($col = 0; $col < $maxcols; $col++) { /* 列に対応 */ 200 196 echo("<td>".htmlspecialchars($rowdata[$col])."<br></td>\n"); 201 197 } 202 198 echo("</tr>\n"); 203 }199 } while ($row = $rs->fetch()); 204 200 }//end if 205 201 ?>