global $name;
require("./lib/const.php"); // DB接続
require("./common/env.php");
session_start();
$_SESSION["name"]= $name;
$name_ses = $_SESSION["name"];
if($name != $name_ses) {
$m_url=$m_url."./error.htm";
header("Location: ".$m_url);
exit();
}
if($name ==""){
$m_url=$m_url."./error.htm";
header("Location: ".$m_url);
exit();
}
$PC_NAME = $name;
SetCookie ("PC_NAME","$PC_NAME",time()+60*60*24*30,"/","");
$arrBookid = array();
$arrTitle = array();
$arrAuther = array();
$arrRecommend = array();
$newURL = "./bookupdate.php";
$updURL = "./bookupdate.php?bookid=";
// bookshelf テーブルから値取得
$SQL = "SELECT bookid, title, auther, recommend FROM bookshelf WHERE delFlg=0 ORDER BY bookid";
$result = mysql_query($SQL);
if($result == FALSE) {
echo "データベースエラー!\n";
exit;
}
$num_rows = mysql_num_rows($result); // 取得レコード件数
$i = 0;
while($row = mysql_fetch_array($result)){ // 取得結果を配列に保存
$arrBookid[$i] = $row[0];
$arrTitle[$i] = $row[1];
$arrAuther[$i] = $row[2];
$arrRecommend[$i] = $row[3];
$i++;
}
mysql_free_result($result);
require("./lib/concls.php"); // DB切断
$hour = date( "H" );
if( $hour <= 3 ){
$time_msg="遅い時間にこんばんわ。";
} elseif (( $hour >= 4 )&&( $hour <= 11 )) {
$time_msg="おはようございます。";
} elseif (( $hour >= 19 )&&( $hour <= 24 )) {
$time_msg="こんばんわ。";
} else {
$time_msg="こんにちわ。";
}
?>
ホームページ制作会社-ユタデザイン-
echo $name; ?>様
echo $time_msg; ?>
【ユタデザイン読破書籍の一覧表示】
書籍検索 新規登録 このウインドを閉じる プログラムのトップページに戻る
本のタイトルをクリックするとお薦め度を変更することができます。
| N0. |
タイトル |
著者 |
オススメ度 |
$roop = 1;
$i = 0;
$nextURL = "";
for($i=0; $i<$num_rows; $i++) {
$nextURL = $updURL . $arrBookid[$i];
print("");
print("| $roop | ");
print("$arrTitle[$i] | ");
print("$arrAuther[$i] | ");
print("$arrRecommend[$i] | ");
print("
");
$roop++;
}
?>
このウインドを閉じる