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

Revision 22856, 3.7 KB checked in by Seasoft, 11 years ago (diff)

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

  • 主に空白・空白行の調整。もう少し整えたいが、一旦現状コミット。
  • 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
25require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
26
27/**
28 * エラー表示のページクラス
29 *
30 * @package Page
31 * @author LOCKON CO.,LTD.
32 * @version $Id$
33 */
34class LC_Page_Error_DispError extends LC_Page_Admin_Ex
35{
36    /**
37     * Page を初期化する.
38     * LC_Page_Adminクラス内でエラーページを表示しようとした際に無限ループに陥るのを防ぐため,
39     * ここでは, parent::init() を行わない.(フロントのエラー画面出力と同様の仕様)
40     *
41     * @return void
42     */
43    function init()
44    {
45        $this->template = LOGIN_FRAME;
46        $this->tpl_mainpage = 'login_error.tpl';
47        $this->tpl_title = 'ログインエラー';
48        // ディスプレイクラス生成
49        $this->objDisplay = new SC_Display_Ex();
50
51        // transformでフックしているばあいに, 再度エラーが発生するため, コールバックを無効化.
52        $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
53        $objHelperPlugin->arrRegistedPluginActions = array();
54
55        // キャッシュから店舗情報取得(DBへの接続は行わない)
56        $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
57    }
58
59    /**
60     * Page のプロセス。
61     *
62     * @return void
63     */
64    function process()
65    {
66        $this->action();
67        $this->sendResponse();
68    }
69
70    /**
71     * Page のプロセス。
72     *
73     * @return void
74     */
75    function action()
76    {
77        switch ($this->type) {
78            case LOGIN_ERROR:
79                $this->tpl_error='IDまたはパスワードが正しくありません。<br />もう一度ご確認のうえ、再度入力してください。';
80                break;
81            case ACCESS_ERROR:
82                $this->tpl_error='ログイン認証の有効期限切れの可能性があります。<br />もう一度ご確認のうえ、再度ログインしてください。';
83                break;
84            case AUTH_ERROR:
85                $this->tpl_error='このページにはアクセスできません';
86                SC_Response_Ex::sendHttpStatus(403);
87                break;
88            case INVALID_MOVE_ERRORR:
89                $this->tpl_error='不正なページ移動です。<br />もう一度ご確認のうえ、再度入力してください。';
90                break;
91            default:
92                $this->tpl_error='エラーが発生しました。<br />もう一度ご確認のうえ、再度ログインしてください。';
93                break;
94        }
95
96    }
97
98    /**
99     * デストラクタ.
100     *
101     * @return void
102     */
103    function destroy()
104    {
105        parent::destroy();
106    }
107
108    /**
109     * エラーページではトランザクショントークンの自動検証は行わない
110     */
111    function doValidToken()
112    {
113        // queit.
114    }
115}
Note: See TracBrowser for help on using the repository browser.