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 @@ ?> -「」を番組予約モードで録画予約します。
+「」を番組予約モードで録画予約します。
@@ -89,6 +76,5 @@ 放送局 - デジタル録画優先 - アナログビットレート + ビットレート @@ -100,19 +86,22 @@ FROM foltia_subtitle , foltia_program ,foltia_station WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid - AND foltia_program.tid = ? + AND foltia_program.tid ='$tid' ORDER BY stationrecch DESC "; -// $rs = m_query($con, $query, "DBクエリに失敗しました"); -$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); -$rowdata = $rs->fetch(); -if (! $rowdata) { + + $rs = m_query($con, $query, "DBクエリに失敗しました"); + $maxrows = pg_num_rows($rs); + + if ($maxrows == 0) { echo("放映局情報がまだはいってません
"); } else{ - $maxcols = $rs->columnCount(); + $maxcols = pg_num_fields($rs); echo("\n"); }//endif @@ -126,23 +115,4 @@ - - - - - "> +

 

@@ -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("放映予定はありません
"); } else{ - $maxcols = $rs->columnCount(); + $maxcols = pg_num_fields($rs); ?> @@ -207,15 +177,14 @@ \n"); + /* pg_fetch_row で一行取り出す */ + $rowdata = pg_fetch_row($rs, $row); + for ($col = 0; $col < $maxcols; $col++) { /* 列に対応 */ - if ($col == 3){ - echo("\n"); - }else{ echo("\n"); - } } echo("\n"); - } while ($rowdata = $rs->fetch()); + } }//end if ?>
".htmlspecialchars(foldate2print($rowdata[$col]))."
".htmlspecialchars($rowdata[$col])."