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

Source for file LC_Page_FrontParts_Bloc_Login.php

Documentation is available at LC_Page_FrontParts_Bloc_Login.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_REALDIR 'pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php';
  26.  
  27. /**
  28.  * ログイン のページクラス.
  29.  *
  30.  * @package Page
  31.  * @author LOCKON CO.,LTD.
  32.  * @version $Id:LC_Page_FrontParts_Bloc_Login.php 15532 2007-08-31 14:39:46Z nanasess $
  33.  */
  34.  
  35.     // }}}
  36.     // {{{ functions
  37.  
  38.     /**
  39.      * Page を初期化する.
  40.      *
  41.      * @return void 
  42.      */
  43.     function init({
  44.         parent::init();
  45.         $this->tpl_login false;
  46.         $this->tpl_disable_logout false;
  47.         $this->httpCacheControl('nocache');
  48.     }
  49.  
  50.     /**
  51.      * Page のプロセス.
  52.      *
  53.      * @return void 
  54.      */
  55.     function process({
  56.         $this->action();
  57.         $this->sendResponse();
  58.     }
  59.  
  60.     /**
  61.      * Page のアクション.
  62.      *
  63.      * @return void 
  64.      */
  65.     function action({
  66.         $objCustomer new SC_Customer_Ex();
  67.         // クッキー管理クラス
  68.         $objCookie new SC_Cookie_Ex(COOKIE_EXPIRE);
  69.  
  70.         // ログイン判定
  71.         if($objCustomer->isLoginSuccess()) {
  72.             $this->tpl_login true;
  73.             $this->tpl_user_point $objCustomer->getValue('point');
  74.             $this->tpl_name1 $objCustomer->getValue('name01');
  75.             $this->tpl_name2 $objCustomer->getValue('name02');
  76.         else {
  77.             // クッキー判定
  78.             $this->tpl_login_email $objCookie->getCookie('login_email');
  79.             if($this->tpl_login_email != ''{
  80.                 $this->tpl_login_memory '1';
  81.             }
  82.             // POSTされてきたIDがある場合は優先する。
  83.             ifisset($_POST['login_email']&& $_POST['login_email'!= ''{
  84.                 $this->tpl_login_email $_POST['login_email'];
  85.             }
  86.         }
  87.  
  88.         $this->tpl_disable_logout $this->lfCheckDisableLogout();
  89.         //スマートフォン版ログアウト処理で不正なページ移動エラーを防ぐ為、トークンをセット
  90.         $this->transactionid SC_Helper_Session_Ex::getToken();
  91.     }
  92.  
  93.     /**
  94.      * デストラクタ.
  95.      *
  96.      * @return void 
  97.      */
  98.     function destroy({
  99.         parent::destroy();
  100.     }
  101.  
  102.     /**
  103.      * lfCheckDisableLogout.
  104.      *
  105.      * @return boolean 
  106.      */
  107.     function lfCheckDisableLogout({
  108.         $masterData new SC_DB_MasterData_Ex();
  109.         $arrDisableLogout $masterData->getMasterData('mtb_disable_logout');
  110.  
  111.         $current_page $_SERVER['PHP_SELF'];
  112.  
  113.         foreach($arrDisableLogout as $val{
  114.             if($current_page == $val{
  115.                 return true;
  116.             }
  117.          }
  118.         return false;
  119.     }
  120. }
  121. ?>

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