Index: trunk/install/php/delreserve.php
===================================================================
--- trunk/install/php/delreserve.php (リビジョン 128)
+++ trunk/install/php/delreserve.php (リビジョン 1)
@@ -17,19 +17,4 @@
*/
-
-include("./foltialib.php");
-$con = m_connect();
-
-if ($useenvironmentpolicy == 1){
-if (!isset($_SERVER['PHP_AUTH_USER'])) {
- header("WWW-Authenticate: Basic realm=\"foltia\"");
- header("HTTP/1.0 401 Unauthorized");
- redirectlogin();
- exit;
-} else {
-login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']);
-}
-}//end if login
-
?>
@@ -44,13 +29,16 @@
");
}
- $sid = getgetnumform("sid");
+$sid = getgetnumform(sid);
if ($sid == "") {
die_exit("局がありません
");
}
+$con = m_connect();
$now = date("YmdHi");
?>
@@ -69,13 +57,14 @@
foltia_tvrecord.stationid
FROM foltia_tvrecord , foltia_program , foltia_station
-WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? ";
+WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid ";
-// $rs = m_query($con, $query, "DBクエリに失敗しました");
- $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid));
-$rowdata = $rs->fetch();
-
-if (! $rowdata ) {
+ $rs = m_query($con, $query, "DBクエリに失敗しました");
+ $maxrows = pg_num_rows($rs);
+
+ if ($maxrows == 0) {
die_exit("登録番組がありません
");
}
+ $rowdata = pg_fetch_row($rs, 0);
+
$tid = htmlspecialchars($rowdata[0]);
$stationname = htmlspecialchars($rowdata[1]);
@@ -105,8 +94,6 @@
DELETE
FROM foltia_tvrecord
-WHERE foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? ";
-$rs->closeCursor();
-// $rs = m_query($con, $query, "DBクエリに失敗しました");
- $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid));
+WHERE foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid ";
+ $rs = m_query($con, $query, "DBクエリに失敗しました");
}
@@ -128,7 +115,7 @@
".htmlspecialchars($rowdata[$col])." | \n");
}
echo("\n");
- } while ($row = $rs->fetch());
+ }
}//end if
?>