Source for file LC_Page_Entry.php
Documentation is available at LC_Page_Entry.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 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_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Entry.php 15532 2007-08-31 14:39:46Z nanasess $
$masterData = new SC_DB_MasterData_Ex();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrJob = $masterData->getMasterData("mtb_job");
$this->arrReminder = $masterData->getMasterData("mtb_reminder");
$objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y',strtotime('now')));
$this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
$this->arrMonth = $objDate->getMonth(true);
$this->arrDay = $objDate->getDay(true);
$this->httpCacheControl('nocache');
$objFormParam = new SC_FormParam_Ex();
SC_Helper_Customer_Ex::sfCustomerEntryParam($objFormParam);
$objFormParam->setParam($_POST);
$arrForm = $objFormParam->getHashArray();
// PC時は規約ページからの遷移でなければエラー画面へ遷移する
if ($this->lfCheckReferer($arrForm, $_SERVER['HTTP_REFERER']) === false) {
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", true);
// mobile用(戻るボタンでの遷移かどうかを判定)
if (!empty($arrForm['return'])) {
$_POST['mode'] = 'return';
switch ($this->getMode()) {
$this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam);
$this->arrForm = $objFormParam->getHashArray();
if(empty($this->arrErr)) {
$this->passlen = SC_Utils_Ex::sfPassLen(strlen($this->arrForm['password']));
$this->tpl_mainpage = 'entry/confirm.tpl';
$this->tpl_title = '会員登録(確認ページ)';
$this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam);
$this->arrForm = $objFormParam->getHashArray();
if(empty($this->arrErr)) {
$uniqid = $this->lfRegistCustomerData($this->lfMakeSqlVal($objFormParam));
$this->tpl_mainpage = 'entry/complete.tpl';
$this->tpl_title = '会員登録(完了ページ)';
$this->lfSendMail($uniqid, $this->arrForm);
if(CUSTOMER_CONFIRM_MAIL == false) {
$objCustomer = new SC_Customer_Ex();
$objCustomer->setLogin($this->arrForm['email']);
SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($uniqid)));
$this->arrForm = $objFormParam->getHashArray();
// {{{ protected functions
function lfRegistCustomerData($sqlval) {
SC_Helper_Customer_Ex::sfEditCustomerData($sqlval);
return $sqlval["secret_key"];
* 会員登録に必要なSQLパラメーターの配列を生成する.
* フォームに入力された情報を元に, SQLパラメーターの配列を生成する.
* モバイル端末の場合は, email を email_mobile にコピーし,
* mobile_phone_id に携帯端末IDを格納する.
* @param mixed $objFormParam
function lfMakeSqlVal(&$objFormParam) {
$arrForm = $objFormParam->getHashArray();
$arrResults = $objFormParam->getDbArray();
$arrResults['birth'] = SC_Utils_Ex::sfGetTimestamp($arrForm['year'], $arrForm['month'], $arrForm['day']);
$arrResults['status'] = (CUSTOMER_CONFIRM_MAIL == true) ? "1" : "2";
* secret_keyは、テーブルで重複許可されていない場合があるので、
$arrResults["secret_key"] = SC_Helper_Customer_Ex::sfGetUniqSecretKey();
$CONF = SC_Helper_DB_Ex::sfGetBasisData();
$arrResults['point'] = $CONF["welcome_point"];
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
$arrResults['email_mobile'] = $arrResults['email'];
$arrResults['mobile_phone_id'] = SC_MobileUserAgent_Ex::getId();
function lfSendMail($uniqid, $arrForm){
$CONF = SC_Helper_DB_Ex::sfGetBasisData();
$objMailText = new SC_SiteView_Ex();
$objMailText->assign('CONF', $CONF);
$objMailText->assign("name01", $arrForm['name01']);
$objMailText->assign("name02", $arrForm['name02']);
$objMailText->assign('uniqid', $uniqid);
$objMailText->assignobj($this);
$objHelperMail = new SC_Helper_Mail_Ex();
if(CUSTOMER_CONFIRM_MAIL == true) {
$subject = $objHelperMail->sfMakeSubject('会員登録のご確認');
$toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
$subject = $objHelperMail->sfMakeSubject('会員登録のご完了');
$toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl");
, $CONF["email03"] // 配送元アドレス
, $CONF["shop_name"] // 配送元 名前
, $CONF["email03"] // reply_to
, $CONF["email04"] // return_path
, $CONF["email04"] // Errors_to
, $CONF["email01"] // Bcc
$objMail->setTo($arrForm['email'],
$arrForm["name01"] . $arrForm["name02"] . " 様");
* kiyaku.php からの遷移の妥当性をチェックする
* 以下の内容をチェックし, 妥当であれば true を返す.
* 3. $post に何も含まれていないかどうか
* @param array $post $_POST のデータ
* @param string $referer $_SERVER['HTTP_REFERER'] のデータ
* @return boolean kiyaku.php からの妥当な遷移であれば true
if (SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE
Documentation generated on Fri, 24 Feb 2012 14:01:55 +0900 by Seasoft
|