Index: trunk/install/php/reserveprogram.php
===================================================================
--- trunk/install/php/reserveprogram.php (リビジョン 128)
+++ trunk/install/php/reserveprogram.php (リビジョン 1)
@@ -15,19 +15,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
-
?>
@@ -43,4 +28,5 @@
fetch();
-if (! $rowdata) {
+ $query = "select title from foltia_program where tid='$tid'";
+ $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]);
?>
@@ -80,5 +67,5 @@
?>
-「」を番組予約モードで録画予約します。
+「=$title?>」を番組予約モードで録画予約します。
@@ -89,6 +76,5 @@
@@ -179,15 +149,15 @@ FROM foltia_subtitle , foltia_program ,foltia_station WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid - AND foltia_subtitle.startdatetime >= ? AND foltia_program.tid = ? + AND foltia_subtitle.startdatetime >= '$now' AND foltia_program.tid ='$tid' ORDER BY foltia_subtitle.startdatetime ASC "; -// $rs = m_query($con, $query, "DBクエリに失敗しました"); -$rs = sql_query($con, $query, "DBクエリに失敗しました",array($now,$tid)); -$rowdata = $rs->fetch(); -if (! $rowdata) { + $rs = m_query($con, $query, "DBクエリに失敗しました"); + $maxrows = pg_num_rows($rs); + + if ($maxrows == 0) { echo("放映予定はありません
".htmlspecialchars(foldate2print($rowdata[$col]))." | \n");
- }else{
echo("".htmlspecialchars($rowdata[$col])." | \n");
- }
}
echo("\n");
- } while ($rowdata = $rs->fetch());
+ }
}//end if
?>