Source for file LC_Page_Regist.php
Documentation is available at LC_Page_Regist.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH .
"pages/LC_Page.php");
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Regist.php 17590 2008-09-02 07:17:59Z Seasoft $
$objSiteInfo =
$objView->objSiteInfo;
$this->CONF =
$objDb->sf_getBasisData();
$this->arrInfo =
$objSiteInfo->data;
if(!empty($_GET["cp"])) {
$etc_val['cp'] =
$_GET['cp'];
//-- 本登録完了のためにメールから接続した場合
if ($_GET["mode"] ==
"regist") {
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, $this->arrErr["id"]);
$registSecretKey =
$this->lfRegistData($_GET); //本会員登録(フラグ変更)
$arrRet =
$objQuery->select("customer_id, email", "dtb_customer", "secret_key = ?", array($registSecretKey));
$objCustomer->setLogin($arrRet[0]['email']);
$etc_val['ci'] =
$arrRet[0]['customer_id'];
$_SERVER['QUERY_STRING'] =
NULL;
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "無効なアクセスです。");
$objView->assignobj($this);
$objView->display(SITE_FRAME);
$objSiteInfo =
$objView->objSiteInfo;
$this->CONF =
$objDb->sf_getBasisData();
$arrInfo =
$objSiteInfo->data;
//-- 本登録完了のためにメールから接続した場合
if ($_GET["mode"] ==
"regist") {
$registSecretKey =
$this->lfRegistData($_GET); //本会員登録(フラグ変更)
$email =
$objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey));
$objCustomer->setLogin($email);
$this->arrErr["id"] =
"無効なアクセスです。";
$objView->assignobj($this);
$objView->display(SITE_FRAME);
} while( ($result =
$objQuery->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($secret)) ) !=
0);
$sql =
"SELECT email FROM dtb_customer WHERE secret_key = ? AND status = 1";
$email =
$objQuery->getOne($sql, array($array["id"]));
$arrRegist["secret_key"] =
$secret; // 本登録ID発行
$arrRegist["status"] =
2;
$arrRegist["update_date"] =
"NOW()";
$where =
"secret_key = ? AND status = 1";
$arrRet =
$objQuery->select("point", "dtb_customer", $where, array($array["id"]));
// 会員登録時の加算ポイント(購入時会員登録の場合は、ポイント加算)
$arrRegist['point'] =
$arrRet[0]['point'] +
$arrInfo['welcome_point'];
$objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"]));
// 購入時登録の場合、その回の購入を会員購入とみなす。
$where1 = "secret_key = ? AND status = 2";
$customer = $objQuery->select("*", "dtb_customer", $where1, array($secret));
$order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id");
if ($order_temp_id != null) {
$arrCustomer['customer_id'] = $customer[0]['customer_id'];
$where3 = "order_temp_id = ?";
$objQuery->update("dtb_order_temp", $arrCustomer, $where3, array($order_temp_id));
$objQuery->update("dtb_order", $arrCustomer, $where3, array($order_temp_id));
$sql =
"SELECT mailmaga_flg FROM dtb_customer WHERE email = ?";
$result =
$objQuery->getOne($sql, array($email));
$arrRegistMail["mailmaga_flg"] =
1;
$arrRegistMail["mailmaga_flg"] =
2;
$arrRegistMail["mailmaga_flg"] =
3;
$arrRegistMail["mailmaga_flg"] =
$result;
$objQuery->update("dtb_customer", $arrRegistMail, "email = " .
SC_Utils_Ex::sfQuoteSmart($email).
" AND del_flg = 0");
return $secret; // 本登録IDを返す
$objErr->doFunc(array("仮登録ID", 'id'), array("EXIST_CHECK"));
if (! EregI("^[[:alnum:]]+$",$array["id"] )) {
$objErr->arrErr["id"] =
"無効なURLです。メールに記載されている本会員登録用URLを再度ご確認ください。";
if (! $objErr->arrErr["id"]) {
$sql =
"SELECT customer_id FROM dtb_customer WHERE secret_key = ? AND status = 1 AND del_flg = 0";
$result =
$objQuery->getOne($sql, array($array["id"]));
$objErr->arrErr["id"] =
"※ 既に会員登録が完了しているか、無効なURLです。<br>";
$sql =
"SELECT email, name01, name02 FROM dtb_customer WHERE secret_key = ?";
$result =
$objQuery->getAll($sql, array($registSecretKey));
$objMailText->assign("CONF", $this->CONF);
$objMailText->assign("name01", $data["name01"]);
$objMailText->assign("name02", $data["name02"]);
$toCustomerMail =
$objMailText->fetch("mail_templates/customer_regist_mail.tpl");
$subject =
$objHelperMail->sfMakesubject('会員登録が完了しました。');
, $this->CONF["email03"] // 配送元アドレス
, $this->CONF["shop_name"] // 配送元 名前
, $this->CONF["email03"] // reply_to
, $this->CONF["email04"] // return_path
, $this->CONF["email04"] // Errors_to
$name =
$data["name01"] .
$data["name02"] .
" 様";
$objMail->setTo($data["email"], $name);
Documentation generated on Tue, 28 Apr 2009 18:12:47 +0900 by phpDocumentor 1.4.2