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

Revision 22949, 3.1 KB checked in by Seasoft, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)

  • Property svn:executable set to *
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2013 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
24require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
25
26/**
27 * Mypage の基底クラス.
28 *
29 * @package Page
30 * @author LOCKON CO.,LTD.
31 * @version $Id$
32 */
33class LC_Page_AbstractMypage extends LC_Page_Ex
34{
35    /**
36     * Page を初期化する.
37     *
38     * @return void
39     */
40    function init()
41    {
42        parent::init();
43        // mypage 共通
44        $this->tpl_title        = 'MYページ';
45        $this->tpl_navi         = 'mypage/navi.tpl';
46        $this->tpl_mainno       = 'mypage';
47    }
48
49    /**
50     * Page のプロセス.
51     *
52     * @return void
53     */
54    function process()
55    {
56        parent::process();
57        // ログインチェック
58        $objCustomer = new SC_Customer_Ex();
59
60        // ログインしていない場合は必ずログインページを表示する
61        if ($objCustomer->isLoginSuccess(true) === false) {
62            // クッキー管理クラス
63            $objCookie = new SC_Cookie_Ex();
64            // クッキー判定(メールアドレスをクッキーに保存しているか)
65            $this->tpl_login_email = $objCookie->getCookie('login_email');
66            if ($this->tpl_login_email != '') {
67                $this->tpl_login_memory = '1';
68            }
69
70            // POSTされてきたIDがある場合は優先する。
71            if (isset($_POST['login_email'])
72                && $_POST['login_email'] != ''
73            ) {
74                $this->tpl_login_email = $_POST['login_email'];
75            }
76
77            // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
78            if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
79                $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
80            }
81            $this->tpl_title        = 'MYページ(ログイン)';
82            $this->tpl_mainpage     = 'mypage/login.tpl';
83        } else {
84            //マイページ会員情報表示用共通処理
85            $this->tpl_login     = true;
86            $this->CustomerName1 = $objCustomer->getValue('name01');
87            $this->CustomerName2 = $objCustomer->getValue('name02');
88            $this->CustomerPoint = $objCustomer->getValue('point');
89            $this->action();
90        }
91
92        $this->sendResponse();
93    }
94}
Note: See TracBrowser for help on using the repository browser.