Page
[ class tree: Page ] [ index: Page ] [ all elements ]

Source for file LC_Page_AbstractMypage.php

Documentation is available at LC_Page_AbstractMypage.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * This program is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU General Public License
  11.  * as published by the Free Software Foundation; either version 2
  12.  * of the License, or (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  22.  */
  23.  
  24. // {{{ requires
  25. require_once CLASS_EX_REALDIR 'page_extends/LC_Page_Ex.php';
  26.  
  27. /**
  28.  * Mypage の基底クラス.
  29.  *
  30.  * @package Page
  31.  * @author LOCKON CO.,LTD.
  32.  * @version $Id$
  33.  */
  34. class LC_Page_AbstractMypage extends LC_Page_Ex {
  35.  
  36.     // }}}
  37.     // {{{ functions
  38.  
  39.     /**
  40.      * Page を初期化する.
  41.      *
  42.      * @return void 
  43.      */
  44.     function init({
  45.         parent::init();
  46.         // mypage 共通
  47.         $this->tpl_title        'MYページ';
  48.         $this->tpl_navi         'mypage/navi.tpl';
  49.         $this->tpl_mainno       'mypage';
  50.     }
  51.  
  52.     /**
  53.      * Page のプロセス.
  54.      *
  55.      * @return void 
  56.      */
  57.     function process({
  58.         parent::process();
  59.         // ログインチェック
  60.         $objCustomer new SC_Customer_Ex();
  61.  
  62.         // ログインしていない場合は必ずログインページを表示する
  63.         if($objCustomer->isLoginSuccess(true=== false{
  64.             // クッキー管理クラス
  65.             $objCookie new SC_Cookie_Ex(COOKIE_EXPIRE);
  66.             // クッキー判定(メールアドレスをクッキーに保存しているか)
  67.             $this->tpl_login_email $objCookie->getCookie('login_email');
  68.             if($this->tpl_login_email != ""{
  69.                 $this->tpl_login_memory "1";
  70.             }
  71.  
  72.             // POSTされてきたIDがある場合は優先する。
  73.             if(isset($_POST['login_email'])
  74.                && $_POST['login_email'!= ""{
  75.                 $this->tpl_login_email $_POST['login_email'];
  76.             }
  77.  
  78.             // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
  79.             if (SC_Display_Ex::detectDevice(=== DEVICE_TYPE_MOBILE){
  80.                 $this->tpl_valid_phone_id $objCustomer->checkMobilePhoneId();
  81.             }
  82.             $this->tpl_title        'MYページ(ログイン)';
  83.             $this->tpl_mainpage     'mypage/login.tpl';
  84.  
  85.         else {
  86.             //マイページ会員情報表示用共通処理
  87.             $this->tpl_login     true;
  88.             $this->CustomerName1 $objCustomer->getvalue('name01');
  89.             $this->CustomerName2 $objCustomer->getvalue('name02');
  90.             $this->CustomerPoint $objCustomer->getvalue('point');
  91.             $this->action();
  92.         }
  93.         $this->sendResponse();
  94.     }
  95.  
  96.     /**
  97.      * デストラクタ.
  98.      *
  99.      * @return void 
  100.      */
  101.     function destroy({
  102.         parent::destroy();
  103.     }
  104. }

Documentation generated on Fri, 24 Feb 2012 14:01:00 +0900 by Seasoft