source: branches/version-2_12-multilang/data/class/pages/error/LC_Page_Error.php @ 22500

Revision 22500, 7.0 KB checked in by m_uehara, 8 years ago (diff)

#2084 メッセージIDの振り直し

  • 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 //-*- coding: utf-8 -*-
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2012 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 * エラー表示のページクラス
29 *
30 * @package Page
31 * @author LOCKON CO.,LTD.
32 * @version $Id:LC_Page_Error.php 15532 2007-08-31 14:39:46Z nanasess $
33 */
34class LC_Page_Error extends LC_Page_Ex {
35
36    // {{{ properties
37
38    /** エラー種別 */
39    var $type;
40
41    /** SC_SiteSession インスタンス */
42    var $objSiteSess;
43
44    /** TOPへ戻るフラグ */
45    var $return_top = false;
46
47    /** エラーメッセージ */
48    var $err_msg = '';
49
50    /** モバイルサイトの場合 true */
51    var $is_mobile = false;
52
53    // }}}
54    // {{{ functions
55
56    /**
57     * Page を初期化する.
58     *
59     * DBエラー発生時, エラーページを表示しようした際の DB 接続を防ぐため,
60     * ここでは, parent::init() を行わない.
61     * @return void
62     */
63    function init() {
64        $this->tpl_mainpage = 'error.tpl';
65        $this->tpl_title = t('c_Error_01');
66        // ディスプレイクラス生成
67        $this->objDisplay = new SC_Display_Ex();
68
69        // transformでフックしているばあいに, 再度エラーが発生するため, コールバックを無効化.
70        $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
71        $objHelperPlugin->arrRegistedPluginActions = array();
72    }
73
74    /**
75     * Page のプロセス.
76     *
77     * @return void
78     */
79    function process() {
80        parent::process();
81        $this->action();
82        $this->sendResponse();
83    }
84
85    /**
86     * Page のプロセス。
87     *
88     * @return void
89     */
90    function action() {
91
92        switch ($this->type) {
93            case PRODUCT_NOT_FOUND:
94                $this->tpl_error=t('c_The page you specified does not exist._01');
95                SC_Response_Ex::sendHttpStatus(404);
96                break;
97            case PAGE_ERROR:
98                $this->tpl_error=t('c_Illegal page migration._01');
99                break;
100            case CART_EMPTY:
101                $this->tpl_error=t('c_There are no products in your cart._01');
102                break;
103            case CART_ADD_ERROR:
104                $this->tpl_error=t('c_It is not possible to add products to your cart during purchase processing._01');
105                break;
106            case CANCEL_PURCHASE:
107                $this->tpl_error=t('c_This procedure has been voided. The following factors may be attributable. <br />- The expiration date of the session information has passed <br /> - A new purchasing procedure was executed during an existing purchasing procedure <br />- The purchasing procedure has already been completed_01');
108                break;
109            case CATEGORY_NOT_FOUND:
110                $this->tpl_error=t('c_The category you specified does not exist._01');
111                SC_Response_Ex::sendHttpStatus(404);
112                break;
113            case SITE_LOGIN_ERROR:
114                $this->tpl_error=t('c_The e-mail address or password is not correct._01');
115                break;
116            case TEMP_LOGIN_ERROR:
117                $this->tpl_error=t('c_The e-mail address or password is not correct.<br />If you have not completed registration, complete registration from the URL given in the temporary registration e-mail._01');
118                break;
119            case CUSTOMER_ERROR:
120                $this->tpl_error=t('c_Unauthorized access._01');
121                break;
122            case SOLD_OUT:
123                $this->tpl_error=t('c_There is a product that sold out immediately before your purchase. This procedure has been voided. We apologize for the inconvenience._01');
124                break;
125            case CART_NOT_FOUND:
126                $this->tpl_error=t('c_Retrieval of information regarding products in your cart failed. This procedure has been voided. We apologize for the inconvenience._01');
127                break;
128            case LACK_POINT:
129                $this->tpl_error=t('c_You do not have enough points. This procedure has been voided. We apologize for the inconvenience._01');
130                break;
131            case FAVORITE_ERROR:
132                $this->tpl_error=t('c_This product is already added to your favorites_01');
133                break;
134            case EXTRACT_ERROR:
135                $this->tpl_error=t('c_File decompression failed.\nWrite access may not have been granted to the designated directory._01');
136                break;
137            case FTP_DOWNLOAD_ERROR:
138                $this->tpl_error=t('c_FTP download of file failed._01');
139                break;
140            case FTP_LOGIN_ERROR:
141                $this->tpl_error=t('c_FTP login failed._01');
142                break;
143            case FTP_CONNECT_ERROR:
144                $this->tpl_error=t('c_FTP login failed._02');
145                break;
146            case CREATE_DB_ERROR:
147                $this->tpl_error=t('c_DB creation failed. \nThe user designated by may not have been granted DB creation access._01');
148                break;
149            case DB_IMPORT_ERROR:
150                $this->tpl_error=t('c_Import of the database structure failed. \nThe sql file may be damaged._01');
151                break;
152            case FILE_NOT_FOUND:
153                $this->tpl_error=t('c_The settings file does not exist in the designated path._01');
154                break;
155            case WRITE_FILE_ERROR:
156                $this->tpl_error=t('c_It is not possible to write to the file settings.\nGrant write access to file settings._01');
157                break;
158            case DOWNFILE_NOT_FOUND:
159                $this->tpl_error=t('c_The download file does not exist. <br /> Please inquire at the store._01');
160                break;
161            case FREE_ERROR_MSG:
162                $this->tpl_error=$this->err_msg;
163                break;
164            default:
165                $this->tpl_error=t('c_An error has occurred._01');
166                break;
167        }
168
169    }
170
171    /**
172     * デストラクタ.
173     *
174     * @return void
175     */
176    function destroy() {
177        parent::destroy();
178    }
179
180    /**
181     * エラーページではトランザクショントークンの自動検証は行わない
182     */
183    function doValidToken() {
184        // queit.
185    }
186}
Note: See TracBrowser for help on using the repository browser.