Changeset 15078 for branches/feature-module-update/html/mobile/regist
- Timestamp:
- 2007/07/20 15:58:59 (16 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update
-
Property
svn:ignore
set to
.cache
.settings
.projectOptions
-
Property
svn:ignore
set to
-
branches/feature-module-update/html/mobile/regist/complete.php
r12157 r15078 12 12 $this->tpl_mainpage = 'regist/complete.tpl'; 13 13 $this->tpl_css = '/css/layout/regist/complete.css'; 14 $this->tpl_title = ' ²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';14 $this->tpl_title = '会員登録(完了ページ)'; 15 15 } 16 16 } … … 19 19 $objView = new SC_MobileView(); 20 20 21 // ¥«¡¼¥È¤¬¶õ¤«¤É¤¦¤«¤ò³Îǧ¤¹¤ë¡£21 // カートが空かどうかを確認する。 22 22 $objCartSess = new SC_CartSession("", false); 23 23 $objPage->tpl_cart_empty = count($objCartSess->getCartList()) < 1; 24 24 25 // ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ25 // レイアウトデザインを取得 26 26 $objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT); 27 27 -
branches/feature-module-update/html/mobile/regist/index.php
r12157 r15078 8 8 require_once("../require.php"); 9 9 10 //---- ¥Ú¡¼¥¸É½¼¨¥¯¥é¥¹10 //---- ページ表示クラス 11 11 class LC_Page { 12 12 … … 16 16 17 17 function LC_Page() { 18 $this->tpl_css = '/css/layout/regist/index.css'; // ¥á¥¤¥óCSS¥Ñ¥¹18 $this->tpl_css = '/css/layout/regist/index.css'; // メインCSSパス 19 19 } 20 20 } … … 28 28 $arrInfo = $objSiteInfo->data; 29 29 30 //-- ¡¡ËÜÅÐÏ¿´°Î»¤Î¤¿¤á¤Ë¥á¡¼¥ë¤«¤éÀܳ¤·¤¿¾ì¹ç30 //-- 本登録完了のためにメールから接続した場合 31 31 if ($_GET["mode"] == "regist") { 32 32 33 //-- ÆþÎÏ¥Á¥§¥Ã¥¯33 //-- 入力チェック 34 34 $objPage->arrErr = lfErrorCheck($_GET); 35 35 if ($objPage->arrErr) { 36 36 $objPage->tpl_mainpage = 'regist/error.tpl'; 37 37 $objPage->tpl_css = "/css/layout/regist/error.css"; 38 $objPage->tpl_title = ' ¥¨¥é¡¼';38 $objPage->tpl_title = 'エラー'; 39 39 40 40 } else { 41 41 //$objPage->tpl_mainpage = 'regist/complete.tpl'; 42 //$objPage->tpl_title = ' ²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';43 $registSecretKey = lfRegistData($_GET); // Ëܲñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°Êѹ¹¡Ë44 lfSendRegistMail($registSecretKey); // Ëܲñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®42 //$objPage->tpl_title = ' 会員登録(完了ページ)'; 43 $registSecretKey = lfRegistData($_GET); //本会員登録(フラグ変更) 44 lfSendRegistMail($registSecretKey); //本会員登録完了メール送信 45 45 46 // ¥í¥°¥¤¥óºÑ¤ß¤Î¾õÂ֤ˤ¹¤ë¡£46 // ログイン済みの状態にする。 47 47 $objQuery = new SC_Query(); 48 48 $email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey)); … … 52 52 } 53 53 54 //-- ¡¡¤½¤ì°Ê³°¤Î¥¢¥¯¥»¥¹¤Ï̵¸ú¤È¤¹¤ë54 //-- それ以外のアクセスは無効とする 55 55 } else { 56 $objPage->arrErr["id"] = " ̵¸ú¤Ê¥¢¥¯¥»¥¹¤Ç¤¹¡£";56 $objPage->arrErr["id"] = "無効なアクセスです。"; 57 57 $objPage->tpl_mainpage = 'regist/error.tpl'; 58 58 $objPage->tpl_css = "/css/layout/regist/error.css"; 59 $objPage->tpl_title = ' ¥¨¥é¡¼';59 $objPage->tpl_title = 'エラー'; 60 60 61 61 } 62 62 63 //---- ¡¡¥Ú¡¼¥¸É½¼¨63 //---- ページ表示 64 64 $objView->assignobj($objPage); 65 65 $objView->display(SITE_FRAME); 66 66 67 //---- ÅÐÏ¿67 //---- 登録 68 68 function lfRegistData($array) { 69 69 global $objConn; … … 78 78 79 79 $objConn->query("BEGIN"); 80 $arrRegist["secret_key"] = $secret; // ¡¡ËÜÅÐÏ¿IDȯ¹Ô80 $arrRegist["secret_key"] = $secret; // 本登録ID発行 81 81 $arrRegist["status"] = 2; 82 82 $arrRegist["update_date"] = "NOW()"; … … 86 86 87 87 $arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"])); 88 // ²ñ°÷ÅÐÏ¿»þ¤Î²Ã»»¥Ý¥¤¥ó¥È(¹ØÆþ»þ²ñ°÷ÅÐÏ¿¤Î¾ì¹ç¤Ï¡¢¥Ý¥¤¥ó¥È²Ã»»¡Ë88 // 会員登録時の加算ポイント(購入時会員登録の場合は、ポイント加算) 89 89 $arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']); 90 90 91 91 $objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"])); 92 92 93 /* ¹ØÆþ»þ¤Î¼«Æ°²ñ°÷ÅÐÏ¿¤Ï¹Ô¤ï¤Ê¤¤¤¿¤áDEL94 // ¹ØÆþ»þÅÐÏ¿¤Î¾ì¹ç¡¢¤½¤Î²ó¤Î¹ØÆþ¤ò²ñ°÷¹ØÆþ¤È¤ß¤Ê¤¹¡£95 // ²ñ°÷¾ðÊó¤ÎÆÉ¤ß¹þ¤ß93 /* 購入時の自動会員登録は行わないためDEL 94 // 購入時登録の場合、その回の購入を会員購入とみなす。 95 // 会員情報の読み込み 96 96 $where1 = "secret_key = ? AND status = 2"; 97 97 $customer = $objQuery->select("*", "dtb_customer", $where1, array($secret)); 98 // ½é²ó¹ØÆþ¾ðÊó¤ÎÆÉ¤ß¹þ¤ß98 // 初回購入情報の読み込み 99 99 $order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id"); 100 // ¹ØÆþ¾ðÊó¤Î¹¹¿·100 // 購入情報の更新 101 101 if ($order_temp_id != null) { 102 102 $arrCustomer['customer_id'] = $customer[0]['customer_id']; … … 111 111 112 112 switch($result) { 113 // ²¾HTML113 // 仮HTML 114 114 case '4': 115 115 $arrRegistMail["mailmaga_flg"] = 1; 116 116 break; 117 // ²¾TEXT117 // 仮TEXT 118 118 case '5': 119 119 $arrRegistMail["mailmaga_flg"] = 2; 120 120 break; 121 // ²¾¤Ê¤·121 // 仮なし 122 122 case '6': 123 123 $arrRegistMail["mailmaga_flg"] = 3; … … 131 131 $objConn->query("COMMIT"); 132 132 133 return $secret; // ËÜÅÐÏ¿ID¤òÊÖ¤¹133 return $secret; // 本登録IDを返す 134 134 } 135 135 136 //---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯136 //---- 入力エラーチェック 137 137 function lfErrorCheck($array) { 138 138 … … 140 140 $objErr = new SC_CheckError($array); 141 141 142 $objErr->doFunc(array(" ²¾ÅÐÏ¿ID", 'id'), array("EXIST_CHECK"));142 $objErr->doFunc(array("仮登録ID", 'id'), array("EXIST_CHECK")); 143 143 if (! EregI("^[[:alnum:]]+$",$array["id"] )) { 144 $objErr->arrErr["id"] = " ̵¸ú¤ÊURL¤Ç¤¹¡£¥á¡¼¥ë¤ËµºÜ¤µ¤ì¤Æ¤¤¤ëËܲñ°÷ÅÐÏ¿ÍÑURL¤òºÆÅÙ¤´³Îǧ¤¯¤À¤µ¤¤¡£";144 $objErr->arrErr["id"] = "無効なURLです。メールに記載されている本会員登録用URLを再度ご確認ください。"; 145 145 } 146 146 if (! $objErr->arrErr["id"]) { … … 150 150 151 151 if (! is_numeric($result)) { 152 $objErr->arrErr["id"] .= " ¢¨ ´û¤Ë²ñ°÷ÅÐÏ¿¤¬´°Î»¤·¤Æ¤¤¤ë¤«¡¢Ìµ¸ú¤ÊURL¤Ç¤¹¡£<br>";152 $objErr->arrErr["id"] .= "※ 既に会員登録が完了しているか、無効なURLです。<br>"; 153 153 return $objErr->arrErr; 154 154 … … 159 159 } 160 160 161 //---- Àµ²ñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®161 //---- 正会員登録完了メール送信 162 162 function lfSendRegistMail($registSecretKey) { 163 163 global $objConn; 164 164 global $CONF; 165 165 166 //-- À«Ì¾¤ò¼èÆÀ166 //-- 姓名を取得 167 167 $sql = "SELECT email, name01, name02 FROM dtb_customer WHERE secret_key = ?"; 168 168 $result = $objConn->getAll($sql, array($registSecretKey)); 169 169 $data = $result[0]; 170 170 171 //-- ¡¡¥á¡¼¥ëÁ÷¿®171 //-- メール送信 172 172 $objMailText = new SC_MobileView(); 173 173 $objMailText->assign("CONF", $CONF); … … 175 175 $objMailText->assign("name02", $data["name02"]); 176 176 $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); 177 $subject = sfMakeSubject(' Ëܲñ°÷ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');177 $subject = sfMakeSubject('本会員登録が完了しました。'); 178 178 $objMail = new GC_SendMail(); 179 179 180 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_to187 , $CONF["email04"] // ¡¡return_path181 '' // 宛先 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 188 , $CONF["email04"] // Errors_to 189 189 ); 190 // °¸Àè¤ÎÀßÄê191 $name = $data["name01"] . $data["name02"] ." ÍÍ";190 // 宛先の設定 191 $name = $data["name01"] . $data["name02"] ." 様"; 192 192 $objMail->setTo($data["email"], $name); 193 193 $objMail->sendMail();
Note: See TracChangeset
for help on using the changeset viewer.