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

Revision 20614, 3.3 KB checked in by nagano, 13 years ago (diff)

モバイル・スマートフォンのデザイン調整

  • Property svn:executable set to *
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 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        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            $this->transactionid    = SC_Helper_Session_Ex::getToken();
85
86        } else {
87            //マイページ顧客情報表示用共通処理
88            $this->tpl_login     = true;
89            $this->CustomerName1 = $objCustomer->getvalue('name01');
90            $this->CustomerName2 = $objCustomer->getvalue('name02');
91            $this->CustomerPoint = $objCustomer->getvalue('point');
92            $this->action();
93        }
94        $this->sendResponse();
95    }
96
97    /**
98     * デストラクタ.
99     *
100     * @return void
101     */
102    function destroy() {
103        parent::destroy();
104    }
105}
Note: See TracBrowser for help on using the repository browser.