- Timestamp:
- 2011/01/18 20:06:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Favorite.php
r19908 r19959 30 30 * @package Page 31 31 * @author LOCKON CO.,LTD. 32 * @version $Id: LC_Page_Mypage.php 16582 2007-10-29 03:06:29Z nanasess$32 * @version $Id: $ 33 33 */ 34 34 class LC_Page_MyPage_Favorite extends LC_Page { … … 74 74 function action() { 75 75 76 //$objView = new SC_SiteView();77 76 $objQuery = new SC_Query(); 78 77 $objCustomer = new SC_Customer(); 79 78 80 79 // 退会判定用情報の取得 81 $this->tpl_login = $objCustomer->isLoginSuccess( );80 $this->tpl_login = $objCustomer->isLoginSuccess(true); 82 81 83 82 // ログインチェック 84 if(!$objCustomer->isLoginSuccess( )) {83 if(!$objCustomer->isLoginSuccess(true)) { 85 84 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 86 85 }else { … … 139 138 // 入力情報を渡す 140 139 $this->arrForm = $this->objFormParam->getFormParamList(); 141 //$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納142 //$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行143 }144 145 /**146 * モバイルページを初期化する.147 *148 * @return void149 */150 function mobileInit() {151 $this->init();152 $this->tpl_mainpage = 'mypage/favorite.tpl';153 $this->tpl_title = 'MYページ/お気に入り一覧';154 }155 156 /**157 * Page のプロセス(モバイル).158 *159 * @return void160 */161 function mobileProcess() {162 parent::mobileProcess();163 $this->mobileAction();164 $this->sendResponse();165 }166 167 /**168 * Page のAction(モバイル).169 *170 * @return void171 */172 function mobileAction() {173 //$objView = new SC_MobileView();174 $objQuery = new SC_Query();175 $objCustomer = new SC_Customer();176 // クッキー管理クラス177 $objCookie = new SC_Cookie(COOKIE_EXPIRE);178 // パラメータ管理クラス179 $objFormParam = new SC_FormParam();180 // パラメータ情報の初期化181 $this->lfInitParamMobile($objFormParam);182 // POST値の取得183 $objFormParam->setParam($_POST);184 185 // 携帯端末IDが一致する会員が存在するかどうかをチェックする。186 $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();187 188 if (!isset($_POST['mode'])) $_POST['mode'] = "";189 190 // ログイン処理191 if($_POST['mode'] == 'login') {192 $objFormParam->toLower('login_email');193 $arrErr = $objFormParam->checkError();194 $arrForm = $objFormParam->getHashArray();195 196 // クッキー保存判定197 if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {198 $objCookie->setCookie('login_email', $_POST['login_email']);199 } else {200 $objCookie->setCookie('login_email', '');201 }202 203 if (count($arrErr) == 0){204 if($objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) ||205 $objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {206 // ログインが成功した場合は携帯端末IDを保存する。207 $objCustomer->updateMobilePhoneId();208 209 /*210 * email がモバイルドメインでは無く,211 * 携帯メールアドレスが登録されていない場合212 */213 $objMobile = new SC_Helper_Mobile_Ex();214 if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {215 if (!$objCustomer->hasValue('email_mobile')) {216 SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');217 }218 }219 } else {220 $objQuery = new SC_Query;221 $where = "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";222 $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));223 224 if($ret > 0) {225 SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);226 } else {227 SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);228 }229 }230 }231 }232 233 // TODO objViewを分けるので、$thisに置き換える TPLの修正が必須かな?234 /*235 * ログインチェック236 * 携帯メールの登録を必須にする場合は isLoginSuccess(false) にする237 */238 if(!$objCustomer->isLoginSuccess(true)) {239 $this->tpl_mainpage = 'mypage/login.tpl';240 $objView->assignArray($objFormParam->getHashArray());241 if (empty($arrErr)) $arrErr = array();242 $objView->assignArray(array("arrErr" => $arrErr));243 }else {244 //マイページトップ顧客情報表示用245 $this->CustomerName1 = $objCustomer->getvalue('name01');246 $this->CustomerName2 = $objCustomer->getvalue('name02');247 }248 249 //$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納250 //$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行251 252 140 } 253 141 … … 270 158 } 271 159 272 /* パラメータ情報の初期化 */273 function lfInitParamMobile(&$objFormParam) {274 275 $objFormParam->addParam("記憶する", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));276 $objFormParam->addParam("メールアドレス", "login_email", MTEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));277 $objFormParam->addParam("パスワード", "login_pass", STEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));278 }279 280 160 // お気に入り商品削除 281 161 function lfDeleteFavoriteProduct($customer_id, $product_id) { … … 289 169 } 290 170 } 291 292 293 294 171 } 295 172 ?>
Note: See TracChangeset
for help on using the changeset viewer.