source: branches/version-2_12-dev/data/class/pages/mypage/LC_Page_AbstractMypage.php @ 21867

Revision 21867, 3.3 KB checked in by nakanishi, 12 years ago (diff)

#1831 Copyright Update

  • Property svn:executable set to *
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2012 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
25require_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 */
34class 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
59        parent::process();
60        // ログインチェック
61        $objCustomer = new SC_Customer_Ex();
62
63        // ログインしていない場合は必ずログインページを表示する
64        if ($objCustomer->isLoginSuccess(true) === false) {
65            // クッキー管理クラス
66            $objCookie = new SC_Cookie_Ex(COOKIE_EXPIRE);
67            // クッキー判定(メールアドレスをクッキーに保存しているか)
68            $this->tpl_login_email = $objCookie->getCookie('login_email');
69            if ($this->tpl_login_email != '') {
70                $this->tpl_login_memory = '1';
71            }
72
73            // POSTされてきたIDがある場合は優先する。
74            if (isset($_POST['login_email'])
75                && $_POST['login_email'] != ''
76            ) {
77                $this->tpl_login_email = $_POST['login_email'];
78            }
79
80            // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
81            if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
82                $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
83            }
84            $this->tpl_title        = 'MYページ(ログイン)';
85            $this->tpl_mainpage     = 'mypage/login.tpl';
86
87        } else {
88            //マイページ会員情報表示用共通処理
89            $this->tpl_login     = true;
90            $this->CustomerName1 = $objCustomer->getvalue('name01');
91            $this->CustomerName2 = $objCustomer->getvalue('name02');
92            $this->CustomerPoint = $objCustomer->getvalue('point');
93            $this->action();
94        }
95
96
97        $this->sendResponse();
98    }
99
100    /**
101     * デストラクタ.
102     *
103     * @return void
104     */
105    function destroy() {
106        parent::destroy();
107    }
108}
Note: See TracBrowser for help on using the repository browser.