source: branches/version-2_12-dev/data/class/pages/error/LC_Page_Error_DispError.php @ 22487

Revision 22487, 3.8 KB checked in by undertree, 11 years ago (diff)

#1358(PC・スマートフォンのエラー画面でフッタにサイト名が表示されない。)
「基本設定>SHOPマスター」更新時にdtb_baseinfoのキャッシュファイルをdata/cacheに生成。
エラーページではarrSiteInfoにキャッシュファイルの値を入れる(ファイルが無い場合の「DB参照→生成」は行わない)

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<!-- -*- coding: utf-8 -*- -->
2<?php
3/*
4 * This file is part of EC-CUBE
5 *
6 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
7 *
8 * http://www.lockon.co.jp/
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23 */
24
25// {{{ requires
26require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
27
28/**
29 * エラー表示のページクラス
30 *
31 * @package Page
32 * @author LOCKON CO.,LTD.
33 * @version $Id$
34 */
35class LC_Page_Error_DispError extends LC_Page_Admin_Ex {
36
37    // }}}
38    // {{{ functions
39
40    /**
41     * Page を初期化する.
42     * LC_Page_Adminクラス内でエラーページを表示しようとした際に無限ループに陥るのを防ぐため,
43     * ここでは, parent::init() を行わない.(フロントのエラー画面出力と同様の仕様)
44     *
45     * @return void
46     */
47    function init() {
48        $this->template = LOGIN_FRAME;
49        $this->tpl_mainpage = 'login_error.tpl';
50        $this->tpl_title = 'ログインエラー';
51        // ディスプレイクラス生成
52        $this->objDisplay = new SC_Display_Ex();
53
54        // transformでフックしているばあいに, 再度エラーが発生するため, コールバックを無効化.
55        $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
56        $objHelperPlugin->arrRegistedPluginActions = array();
57
58        // キャッシュから店舗情報取得(DBへの接続は行わない)
59        $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
60    }
61
62    /**
63     * Page のプロセス。
64     *
65     * @return void
66     */
67    function process() {
68        $this->action();
69        $this->sendResponse();
70    }
71
72    /**
73     * Page のプロセス。
74     *
75     * @return void
76     */
77    function action() {
78
79        switch ($this->type) {
80            case LOGIN_ERROR:
81                $this->tpl_error='IDまたはパスワードが正しくありません。<br />もう一度ご確認のうえ、再度入力してください。';
82                break;
83            case ACCESS_ERROR:
84                $this->tpl_error='ログイン認証の有効期限切れの可能性があります。<br />もう一度ご確認のうえ、再度ログインしてください。';
85                break;
86            case AUTH_ERROR:
87                $this->tpl_error='このページにはアクセスできません';
88                SC_Response_Ex::sendHttpStatus(403);
89                break;
90            case INVALID_MOVE_ERRORR:
91                $this->tpl_error='不正なページ移動です。<br />もう一度ご確認のうえ、再度入力してください。';
92                break;
93            default:
94                $this->tpl_error='エラーが発生しました。<br />もう一度ご確認のうえ、再度ログインしてください。';
95                break;
96        }
97
98    }
99
100    /**
101     * デストラクタ.
102     *
103     * @return void
104     */
105    function destroy() {
106        parent::destroy();
107    }
108
109    /**
110     * エラーページではトランザクショントークンの自動検証は行わない
111     */
112    function doValidToken() {
113        // queit.
114    }
115}
Note: See TracBrowser for help on using the repository browser.