Source for file LC_Page_Mypage.php
Documentation is available at LC_Page_Mypage.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2010 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_Mypage.php 18735 2010-06-22 08:53:31Z nanasess $
$this->tpl_navi = TEMPLATE_DIR . 'mypage/navi.tpl';
$this->tpl_mypageno = 'index';
$objLayout = new SC_Helper_PageLayout_Ex();
$objLayout->sfGetPageLayout($this, false, "mypage/index.php");
if(!$objCustomer->isLoginSuccess()) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
$this->CustomerName1 = $objCustomer->getvalue('name01');
$this->CustomerName2 = $objCustomer->getvalue('name02');
$this->CustomerPoint = $objCustomer->getvalue('point');
if (isset ($_POST['pageno'])) {
$col = "order_id, create_date, payment_id, payment_total";
$where = "del_flg = 0 AND customer_id=?";
$arrval = array($objCustomer->getvalue('customer_id'));
$order = "order_id DESC";
$linemax = $objQuery->count($from, $where, $arrval);
$this->tpl_linemax = $linemax;
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
$objQuery->setLimitOffset(SEARCH_PMAX, $startno);
$objQuery->setOrder($order);
$this->arrOrder = $objQuery->select($col, $from, $where, $arrval);
$objDb = new SC_Helper_DB_Ex();
$this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納
$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行
$objFormParam->setParam($_POST);
// 携帯端末IDが一致する会員が存在するかどうかをチェックする。
$this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
if (!isset ($_POST['mode'])) $_POST['mode'] = "";
if($_POST['mode'] == 'login') {
$objFormParam->toLower('login_email');
$arrErr = $objFormParam->checkError();
$arrForm = $objFormParam->getHashArray();
if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
$objCookie->setCookie('login_email', $_POST['login_email']);
$objCookie->setCookie('login_email', '');
if (count($arrErr) == 0){
if($objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) ||
$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
// ログインが成功した場合は携帯端末IDを保存する。
$objCustomer->updateMobilePhoneId();
$objMobile = new SC_Helper_Mobile_Ex();
if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
if (!$objCustomer->hasValue('email_mobile')) {
$where = "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
$ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));
SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR, "", false, "", true);
SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR, "", false, "", true);
* 携帯メールの登録を必須にする場合は isLoginSuccess(false) にする
if(!$objCustomer->isLoginSuccess(true)) {
$objView->assignArray($objFormParam->getHashArray());
if (empty($arrErr)) $arrErr = array();
$objView->assignArray(array("arrErr" => $arrErr));
$this->CustomerName1 = $objCustomer->getvalue('name01');
$this->CustomerName2 = $objCustomer->getvalue('name02');
$this->CustomerPoint = $objCustomer->getvalue('point');
$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納
$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行
$objErr->doFunc(array("メールアドレス", "login_email", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","EMAIL_CHECK","MAX_LENGTH_CHECK"));
$objErr->dofunc(array("パスワード", "login_password", PASSWORD_LEN2), array("EXIST_CHECK","ALNUM_CHECK"));
$objFormParam->addParam("記憶する", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
$objFormParam->addParam("メールアドレス", "login_email", MTEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$objFormParam->addParam("パスワード", "login_pass", STEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
Documentation generated on Fri, 24 Feb 2012 13:59:31 +0900 by Seasoft
|