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

Revision 22923, 3.8 KB checked in by Seasoft, 11 years ago (diff)

#2286 (エラー画面が検索エンジンにインデックスされる事がある)

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