Page
[ class tree: Page ] [ index: Page ] [ all elements ]

Source for file LC_Page_Error.php

Documentation is available at LC_Page_Error.php

  1. <?php //-*- coding: utf-8 -*-
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2011 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
  25. require_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.  */
  34. class 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 'エラー';
  66.         // ディスプレイクラス生成
  67.         $this->objDisplay new SC_Display_Ex();
  68.     }
  69.  
  70.     /**
  71.      * Page のプロセス.
  72.      *
  73.      * @return void 
  74.      */
  75.     function process({
  76.         parent::process();
  77.         $this->action();
  78.         $this->sendResponse();
  79.     }
  80.  
  81.     /**
  82.      * Page のプロセス。
  83.      *
  84.      * @return void 
  85.      */
  86.     function action(){
  87.         switch ($this->type{
  88.             case PRODUCT_NOT_FOUND:
  89.                 $this->tpl_error="ご指定のページはございません。";
  90.                 SC_Response_Ex::sendHttpStatus(404);
  91.                 break;
  92.             case PAGE_ERROR:
  93.                 $this->tpl_error="不正なページ移動です。";
  94.                 break;
  95.             case CART_EMPTY:
  96.                 $this->tpl_error="カートに商品ががありません。";
  97.                 break;
  98.             case CART_ADD_ERROR:
  99.                 $this->tpl_error="購入処理中は、カートに商品を追加することはできません。";
  100.                 break;
  101.             case CANCEL_PURCHASE:
  102.                 $this->tpl_error="この手続きは無効となりました。以下の要因が考えられます。<br />・セッション情報の有効期限が切れてる場合<br />・購入手続き中に新しい購入手続きを実行した場合<br />・すでに購入手続きを完了している場合";
  103.                 break;
  104.             case CATEGORY_NOT_FOUND:
  105.                 $this->tpl_error="ご指定のカテゴリは存在しません。";
  106.                 SC_Response_Ex::sendHttpStatus(404);
  107.                 break;
  108.             case SITE_LOGIN_ERROR:
  109.                 $this->tpl_error="メールアドレスもしくはパスワードが正しくありません。";
  110.                 break;
  111.             case TEMP_LOGIN_ERROR:
  112.                 $this->tpl_error="メールアドレスもしくはパスワードが正しくありません。<br />本登録がお済みでない場合は、仮登録メールに記載されている<br />URLより本登録を行ってください。";
  113.                 break;
  114.             case CUSTOMER_ERROR:
  115.                 $this->tpl_error="不正なアクセスです。";
  116.                 break;
  117.             case SOLD_OUT:
  118.                 $this->tpl_error="申し訳ございませんが、ご購入の直前で売り切れた商品があります。この手続きは無効となりました。";
  119.                 break;
  120.             case CART_NOT_FOUND:
  121.                 $this->tpl_error="申し訳ございませんが、カート内の商品情報の取得に失敗しました。この手続きは無効となりました。";
  122.                 break;
  123.             case LACK_POINT:
  124.                 $this->tpl_error="申し訳ございませんが、ポイントが不足しております。この手続きは無効となりました。";
  125.                 break;
  126.             case FAVORITE_ERROR:
  127.                 $this->tpl_error="既にお気に入りに追加されている商品です。";
  128.                 break;
  129.             case EXTRACT_ERROR:
  130.                 $this->tpl_error="ファイルの解凍に失敗しました。\n指定のディレクトリに書き込み権限が与えられていない可能性があります。";
  131.                 break;
  132.             case FTP_DOWNLOAD_ERROR:
  133.                 $this->tpl_error="ファイルのFTPダウンロードに失敗しました。";
  134.                 break;
  135.             case FTP_LOGIN_ERROR:
  136.                 $this->tpl_error="FTPログインに失敗しました。";
  137.                 break;
  138.             case FTP_CONNECT_ERROR:
  139.                 $this->tpl_error="FTPログインに失敗しました。";
  140.                 break;
  141.             case CREATE_DB_ERROR:
  142.                 $this->tpl_error="DBの作成に失敗しました。\n指定のユーザーには、DB作成の権限が与えられていない可能性があります。";
  143.                 break;
  144.             case DB_IMPORT_ERROR:
  145.                 $this->tpl_error="データベース構造のインポートに失敗しました。\nsqlファイルが壊れている可能性があります。";
  146.                 break;
  147.             case FILE_NOT_FOUND:
  148.                 $this->tpl_error="指定のパスに、設定ファイルが存在しません。";
  149.                 break;
  150.             case WRITE_FILE_ERROR:
  151.                 $this->tpl_error="設定ファイルに書き込めません。\n設定ファイルに書き込み権限を与えてください。";
  152.                 break;
  153.             case DOWNFILE_NOT_FOUND:
  154.                 $this->tpl_error="ダウンロードファイルが存在しません。<br />申し訳ございませんが、店舗までお問合わせ下さい。";
  155.                 break;
  156.             case FREE_ERROR_MSG:
  157.                 $this->tpl_error=$this->err_msg;
  158.                 break;
  159.              default:
  160.                 $this->tpl_error="エラーが発生しました。";
  161.                 break;
  162.         }
  163.     }
  164.  
  165.     /**
  166.      * デストラクタ.
  167.      *
  168.      * @return void 
  169.      */
  170.     function destroy({
  171.         parent::destroy();
  172.     }
  173.  
  174.     /**
  175.      * エラーページではトランザクショントークンの自動検証は行わない
  176.      */
  177.     function doValidToken({
  178.         // queit.
  179.     }
  180. }
  181. ?>

Documentation generated on Fri, 24 Feb 2012 14:01:57 +0900 by Seasoft