• You are in the debug mode...

  • "); } // 変数の宣言 // added by Hajime Okazaki if (!isset($page_title) || $page_title == ""){ $page_title = "名称未設定( " . $current_dir_name . " 一覧)"; //hoge_definition.phpで未定義の際のメッセージ //このタイトルが出る場合は, $page_titleをdefinitionで定義してください。 } else { $page_title = $page_title . "(一覧)"; } $page_mode = 0; // n件進先へ/前へボタンを押下フラグの初期化 $button_disable_next = 0; // 次へボタンの非表示フラグ $button_disable_back = 0; // 前へボタンの非表示フラグ $loops_row = 0; // 表示する行数を格納する変数(動的) $count = 0;// 新着一覧ループwhile脱出カウント用 $stripe = 0; // ページング対応 // written by Hajime Okazaki $sel_y = ""; // 年 $sel_m = ""; // 月 $page_disp = 0; // 現在のページ番号の初期化(POSTで渡される前に初期化) // 直前のページ数を知る $page_disp = isset($_POST['page_disp'])?($_POST['page_disp']):0; // POSTパラメータより現在のページ数を取得(三項演算) if($page_disp == 0){ // もしページ数指定がなければ1ページとする。 $page_disp = 1; } if (isset($_POST['page_back'])){ // もし"前のn件"を押されたら //debug if ($debug_flg==1){ echo ("You pushed page_back...
    "); } $page_disp--; $page_mode = 1; } else if (isset($_POST['page_fwd'])){ // もし"次のn件"を押されたら //debug if ($debug_flg==1){ echo ("You pushed page_fwd...
    "); } $page_disp++; $page_mode = 1; } else if(isset($_POST['page_newer'])){ // もし"最新のn件"を押されたら //debug if ($debug_flg==1){ echo ("Now is newer mode.
    "); } $page_disp = 1; //最初のページに戻す $page_mode = 0; $sel_y = ""; // 年。空代入の明示。 $sel_m = ""; // 月。空代入の明示。 } // 年月の変数格納 if (isset($_POST['year']) && isset($_POST['month']) && !isset($_POST['page_newer'])){ //debug if ($debug_flg==1){ echo ("Now is not newer mode.
    "); } $sel_y = $_POST['year']; $sel_m = $_POST['month']; } //debug if ($debug_flg==1){ echo ("The page no. is [".$page_disp."]
    "); } $result_from = ($disp_list_limit * ($page_disp - 1)); // dbから取得する件数の始まり //debug if ($debug_flg==1){ echo ("The result_from val. is [".$result_from."]
    "); } $result_limit = $disp_list_limit + 1; // dbから取得する件数 //debug if ($debug_flg==1){ echo ("The result_limit val. is [".$result_limit."]
    "); } //if (isset($_POST['year']) && isset($_POST['month']) && $page_mode == 0){ if ($sel_y != "" && $sel_m != "" && $page_mode == 0){ //debug if ($debug_flg==1){ echo ("year/month parameter detected. page_mode is disabled.
    "); } $target_term = mysql_real_escape_string($_POST['year']) . '-' . ($_POST['month'] < 10 ? '0' : '') . mysql_real_escape_string($_POST['month']) . '-%'; $qry = "SELECT * FROM $tableName WHERE ($publicFlag = '1') AND ($updateDate LIKE '$target_term') ORDER BY $updateDate DESC LIMIT $result_from,$result_limit;"; $sel_y = $_POST['year']; $sel_m = $_POST['month']; } else { $qry = "SELECT * FROM $tableName WHERE $publicFlag = '1' ORDER BY $updateDate DESC LIMIT $result_from,$result_limit;"; //debug if ($debug_flg==1){ echo ("The SQL query_text is[".$qry."]
    "); } $sel_y = date('Y'); $sel_m = date('n'); } $res = mysql_query($qry, $con); $art_empty = mysql_num_rows($res)==0?TRUE:FALSE; //SQL問い合わせ結果の行数を知る $num_column = mysql_num_rows($res); //debug if ($debug_flg==1){ echo ("The number of column is [".$num_column."]
    "); } //指定されたページあたり行数($disp_list_limit)+1に満たない場合, 次へボタンを表示させないフラグを立てる(最後のページ処理) if ($num_column == ($disp_list_limit + 1)){ // リミット+1で問い合わせして結果がそのとおりなら $button_disable_next = 1; //次へボタンを表示しないフラグをセットする $loops_row = $num_column - 1; //表示行数をクエリー結果行数-1にセット } else { $button_disable_next = 0; //次へボタンを表示しないフラグをセットしない $loops_row = $num_column; //表示行数をクエリー結果行数のままセット } // 最初のページでは, 前へボタンを表示させない if ($page_disp > 1){ $button_disable_back = 1; } //debug if ($debug_flg==1){ echo ("A flag of The next button is [".$button_disable_next."]
    "); echo ("A flag of The back button is [".$button_disable_back."]
    "); } require_once("list.php"); ?>