Changeset 16392 for branches/feature-module-update/html
- Timestamp:
- 2007/10/12 12:41:54 (17 years ago)
- Location:
- branches/feature-module-update/html
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/html/mobile/redirect.php
r16124 r16392 7 7 * 8 8 * 9 * モバイルサイト/ 空メールの返信からの遷移9 * モバイルサイト/メールからのリダイレクト 10 10 */ 11 11 12 // FIXME13 define('SKIP_MOBILE_INIT', true);14 require_once 'require.php';12 // {{{ requires 13 require_once("./require.php"); 14 require_once(CLASS_EX_PATH . "page_extends/LC_Page_Redirect_Ex.php"); 15 15 16 if (isset($_GET['token'])) { 17 $next_url = GC_Utils_Ex::gfFinishKaraMail($_GET['token']); 18 } 16 // }}} 17 // {{{ generate page 19 18 20 if (isset($next_url) && $next_url !== false) { 21 header("Location: $next_url"); 22 } else { 23 header('Location: ' . MOBILE_SITE_URL); 24 } 19 $objPage = new LC_Page_Redirect_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 25 23 ?> -
branches/feature-module-update/html/mobile/regist/complete.php
r15532 r16392 1 1 <?php 2 /* 2 /** 3 * 3 4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 4 5 * 5 6 * http://www.lockon.co.jp/ 7 * 8 * 9 * モバイルサイト/会員登録完了 6 10 */ 7 11 12 // {{{ requires 8 13 require_once("../require.php"); 14 require_once(CLASS_EX_PATH . "page_extends/regist/LC_Page_Regist_Complete_Ex.php"); 9 15 10 class LC_Page{ 11 function LC_Page(){ 12 $this->tpl_mainpage = 'regist/complete.tpl'; 13 $this->tpl_css = '/css/layout/regist/complete.css'; 14 $this->tpl_title = '会員登録(完了ページ)'; 15 } 16 } 16 // }}} 17 // {{{ generate page 17 18 18 $objPage = new LC_Page(); 19 $objView = new SC_MobileView(); 20 21 // カートが空かどうかを確認する。 22 $objCartSess = new SC_CartSession("", false); 23 $objPage->tpl_cart_empty = count($objCartSess->getCartList()) < 1; 24 25 // レイアウトデザインを取得 26 $objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT); 27 28 $objView->assignobj($objPage); 29 $objView->display(SITE_FRAME); 30 19 $objPage = new LC_Page_Regist_Complete_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 31 23 ?> -
branches/feature-module-update/html/mobile/regist/index.php
r16379 r16392 1 1 <?php 2 /* 2 /** 3 * 3 4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 4 5 * 5 6 * http://www.lockon.co.jp/ 7 * 8 * 9 * モバイルサイト/会員登録 6 10 */ 7 11 12 // {{{ requires 8 13 require_once("../require.php"); 14 require_once(CLASS_EX_PATH . "page_extends/regist/LC_Page_Regist_Ex.php"); 9 15 10 //---- ページ表示クラス 11 class LC_Page { 12 13 var $arrSession; 14 var $tpl_mainpage; 15 var $arrPref; 16 // }}} 17 // {{{ generate page 16 18 17 function LC_Page() { 18 $this->tpl_css = '/css/layout/regist/index.css'; // メインCSSパス 19 } 20 } 21 22 $objConn = new SC_DBConn(); 23 $objPage = new LC_Page(); 24 $objView = new SC_MobileView(); 25 $objSiteInfo = $objView->objSiteInfo; 26 $objCustomer = new SC_Customer(); 27 $CONF = sf_getBasisData(); 28 $arrInfo = $objSiteInfo->data; 29 30 //-- 本登録完了のためにメールから接続した場合 31 if ($_GET["mode"] == "regist") { 32 33 //-- 入力チェック 34 $objPage->arrErr = lfErrorCheck($_GET); 35 if ($objPage->arrErr) { 36 $objPage->tpl_mainpage = 'regist/error.tpl'; 37 $objPage->tpl_css = "/css/layout/regist/error.css"; 38 $objPage->tpl_title = 'エラー'; 39 40 } else { 41 //$objPage->tpl_mainpage = 'regist/complete.tpl'; 42 //$objPage->tpl_title = ' 会員登録(完了ページ)'; 43 $registSecretKey = lfRegistData($_GET); //本会員登録(フラグ変更) 44 lfSendRegistMail($registSecretKey); //本会員登録完了メール送信 45 46 // ログイン済みの状態にする。 47 $objQuery = new SC_Query(); 48 $email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey)); 49 $objCustomer->setLogin($email); 50 header("Location: " . gfAddSessionId("./complete.php")); 51 exit; 52 } 53 54 //-- それ以外のアクセスは無効とする 55 } else { 56 $objPage->arrErr["id"] = "無効なアクセスです。"; 57 $objPage->tpl_mainpage = 'regist/error.tpl'; 58 $objPage->tpl_css = "/css/layout/regist/error.css"; 59 $objPage->tpl_title = 'エラー'; 60 61 } 62 63 //---- ページ表示 64 $objView->assignobj($objPage); 65 $objView->display(SITE_FRAME); 66 67 //---- 登録 68 function lfRegistData($array) { 69 global $objConn; 70 global $arrInfo; 71 72 do { 73 $secret = sfGetUniqRandomId("r"); 74 } while( ($result = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($secret)) ) != 0); 75 76 $sql = "SELECT email FROM dtb_customer WHERE secret_key = ? AND status = 1"; 77 $email = $objConn->getOne($sql, array($array["id"])); 78 79 $objConn->query("BEGIN"); 80 $arrRegist["secret_key"] = $secret; // 本登録ID発行 81 $arrRegist["status"] = 2; 82 $arrRegist["update_date"] = "NOW()"; 83 84 $objQuery = new SC_Query(); 85 $where = "secret_key = ? AND status = 1"; 86 87 $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 88 // 会員登録時の加算ポイント(購入時会員登録の場合は、ポイント加算) 89 $arrRegist['point'] = $arrRet[0]['point'] + $arrInfo['welcome_point']; 90 91 $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 92 93 /* 購入時の自動会員登録は行わないためDEL 94 // 購入時登録の場合、その回の購入を会員購入とみなす。 95 // 会員情報の読み込み 96 $where1 = "secret_key = ? AND status = 2"; 97 $customer = $objQuery->select("*", "dtb_customer", $where1, array($secret)); 98 // 初回購入情報の読み込み 99 $order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id"); 100 // 購入情報の更新 101 if ($order_temp_id != null) { 102 $arrCustomer['customer_id'] = $customer[0]['customer_id']; 103 $where3 = "order_temp_id = ?"; 104 $objQuery->update("dtb_order_temp", $arrCustomer, $where3, array($order_temp_id)); 105 $objQuery->update("dtb_order", $arrCustomer, $where3, array($order_temp_id)); 106 } 107 */ 108 109 $sql = "SELECT mailmaga_flg FROM dtb_customer WHERE email = ?"; 110 $result = $objConn->getOne($sql, array($email)); 111 112 switch($result) { 113 // 仮HTML 114 case '4': 115 $arrRegistMail["mailmaga_flg"] = 1; 116 break; 117 // 仮TEXT 118 case '5': 119 $arrRegistMail["mailmaga_flg"] = 2; 120 break; 121 // 仮なし 122 case '6': 123 $arrRegistMail["mailmaga_flg"] = 3; 124 break; 125 default: 126 $arrRegistMail["mailmaga_flg"] = $result; 127 break; 128 } 129 130 $objQuery->update("dtb_customer", $arrRegistMail, "email = " . SC_Utils_Ex::sfQuoteSmart($email). " AND del_flg = 0"); 131 $objConn->query("COMMIT"); 132 133 return $secret; // 本登録IDを返す 134 } 135 136 //---- 入力エラーチェック 137 function lfErrorCheck($array) { 138 139 global $objConn; 140 $objErr = new SC_CheckError($array); 141 142 $objErr->doFunc(array("仮登録ID", 'id'), array("EXIST_CHECK")); 143 if (! EregI("^[[:alnum:]]+$",$array["id"] )) { 144 $objErr->arrErr["id"] = "無効なURLです。メールに記載されている本会員登録用URLを再度ご確認ください。"; 145 } 146 if (! $objErr->arrErr["id"]) { 147 148 $sql = "SELECT customer_id FROM dtb_customer WHERE secret_key = ? AND status = 1 AND del_flg = 0"; 149 $result = $objConn->getOne($sql, array($array["id"])); 150 151 if (! is_numeric($result)) { 152 $objErr->arrErr["id"] .= "※ 既に会員登録が完了しているか、無効なURLです。<br>"; 153 return $objErr->arrErr; 154 155 } 156 } 157 158 return $objErr->arrErr; 159 } 160 161 //---- 正会員登録完了メール送信 162 function lfSendRegistMail($registSecretKey) { 163 global $objConn; 164 global $CONF; 165 166 //-- 姓名を取得 167 $sql = "SELECT email, name01, name02 FROM dtb_customer WHERE secret_key = ?"; 168 $result = $objConn->getAll($sql, array($registSecretKey)); 169 $data = $result[0]; 170 171 //-- メール送信 172 $objMailText = new SC_MobileView(); 173 $objMailText->assign("CONF", $CONF); 174 $objMailText->assign("name01", $data["name01"]); 175 $objMailText->assign("name02", $data["name02"]); 176 $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 177 $subject = sfMakeSubject('本会員登録が完了しました。'); 178 $objMail = new SC_SendMail(); 179 180 $objMail->setItem( 181 '' // 宛先 182 , $subject//"【" .$CONF["shop_name"]. "】".ENTRY_CUSTOMER_REGIST_SUBJECT // サブジェクト 183 , $toCustomerMail // 本文 184 , $CONF["email03"] // 配送元アドレス 185 , $CONF["shop_name"] // 配送元 名前 186 , $CONF["email03"] // reply_to 187 , $CONF["email04"] // return_path 188 , $CONF["email04"] // Errors_to 189 ); 190 // 宛先の設定 191 $name = $data["name01"] . $data["name02"] ." 様"; 192 $objMail->setTo($data["email"], $name); 193 $objMail->sendMail(); 194 } 195 19 $objPage = new LC_Page_Regist_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 196 23 ?> -
branches/feature-module-update/html/regist/complete.php
r16326 r16392 8 8 // {{{ requires 9 9 require_once("../require.php"); 10 require_once(CLASS_EX_PATH . "page_extends/regist/LC_Page_Regist_Compl ate_Ex.php");10 require_once(CLASS_EX_PATH . "page_extends/regist/LC_Page_Regist_Complete_Ex.php"); 11 11 12 12 // }}} 13 13 // {{{ generate page 14 14 15 $objPage = new LC_Page_Regist_Compl ate_Ex();15 $objPage = new LC_Page_Regist_Complete_Ex(); 16 16 $objPage->init(); 17 17 $objPage->process();
Note: See TracChangeset
for help on using the changeset viewer.