/************************************************************* ファイル名:cont_mat_2.php -------------------------------------------------------------- 内 容:レシピ投稿材料(後半) -------------------------------------------------------------- 作成者:亘 作成日:2005.02.01 -------------------------------------------------------------- 備 考: **************************************************************/ require_once('../prepare.php'); require_once('../config.php'); require_once('./lib/config_bbs.php'); require_once('./lib/bbs_function.php'); //- メンバーチェック if("e" == $p['carrier']){ chdir(dirname(__FILE__) . "/authcheck"); require_once("../authcheck/authcheck.php"); chdir(dirname(__FILE__)); } $db = u4user_open(); if(!($user_prof = get_UserDetail_uid($db, $p['uid'], '0', '1')) && MEMBER_CHECK){ header("Location: " . MEMBER_REGIST_URL . "?p[contents]=" . substr(strrchr(dirname( __FILE__ ) , '/'), 1)); exit; } if($user_prof['mem_nick_nm']==""){ $arg = "?contents=bbs"; switch($p['carrier']){ case "i": $arg .= "&uid=NULLGWDOCOMO"; break; } header("Location: ".KTY_BASE_URL."/signup/prof_input.php".$arg); exit; } /* //- 会員登録チェック開始 $db_member = u4user_open(); $user_prof = bsc_get_user_profile($db_member,$p['uid'],'0'); u4user_close($db_member); if(!$user_prof){ $p['contents'] = "bbs"; $p['template'] = "user_regist.html"; // require_once("./user_regist.php"); header("Location: ".BSC_BASE_URL."signup/free_reg_top.php?uid=NULLGWDOCOMO&p[contents]=bbs"); exit; } //- 会員登録チェック終了 //- メールアドレス登録チェック ---- !! テスト時はスルー 本番移行時に稼動 if(empty($user_prof['mem_eml']) && $_SERVER['REMOTE_ADDR'] != '219.118.172.30'){ $p['contents'] = "cart"; $p['template'] = "mail_send.html"; header("Location: ".BSC_BASE_URL."mail_reg/mail_send.php?uid=NULLGWDOCOMO&p[contents]=bbs"); exit; } */ function bbs_post2_1($p) { bsc_session(); // session_start(); if(constant('BBS_DEBUG_MODE')){ print "
bbs_post2_1 Head -> "; var_dump($_SESSION); print ""; } // パラメータ引数を一度すべてセッションに foreach($p as $key => $val){ $_SESSION['param'][$key] = $val; } // 通常画面遷移のときデフォルト値セット // 引数チェックはcont_sessionで if(preg_match('/tonari_post2.php/',$_SESSION['page']['pre'])){ $_SESSION['page']['pre'] = $_SESSION['page']['now']; $_SESSION['page']['now'] = 'bbs_post2_1.php'; for($i=6;$i<=10;$i++){ // 画面遷移が通常であり、なおかつ配列が存在しない場合 if(!array_key_exists('material'.$i,$_SESSION['param'])){ $_SESSION['param']['material'.$i] = ""; } if(!array_key_exists('amount'.$i,$_SESSION['param'])){ $_SESSION['param']['amount'.$i] = ""; } if(!array_key_exists('unit'.$i,$_SESSION['param'])){ $_SESSION['param']['unit'.$i] = ""; } } } $template =& loadTemplate( $p ); // 材料、分量、分量単位についてデフォルト値をセット for($i=6;$i<=10;$i++){ $template->setVariable('material'.$i,$_SESSION['param']['material'.$i]); $template->setVariable('amount'.$i,$_SESSION['param']['amount'.$i]); if((!array_key_exists('unit'.$i,$_SESSION['param'])) or ($_SESSION['param']['unit'.$i] == "")){ $unit_val = "1"; }else{ $unit_val = $_SESSION['param']['unit'.$i]; } } // 分量単位配列取得 $unit_arr = get_select_unit_arr(); // 分量単位プルダウン作成 for($i=6;$i<=10;$i++){ $unit_list = ""; $unit_list = bbs_create_select("unit".$i,$unit_val,$unit_arr); $template->setVariable('unit'.$i,$unit_list); } $this->db = cs4_open(); // 単位プルダウン用HTML $select_unit = get_select_unit(); $template->setVariable('contents_top',TONARI_NAME); // $template->setVariable('bbs_top_url',BSC_BASE_URL.'bbs/bbs_top.php'); //$template->setVariable('amount_list',$amount_list); $template->setVariable('second_button',SUBMIT_MAT_CHAR_SECOND); $template->setVariable('next_button',SUBMIT_MAT_CHAR_NEXT); $template->show(); if(constant('BBS_DEBUG_MODE')){ print "
bbs_post2_1 After -> "; print_r($_SESSION); print ""; } } bbs_post2_1($p); ?>