Changeset 19881 for branches/version-2_5-dev/data/class
- Timestamp:
- 2011/01/12 12:12:16 (15 years ago)
- Location:
- branches/version-2_5-dev/data/class
- Files:
-
- 9 edited
-
helper/SC_Helper_Customer.php (modified) (1 diff)
-
pages/entry/LC_Page_Entry.php (modified) (4 diffs)
-
pages/mypage/LC_Page_Mypage.php (modified) (4 diffs)
-
pages/mypage/LC_Page_Mypage_ChangeComplete.php (modified) (2 diffs)
-
pages/mypage/LC_Page_Mypage_History.php (modified) (8 diffs)
-
pages/mypage/LC_Page_Mypage_HistoryDetail.php (modified) (3 diffs)
-
pages/mypage/LC_Page_Mypage_Order.php (modified) (1 diff)
-
pages/mypage/LC_Page_Mypage_Refusal.php (modified) (8 diffs)
-
pages/mypage/LC_Page_Mypage_RefusalComplete.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php
r19864 r19881 94 94 } 95 95 96 /** 97 * emailアドレスから、登録済み会員や退会済み会員をチェックする 98 * 99 * @param string $email メールアドレス 100 * @return integer 0:登録可能 1:登録済み 2:再登録制限期間内削除ユーザー 101 */ 102 function lfCheckRegisterUserFromEmail($email){ 103 $return = 0; 104 105 $objQuery =& SC_Query::getSingletonInstance(); 106 $arrRet = $objQuery->select("email, update_date, del_flg" 107 ,"dtb_customer" 108 ,"email = ? OR email_mobile = ? ORDER BY del_flg" 109 ,array($email, $email) 110 ); 111 112 if(count($arrRet) > 0) { 113 if($arrRet[0]['del_flg'] != '1') { 114 // 会員である場合 115 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = ""; 116 $return = 1; 117 } else { 118 // 退会した会員である場合 119 $leave_time = SC_Utils_Ex::sfDBDatetoTime($arrRet[0]['update_date']); 120 $now_time = time(); 121 $pass_time = $now_time - $leave_time; 122 // 退会から何時間-経過しているか判定する。 123 $limit_time = ENTRY_LIMIT_HOUR * 3600; 124 if($pass_time < $limit_time) { 125 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = ""; 126 $return = 2; 127 } 128 } 129 } 130 return $return; 131 } 132 133 134 135 96 136 } -
branches/version-2_5-dev/data/class/pages/entry/LC_Page_Entry.php
r19853 r19881 222 222 // 仮会員登録の場合 223 223 if(CUSTOMER_CONFIRM_MAIL == true) { 224 $sqlval["mailmaga_flg"] = $this->lfChangeMailFlg($sqlval["mailmaga_flg"]);225 224 $sqlval["status"] = "1"; // 仮会員 226 225 } else { … … 315 314 316 315 // 現会員の判定 → 現会員もしくは仮登録中は、メアド一意が前提になってるので同じメアドで登録不可 317 $register_user_flg = $this->lfCheckRegisterUserForEmail($arrRet["email"]);316 $register_user_flg = SC_Helper_Customer_Ex::lfCheckRegisterUserFromEmail($arrRet["email"]); 318 317 switch($register_user_flg) { 319 318 case 1: … … 328 327 return $objErr->arrErr; 329 328 } 330 331 /**332 * emailアドレスから、登録済み会員や退会済み会員をチェックする333 *334 * @return integer 0:登録可能 1:登録済み 2:再登録制限期間内削除ユーザー335 */336 function lfCheckRegisterUserForEmail($email){337 $return = 0;338 339 $objQuery = new SC_Query();340 $arrRet = $objQuery->select("email, update_date, del_flg"341 ,"dtb_customer"342 ,"email = ? OR email_mobile = ? ORDER BY del_flg"343 ,array($email, $email)344 );345 346 if(count($arrRet) > 0) {347 if($arrRet[0]['del_flg'] != '1') {348 // 会員である場合349 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = "";350 $return = 1;351 } else {352 // 退会した会員である場合353 $leave_time = SC_Utils_Ex::sfDBDatetoTime($arrRet[0]['update_date']);354 $now_time = time();355 $pass_time = $now_time - $leave_time;356 // 退会から何時間-経過しているか判定する。357 $limit_time = ENTRY_LIMIT_HOUR * 3600;358 if($pass_time < $limit_time) {359 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = "";360 $return = 2;361 }362 }363 }364 return $return;365 }366 367 //確認ページ用パスワード表示用368 function lfPassLen($passlen){369 $ret = "";370 for ($i=0;$i<$passlen;true){371 $ret.="*";372 $i++;373 }374 return $ret;375 }376 329 377 330 function lfCheckReferer(){ … … 386 339 } 387 340 } 388 389 function lfChangeMailFlg($mailmaga_flg){390 switch($mailmaga_flg) {391 case 1:392 $mailmaga_flg = 4;393 break;394 case 2:395 $mailmaga_flg = 5;396 break;397 default:398 $mailmaga_flg = 6;399 break;400 }401 return $mailmaga_flg;402 }403 341 } 404 342 ?> -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage.php
r19807 r19881 64 64 function process() { 65 65 parent::process(); 66 $this->action(); 66 if (Net_UserAgent_Mobile::isMobile() === true){ 67 $this->mobileAction(); 68 } else { 69 $this->action(); 70 } 67 71 $this->sendResponse(); 68 72 } … … 75 79 function action() { 76 80 77 //$objView = new SC_SiteView();78 81 $objQuery = new SC_Query(); 79 82 $objCustomer = new SC_Customer(); … … 122 125 $objDb = new SC_Helper_DB_Ex(); 123 126 $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 124 //$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納 125 //$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行 126 } 127 128 /** 129 * モバイルページを初期化する. 130 * 131 * @return void 132 */ 133 function mobileInit() { 134 $this->init(); 135 $this->tpl_mainpage = 'mypage/index.tpl'; 136 $this->tpl_title = 'MYページ/購入履歴一覧'; 137 $this->httpCacheControl('nocache'); 138 } 139 140 /** 141 * Page のプロセス(モバイル). 142 * 143 * @return void 144 */ 145 function mobileProcess() { 146 parent::mobileProcess(); 147 $this->mobileAction(); 148 $this->sendResponse(); 127 149 128 } 150 129 … … 155 134 */ 156 135 function mobileAction() { 157 //$objView = new SC_MobileView();158 136 $objQuery = new SC_Query(); 159 137 $objCustomer = new SC_Customer(); -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_ChangeComplete.php
r19807 r19881 67 67 */ 68 68 function action() { 69 //$objView = new SC_SiteView();70 $objCustomer = new SC_Customer();71 72 //ログイン判定73 if (!$objCustomer->isLoginSuccess()){74 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);75 } else {76 //マイページトップ顧客情報表示用77 $this->tpl_login = true;78 $this->CustomerName1 = $objCustomer->getvalue('name01');79 $this->CustomerName2 = $objCustomer->getvalue('name02');80 $this->CustomerPoint = $objCustomer->getvalue('point');81 }82 83 //$objView->assignobj($this);84 //$objView->display(SITE_FRAME);85 }86 87 /**88 * モバイルページを初期化する.89 *90 * @return void91 */92 function mobileInit() {93 $this->init();94 $this->tpl_mainpage = 'mypage/change_complete.tpl';95 $this->tpl_title = 'MYページ/会員登録内容変更(完了ページ)';96 }97 98 /**99 * Page のプロセス(モバイル).100 *101 * @return void102 */103 function mobileProcess() {104 parent::mobileProcess();105 $this->mobileAction();106 $this->sendResponse();107 }108 109 /**110 * Page のAction(モバイル).111 *112 * @return void113 */114 function mobileAction() {115 116 //$objView = new SC_MobileView();117 69 $objCustomer = new SC_Customer(); 118 70 … … 129 81 $this->CustomerPoint = $objCustomer->getvalue('point'); 130 82 } 131 132 //$objView->assignobj($this);133 //$objView->display(SITE_FRAME);134 83 } 135 84 -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_History.php
r19807 r19881 44 44 function init() { 45 45 parent::init(); 46 $this->tpl_title = 'MYページ';47 $this->tpl_subtitle = '購入履歴詳細';48 46 $this->tpl_navi = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 49 47 $this->tpl_mainno = 'mypage'; … … 53 51 $this->arrMAILTEMPLATE = $masterData->getMasterData("mtb_mail_template"); 54 52 $this->arrPref = $masterData->getMasterData('mtb_pref'); 53 54 $this->isMobile = Net_UserAgent_Mobile::isMobile(); 55 55 } 56 56 … … 62 62 function process() { 63 63 parent::process(); 64 $this->action(); 64 if ( $this->isMobile === false ){ 65 $this->action(); 66 } else { 67 $this->mobileAction(); 68 } 65 69 $this->sendResponse(); 66 70 } … … 72 76 */ 73 77 function action() { 74 //$objView = new SC_SiteView();75 78 $objQuery = new SC_Query(); 76 79 $objCustomer = new SC_Customer(); … … 115 118 $this->tpl_arrMailHistory = $this->lfGetMailHistory($orderId); 116 119 117 //$objView->assignobj($this);118 //$objView->display(SITE_FRAME);119 120 } 120 121 … … 129 130 130 131 /** 131 * モバイルページを初期化する.132 *133 * @return void134 */135 function mobileInit() {136 $this->init();137 $this->tpl_mainpage = MOBILE_TEMPLATE_REALDIR . 'mypage/history.tpl';138 $this->tpl_title = 'MYページ/購入履歴一覧';139 $this->httpCacheControl('nocache');140 }141 142 /**143 * Page のプロセス(モバイル).144 *145 * @return void146 */147 function mobileProcess() {148 parent::mobileProcess();149 $this->mobileAction();150 $this->sendResponse();151 }152 153 /**154 132 * Page のAction(モバイル). 155 133 * … … 159 137 define ("HISTORY_NUM", 5); 160 138 161 //$objView = new SC_MobileView();162 139 $objQuery = new SC_Query(); 163 140 $objCustomer = new SC_Customer(); … … 210 187 211 188 $this->tpl_strnavi = $previous . $bar . $next; 212 //$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納 213 //$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行 189 214 190 } 215 191 -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_HistoryDetail.php
r19805 r19881 44 44 function init() { 45 45 parent::init(); 46 $this->tpl_mainpage = 'mypage/history_detail.tpl'; 47 $this->tpl_title = 'MYページ'; 48 $this->tpl_subtitle = '購入履歴詳細'; 46 49 } 47 50 … … 62 65 * @return void 63 66 */ 64 function action() {} 65 66 /** 67 * モバイルページを初期化する. 68 * 69 * @return void 70 */ 71 function mobileInit() { 72 $this->init(); 73 $this->tpl_mainpage = 'mypage/history_detail.tpl'; 74 $this->tpl_title = 'MYページ'; 75 $this->tpl_subtitle = '購入履歴詳細'; 76 } 77 78 /** 79 * Page のプロセス(モバイル). 80 * 81 * @return void 82 */ 83 function mobileProcess() { 84 parent::mobileProcess(); 85 $this->mobileAction(); 86 $this->sendResponse(); 87 } 88 89 /** 90 * Page のAction(モバイル). 91 * 92 * @return void 93 */ 94 function mobileAction() { 95 96 //$objView = new SC_MobileView(); 67 function action() { 97 68 $objQuery = new SC_Query(); 98 69 $objCustomer = new SC_Customer(); … … 124 95 $this->CustomerPoint = $objCustomer->getvalue('point'); 125 96 } 126 127 //$objView->assignobj($this);128 //$objView->display(SITE_FRAME);129 97 } 130 98 -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Order.php
r19833 r19881 87 87 88 88 /** 89 * モバイルページを初期化する.90 *91 * @return void92 */93 function mobileInit() {94 $this->init();95 }96 97 /**98 * Page のプロセス(モバイル).99 *100 * @return void101 */102 function mobileProcess() {103 parent::mobileProcess();104 $this->mobileAction();105 $this->sendResponse();106 }107 108 /**109 * Page のAction(モバイル).110 *111 * @return void112 */113 function mobileAction() {114 115 $objCustomer = new SC_Customer();116 $objCartSess = new SC_CartSession();117 118 //受注詳細データの取得119 $arrDisp = $this->lfGetOrderDetail($_POST['order_id']);120 121 //ログインしていない、またはDBに情報が無い場合122 if (!$objCustomer->isLoginSuccess(true) or count($arrDisp) == 0){123 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);124 }125 126 for($num = 0; $num < count($arrDisp); $num++) {127 $product_id = $arrDisp[$num]['product_id'];128 $product_class_id = $arrDisp[$num]['product_class_id'];129 $cate_id1 = $arrDisp[$num]['classcategory_id1'];130 $cate_id2 = $arrDisp[$num]['classcategory_id2'];131 $quantity = $arrDisp[$num]['quantity'];132 133 $objCartSess->addProduct(array($product_id, $product_class_id, $cate_id1, $cate_id2), $quantity);134 }135 $this->objDisplay->redirect($this->getLocation(MOBILE_CART_URL_PATH));136 }137 138 /**139 89 * デストラクタ. 140 90 * -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Refusal.php
r19880 r19881 45 45 parent::init(); 46 46 $this->tpl_title = 'MYページ'; 47 $this->tpl_subtitle = '退会手続き(入力ページ)'; 47 if ( Net_UserAgent_Mobile::isMobile() === true){ 48 $this->tpl_title .= '/退会手続き(入力ページ)'; 49 } else { 50 $this->tpl_subtitle = '退会手続き(入力ページ)'; 51 } 48 52 $this->tpl_navi = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 49 53 $this->tpl_mainno = 'mypage'; … … 58 62 function process() { 59 63 parent::process(); 60 $this->action(); 64 if ( Net_UserAgent_Mobile::isMobile() === true){ 65 $this->mobileAction(); 66 } else { 67 $this->action(); 68 } 61 69 $this->sendResponse(); 62 70 } … … 68 76 */ 69 77 function action() { 70 //$objView = new SC_SiteView();71 $objCustomer = new SC_Customer();72 $objQuery = new SC_Query();73 78 $objSiteSess = new SC_SiteSession(); 74 79 … … 76 81 $this->tpl_login = $objCustomer->isLoginSuccess(); 77 82 78 //ログイン判定 79 if (!$objCustomer->isLoginSuccess()){ 80 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 81 }else { 82 //マイページトップ顧客情報表示用 83 $this->CustomerName1 = $objCustomer->getvalue('name01'); 84 $this->CustomerName2 = $objCustomer->getvalue('name02'); 85 $this->CustomerPoint = $objCustomer->getvalue('point'); 86 } 83 $this->lfCheckLogin(); 87 84 88 85 if (!isset($_POST['mode'])) $_POST['mode'] = ""; … … 104 101 // 正しい遷移かどうかをチェック 105 102 $this->lfIsValidMovement($objSiteSess); 106 107 //会員削除 108 $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 109 110 $objCustomer->EndSession(); 111 //完了ページへ 112 SC_Response_Ex::sendRedirect('refusal_complete.php'); 113 exit; 103 $this->lfDeleteCustomer(); //会員削除 114 104 } 115 105 116 //$objView->assignobj($this);117 //$objView->display(SITE_FRAME);118 }119 120 /**121 * モバイルページを初期化する.122 *123 * @return void124 */125 function mobileInit() {126 $this->init();127 $this->tpl_mainpage = 'mypage/refusal.tpl';128 $this->tpl_title = "MYページ/退会手続き(入力ページ)";129 130 }131 132 /**133 * Page のプロセス(モバイル).134 *135 * @return void136 */137 function mobileProcess() {138 parent::mobileProcess();139 $this->mobileAction();140 $this->sendResponse();141 106 } 142 107 … … 148 113 function mobileAction() { 149 114 150 //$objView = new SC_MobileView();151 $objCustomer = new SC_Customer();152 115 $objQuery = new SC_Query(); 153 116 154 //ログイン判定 155 if (!$objCustomer->isLoginSuccess(true)){ 156 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 157 }else { 158 //マイページトップ顧客情報表示用 159 $this->CustomerName1 = $objCustomer->getvalue('name01'); 160 $this->CustomerName2 = $objCustomer->getvalue('name02'); 161 $this->CustomerPoint = $objCustomer->getvalue('point'); 162 } 117 $this->lfCheckLogin(); 163 118 164 119 if (isset($_POST['no'])) { … … 166 121 exit; 167 122 } elseif (isset($_POST['complete'])){ 168 //会員削除 169 $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 170 171 $where = "email = ?"; 172 $objCustomer->EndSession(); 173 //完了ページへ 174 SC_Response_Ex::sendRedirect('refusal_complete.php'); 175 exit; 123 $this->lfDeleteCustomer(); //会員削除 176 124 } 177 125 178 //$objView->assignobj($this);179 //$objView->display(SITE_FRAME);180 126 } 181 127 … … 202 148 } 203 149 } 150 151 function lfCheckLogin(){ 152 $objCustomer = new SC_Customer(); 153 //ログイン判定 154 if (!$objCustomer->isLoginSuccess()){ 155 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 156 }else { 157 //マイページトップ顧客情報表示用 158 $this->CustomerName1 = $objCustomer->getvalue('name01'); 159 $this->CustomerName2 = $objCustomer->getvalue('name02'); 160 $this->CustomerPoint = $objCustomer->getvalue('point'); 161 } 162 } 163 164 function lfDeleteCustomer(){ 165 $objQuery = new SC_Query(); 166 $objCustomer = new SC_Customer(); 167 //会員削除 168 $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 169 170 $objCustomer->EndSession(); 171 //完了ページへ 172 SC_Response_Ex::sendRedirect('refusal_complete.php'); 173 exit; 174 } 175 204 176 } 205 177 ?> -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_RefusalComplete.php
r19807 r19881 45 45 parent::init(); 46 46 $this->tpl_title = 'MYページ'; 47 $this->tpl_subtitle = '退会手続き(完了ページ)'; 47 if ( Net_UserAgent_Mobile::isMobile() === true){ 48 $this->tpl_title .= '/退会手続き(完了ページ)'; 49 } else { 50 $this->tpl_subtitle = '退会手続き(完了ページ)'; 51 } 48 52 $this->tpl_navi = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 49 53 $this->tpl_mypageno = 'refusal'; … … 68 72 */ 69 73 function action() { 70 //$objView = new SC_SiteView();71 72 74 $objCustomer = new SC_Customer(); 73 75 //マイページトップ顧客情報表示用 … … 75 77 $this->CustomerName2 = $objCustomer->getvalue('name02'); 76 78 $this->CustomerPoint = $objCustomer->getvalue('point'); 77 78 //$objView->assignobj($this);79 //$objView->display(SITE_FRAME);80 }81 82 /**83 * モバイルページを初期化する.84 *85 * @return void86 */87 function mobileInit() {88 $this->tpl_mainpage = 'mypage/refusal_complete.tpl';89 $this->tpl_title = "MYページ/退会手続き(完了ページ)";90 $this->point_disp = false;91 }92 93 /**94 * Page のプロセス(モバイル).95 *96 * @return void97 */98 function mobileProcess() {99 parent::mobileProcess();100 $this->mobileAction();101 $this->sendResponse();102 }103 104 /**105 * Page のAction(モバイル).106 *107 * @return void108 */109 function mobileAction() {110 //$objView = new SC_MobileView();111 112 $objCustomer = new SC_Customer();113 //マイページトップ顧客情報表示用114 $this->CustomerName1 = $objCustomer->getvalue('name01');115 $this->CustomerName2 = $objCustomer->getvalue('name02');116 $this->CustomerPoint = $objCustomer->getvalue('point');117 118 //$objView->assignobj($this);119 //$objView->display(SITE_FRAME);120 79 } 121 80
Note: See TracChangeset
for help on using the changeset viewer.
