source: branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php @ 15367

Revision 15367, 2.3 KB checked in by nanasess, 17 years ago (diff)

クラス化対応

  • Property svn:keywords set to Id Revision Date
RevLine 
[15367]1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8// {{{ requires
9require_once(CLASS_PATH . "pages/LC_Page.php");
10
11/**
12 * ログイン のページクラス.
13 *
14 * @package Page
15 * @author LOCKON CO.,LTD.
16 * @version $Id$
17 */
18class LC_Page_FrontParts_Bloc_Login extends LC_Page {
19
20    // }}}
21    // {{{ functions
22
23    /**
24     * Page を初期化する.
25     *
26     * @return void
27     */
28    function init() {
29        parent::init();
30        $this->tpl_mainpage = BLOC_PATH . 'login.tpl';
31        $this->tpl_login = false;
32        $this->tpl_disable_logout = false;
33    }
34
35    /**
36     * Page のプロセス.
37     *
38     * @return void
39     */
40    function process() {
41        $objCustomer = new SC_Customer();
42        // クッキー管理クラス
43        $objCookie = new SC_Cookie(COOKIE_EXPIRE);
44
45        // ログイン判定
46        if($objCustomer->isLoginSuccess()) {
47            $this->tpl_login = true;
48            $this->tpl_user_point = $objCustomer->getValue('point');
49            $this->tpl_name1 = $objCustomer->getValue('name01');
50            $this->tpl_name2 = $objCustomer->getValue('name02');
51        } else {
52            // クッキー判定
53            $this->tpl_login_email = $objCookie->getCookie('login_email');
54            if($this->tpl_login_email != "") {
55                $this->tpl_login_memory = "1";
56            }
57
58            // POSTされてきたIDがある場合は優先する。
59            if($_POST['login_email'] != "") {
60                $this->tpl_login_email = $_POST['login_email'];
61            }
62        }
63
64        $this->tpl_disable_logout = $this->lfCheckDisableLogout();
65        $objSubView = new SC_SiteView();
66        $objSubView->assignobj($this);
67        $objSubView->display($this->tpl_mainpage);
68    }
69
70    /**
71     * デストラクタ.
72     *
73     * @return void
74     */
75    function destroy() {
76        parent::destroy();
77    }
78
79    function lfCheckDisableLogout() {
80        $masterData = new SC_DB_MasterData_Ex();
81        $arrDISABLE_LOGOUT = $masterData->getMasterData("mtb_disable_logout");
82        $nowpage = $_SERVER['PHP_SELF'];
83
84        foreach($arrDISABLE_LOGOUT as $val) {
85            if($nowpage == $val) {
86                return true;
87            }
88         }
89        return false;
90    }
91}
92?>
Note: See TracBrowser for help on using the repository browser.