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

Revision 22567, 3.8 KB checked in by shutta, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

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