- Timestamp:
- 2007/08/30 10:29:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/inquiry/LC_Page_Inquiry.php
r15090 r15443 10 10 11 11 /** 12 * XXXのページクラス.12 * アンケート のページクラス. 13 13 * 14 14 * @package Page … … 18 18 class LC_Page_Inquiry extends LC_Page { 19 19 20 // {{{ properties21 22 // TODO23 var $errmsg;24 var $arrPref;25 26 var $QUESTION;27 var $question_id;28 29 20 // }}} 30 21 // {{{ functions … … 54 45 55 46 // 都道府県プルダウン用配列 56 $objPage->arrPref = $arrPref; 47 $masterData = new SC_DB_MasterData_Ex(); 48 $this->arrPrfef = $masterData->getMasterData("mtb_pref", 49 array("pref_id", "pref_name", "rank")); 57 50 58 51 // CSV保存項目 … … 85 78 $sql = "SELECT question_id, question FROM dtb_question WHERE question_id = ?"; 86 79 $result = $conn->getAll( $sql, array($_REQUEST['question_id']) ); 87 $ objPage->QUESTION =lfGetArrInput( unserialize( $result[0]['question'] ) );88 89 $ objPage->question_id = $_REQUEST['question_id'];90 91 $ objPage->arrHidden =sfMakeHiddenArray($_POST);92 unset($ objPage->arrHidden['mode']);93 94 if ( (int)$ objPage->QUESTION["delete"] !== 0 ){80 $this->QUESTION = $this->lfGetArrInput( unserialize( $result[0]['question'] ) ); 81 82 $this->question_id = $_REQUEST['question_id']; 83 84 $this->arrHidden = SC_Utils_Ex::sfMakeHiddenArray($_POST); 85 unset($this->arrHidden['mode']); 86 87 if ( (int)$this->QUESTION["delete"] !== 0 ){ 95 88 96 89 $objPage->tpl_mainpage = "inquiry/closed.tpl"; … … 99 92 100 93 //-- 入力エラーチェック 101 $ objPage->arrForm = $_POST;102 $ objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn);103 $ objPage->arrErr = lfErrorCheck($objPage->arrForm);104 $ objPage->arrErr = lfGetArrInput($objPage->arrErr);105 106 if( ! $ objPage->arrErr ) {107 $ objPage->tpl_mainpage = "inquiry/confirm.tpl";94 $this->arrForm = $_POST; 95 $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn); 96 $this->arrErr = $this->lfErrorCheck($this->arrForm); 97 $this->arrErr = $this->lfGetArrInput($this->arrErr); 98 99 if( ! $this->arrErr ) { 100 $this->tpl_mainpage = "inquiry/confirm.tpl"; 108 101 } 109 102 110 103 111 104 }elseif( $_POST['mode'] == "return"){ 112 $ objPage->arrForm = $_POST;105 $this->arrForm = $_POST; 113 106 114 107 }elseif( $_POST['mode'] == "regist" ) { 115 108 116 109 //-- 入力文字・変換&エラーチェック 117 $ objPage->arrForm = $_POST;118 $ objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn);119 $ objPage->arrErr = lfErrorCheck($objPage->arrForm);120 $ objPage->arrErr = lfGetArrInput($objPage->arrErr);121 122 123 if( ! $ objPage->arrErr ) {110 $this->arrForm = $_POST; 111 $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn); 112 $this->arrErr = $this->lfErrorCheck($this->arrForm); 113 $this->arrErr = $this->GGlfGetArrInput($this->arrErr); 114 115 116 if( ! $this->arrErr ) { 124 117 125 118 //完了画面 126 $ objPage->tpl_mainpage = "inquiry/complete.tpl";119 $this->tpl_mainpage = "inquiry/complete.tpl"; 127 120 128 121 … … 130 123 131 124 // テーブルに入れるように整形する 132 $arrOption = $ objPage->arrForm['option'];133 unset ($ objPage->arrForm['email02']);134 $ objPage->arrForm['mail01'] = $objPage->arrForm['email'];135 unset ($ objPage->arrForm['email']);136 unset ($ objPage->arrForm['option']);137 $ objPage->arrForm['question_id'] = $objPage->question_id;138 $ objPage->arrForm['question_name'] = $objPage->QUESTION['title'];125 $arrOption = $this->arrForm['option']; 126 unset ($this->arrForm['email02']); 127 $this->arrForm['mail01'] = $this->arrForm['email']; 128 unset ($this->arrForm['email']); 129 unset ($this->arrForm['option']); 130 $this->arrForm['question_id'] = $this->question_id; 131 $this->arrForm['question_name'] = $this->QUESTION['title']; 139 132 for ( $i=0; $i<(count($arrOption)); $i++ ){ 140 133 $tmp = ""; … … 144 137 $tmp .= $arrOption[$i][$j]; 145 138 } 146 $ objPage->arrForm['question0'.($i+1)] = $tmp;139 $this->arrForm['question0'.($i+1)] = $tmp; 147 140 } else { 148 $ objPage->arrForm['question0'.($i+1)] = $arrOption[$i];141 $this->arrForm['question0'.($i+1)] = $arrOption[$i]; 149 142 } 150 143 } 151 $ objPage->arrForm['create_date'] = "now()";144 $this->arrForm['create_date'] = "now()"; 152 145 // DB登録 153 146 $objQuery = new SC_Query(); 154 $objQuery->insert("dtb_question_result", $ objPage->arrForm );147 $objQuery->insert("dtb_question_result", $this->arrForm ); 155 148 156 149 //--------- ▲ SQL ---------// … … 159 152 } 160 153 161 $ objPage->cnt_question = 6;162 $ objPage->arrActive = $arrActive;163 $ objPage->arrQuestion = $arrQuestion;154 $this->cnt_question = 6; 155 $this->arrActive = $arrActive; 156 $this->arrQuestion = $arrQuestion; 164 157 165 158 166 159 //---- ページ表示 167 160 $objView->_smarty->register_function("lfArray_Search_key_Smarty","lfArray_Search_key_Smarty"); 168 $objView->assignobj($ objPage);169 $objView->display($ objPage->tpl_mainpage);161 $objView->assignobj($this); 162 $objView->display($this->tpl_mainpage); 170 163 } 171 164
Note: See TracChangeset
for help on using the changeset viewer.