- Timestamp:
- 2011/01/28 16:19:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Change.php
r20025 r20041 58 58 $this->arrSex = $masterData->getMasterData("mtb_sex"); 59 59 $this->httpCacheControl('nocache'); 60 60 61 61 // 生年月日選択肢の取得 62 62 $objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now"))); … … 64 64 $this->arrMonth = $objDate->getMonth(true); 65 65 $this->arrDay = $objDate->getDay(true); 66 66 67 67 $this->isMobile = Net_UserAgent_Mobile::isMobile(); 68 68 } … … 77 77 $this->sendResponse(); 78 78 } 79 79 80 80 /** 81 81 * Page のプロセス … … 85 85 $objDb = new SC_Helper_DB_Ex(); 86 86 $CONF = $objDb->sfGetBasisData(); 87 87 88 88 $objQuery = new SC_Query(); 89 89 $objCustomer = new SC_Customer(); 90 90 91 91 // ログインチェック 92 92 if (!$objCustomer->isLoginSuccess(true)){ … … 99 99 $this->CustomerPoint = $objCustomer->getvalue('point'); 100 100 } 101 101 102 102 // mobile用(戻るボタンでの遷移かどうかを判定) 103 103 if (!empty($_POST["return"])) { 104 104 $_POST["mode"] = "return"; 105 105 } 106 106 107 107 // パラメータ管理クラス,パラメータ情報の初期化 108 108 $this->objFormParam = new SC_FormParam(); 109 109 $this->lfInitParam(); 110 110 $this->objFormParam->setParam($_POST); // POST値の取得 111 112 111 112 113 113 if ($_SERVER["REQUEST_METHOD"] == "POST") { 114 114 115 115 //CSRF対策 116 116 /* … … 119 119 } 120 120 */ 121 121 122 122 $this->objFormParam->convParam(); 123 123 $this->objFormParam->toLower('email'); … … 126 126 $this->objFormParam->toLower('email_mobile02'); 127 127 $this->arrForm = $this->objFormParam->getHashArray(); 128 128 129 129 //-- 確認 130 if ($ _POST["mode"]== "confirm") {130 if ($this->getMode() == "confirm") { 131 131 132 132 $this->arrErr = $this->lfErrorCheck(); 133 133 134 134 // 入力エラーなし 135 135 if(count($this->arrErr) == 0) { 136 136 137 137 $this->list_data = $this->objFormParam->getHashArray(); 138 138 139 139 //パスワード表示 140 140 $passlen = strlen($this->arrForm['password']); 141 141 $this->passlen = SC_Utils_Ex::lfPassLen($passlen); 142 142 143 143 $this->tpl_mainpage = 'mypage/change_confirm.tpl'; 144 144 $this->tpl_title = '会員登録(確認ページ)'; 145 145 } 146 146 147 } elseif ($ _POST["mode"]== "complete") {147 } elseif ($this->getMode() == "complete") { 148 148 //-- 会員登録と完了画面 149 149 150 150 // 会員情報の登録 151 151 $this->CONF = $CONF; 152 152 $this->lfRegistData(); 153 153 154 154 // 完了ページに移動させる。 155 155 SC_Response_Ex::sendRedirect('change_complete.php'); 156 156 exit; 157 157 158 158 } 159 159 } else { … … 177 177 /* パラメータ情報の初期化 */ 178 178 function lfInitParam() { 179 179 180 180 $this->objFormParam->addParam("お名前(姓)", 'name01', STEXT_LEN, "aKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK")); 181 181 $this->objFormParam->addParam("お名前(名)", 'name02', STEXT_LEN, "aKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK")); … … 199 199 $this->objFormParam->addParam("日", "day", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false); 200 200 $this->objFormParam->addParam("メールマガジン", "mailmaga_flg", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK")); 201 201 202 202 if ($this->isMobile === false){ 203 203 $this->objFormParam->addParam("FAX番号1", 'fax01', TEL_ITEM_LEN, "n", array("SPTAB_CHECK")); … … 228 228 unset($objErr->arrErr['reminder_answer']); 229 229 } 230 230 231 231 $objErr->doFunc(array("お電話番号", "tel01", "tel02", "tel03"),array("TEL_CHECK")); 232 232 $objErr->doFunc(array("郵便番号", "zip01", "zip02"), array("ALL_EXIST_CHECK")); … … 239 239 $objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03") ,array("TEL_CHECK")); 240 240 } 241 241 242 242 // 現会員の判定 → 現会員もしくは仮登録中は、メアド一意が前提になってるので同じメアドで登録不可 243 243 $register_user_flg = SC_Helper_Customer_Ex::sfCheckRegisterUserFromEmail($arrRet["email"]); … … 254 254 return $objErr->arrErr; 255 255 } 256 256 257 257 function lfRegistData() { 258 258 259 259 $objQuery = new SC_Query(); 260 260 $objCustomer = new SC_Customer(); 261 261 262 262 $arrRet = $this->objFormParam->getHashArray(); 263 263 264 264 // 登録データの作成 265 265 $sqlval = $this->objFormParam->getDbArray(); 266 266 $sqlval['birth'] = SC_Utils_Ex::sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']); 267 267 268 268 $objQuery->begin(); 269 SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $objCustomer->getValue('customer_id')); 269 SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $objCustomer->getValue('customer_id')); 270 270 $objQuery->commit(); 271 271 } 272 272 273 273 /** 274 274 * 顧客情報の取得 … … 279 279 $objQuery = new SC_Query(); 280 280 $objCustomer = new SC_Customer(); 281 281 282 282 // 顧客情報DB取得 283 283 $ret = $objQuery->select("*","dtb_customer","customer_id=?", array($objCustomer->getValue('customer_id'))); … … 310 310 } 311 311 } 312 312 313 313 } 314 314 ?>
Note: See TracChangeset
for help on using the changeset viewer.