/** * Page のプロセス。 * * @return void */ public function action() { SC_Response_Ex::sendHttpStatus(500); $this->tpl_error = 'システムエラーが発生しました。<br />大変お手数ですが、サイト管理者までご連絡ください。'; if (DEBUG_MODE) { echo '<div class="debug">'; echo '<div>▼▼▼ デバッグ情報ここから ▼▼▼</div>'; echo '<pre>'; echo htmlspecialchars($this->sfGetErrMsg(), ENT_QUOTES, CHAR_CODE); echo '</pre>'; echo '<div>▲▲▲ デバッグ情報ここまで ▲▲▲</div>'; echo '</div>'; } }
/** * Page のプロセス。 * * @return void */ function action() { switch ($this->type) { case LOGIN_ERROR: $this->tpl_error = t('c_The ID or password is not correct.<br />Check and reenter the ID and password._01'); break; case ACCESS_ERROR: $this->tpl_error = t('c_Your login session has expired.<br /> Please log in again._01'); break; case AUTH_ERROR: $this->tpl_error = t('c_You cannot access this page_01'); SC_Response_Ex::sendHttpStatus(403); break; case INVALID_MOVE_ERRORR: $this->tpl_error = t('c_Illegal page migration.<br />Check page again._01'); break; default: $this->tpl_error = t('c_An error has occurred.<br />Check and log in again._01'); break; } }
/** * Page のプロセス。 * * @return void */ function action() { switch ($this->type) { case LOGIN_ERROR: $this->tpl_error = 'IDまたはパスワードが正しくありません。<br />もう一度ご確認のうえ、再度入力してください。'; break; case ACCESS_ERROR: $this->tpl_error = 'ログイン認証の有効期限切れの可能性があります。<br />もう一度ご確認のうえ、再度ログインしてください。'; break; case AUTH_ERROR: $this->tpl_error = 'このページにはアクセスできません'; SC_Response_Ex::sendHttpStatus(403); break; case INVALID_MOVE_ERRORR: $this->tpl_error = '不正なページ移動です。<br />もう一度ご確認のうえ、再度入力してください。'; break; default: $this->tpl_error = 'エラーが発生しました。<br />もう一度ご確認のうえ、再度ログインしてください。'; break; } }
/** * Page のプロセス。 * * @return void */ function action() { switch ($this->type) { case PRODUCT_NOT_FOUND: $this->tpl_error = t('c_The page you specified does not exist._01'); SC_Response_Ex::sendHttpStatus(404); break; case PAGE_ERROR: $this->tpl_error = t('c_Illegal page migration._01'); break; case CART_EMPTY: $this->tpl_error = t('c_There are no products in your cart._01'); break; case CART_ADD_ERROR: $this->tpl_error = t('c_It is not possible to add products to your cart during purchase processing._01'); break; case CANCEL_PURCHASE: $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'); break; case CATEGORY_NOT_FOUND: $this->tpl_error = t('c_The category you specified does not exist._01'); SC_Response_Ex::sendHttpStatus(404); break; case SITE_LOGIN_ERROR: $this->tpl_error = t('c_The e-mail address or password is not correct._01'); break; case TEMP_LOGIN_ERROR: $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'); break; case CUSTOMER_ERROR: $this->tpl_error = t('c_Unauthorized access._01'); break; case SOLD_OUT: $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'); break; case CART_NOT_FOUND: $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'); break; case LACK_POINT: $this->tpl_error = t('c_You do not have enough points. This procedure has been voided. We apologize for the inconvenience._01'); break; case FAVORITE_ERROR: $this->tpl_error = t('c_This product is already added to your favorites_01'); break; case EXTRACT_ERROR: $this->tpl_error = t('c_File decompression failed.Write access may not have been granted to the designated directory._01'); break; case FTP_DOWNLOAD_ERROR: $this->tpl_error = t('c_FTP download of file failed._01'); break; case FTP_LOGIN_ERROR: $this->tpl_error = t('c_FTP login failed._01'); break; case FTP_CONNECT_ERROR: $this->tpl_error = t('c_FTP login failed._02'); break; case CREATE_DB_ERROR: $this->tpl_error = t('c_DB creation failed. The user designated by may not have been granted DB creation access._01'); break; case DB_IMPORT_ERROR: $this->tpl_error = t('c_Import of the database structure failed. The sql file may be damaged._01'); break; case FILE_NOT_FOUND: $this->tpl_error = t('c_The settings file does not exist in the designated path._01'); break; case WRITE_FILE_ERROR: $this->tpl_error = t('c_It is not possible to write to the file settings.Grant write access to file settings._01'); break; case DOWNFILE_NOT_FOUND: $this->tpl_error = t('c_The download file does not exist. <br /> Please inquire at the store._01'); break; case FREE_ERROR_MSG: $this->tpl_error = $this->err_msg; break; default: $this->tpl_error = t('c_An error has occurred._01'); break; } }
/** * Page のプロセス。 * * @return void */ function action() { switch ($this->type) { case PRODUCT_NOT_FOUND: $this->tpl_error = 'ご指定のページはございません。'; SC_Response_Ex::sendHttpStatus(404); break; case PAGE_ERROR: $this->tpl_error = '不正なページ移動です。'; break; case CART_EMPTY: $this->tpl_error = 'カートに商品ががありません。'; break; case CART_ADD_ERROR: $this->tpl_error = '購入処理中は、カートに商品を追加することはできません。'; break; case CANCEL_PURCHASE: $this->tpl_error = 'この手続きは無効となりました。以下の要因が考えられます。<br />・セッション情報の有効期限が切れてる場合<br />・購入手続き中に新しい購入手続きを実行した場合<br />・すでに購入手続きを完了している場合'; break; case CATEGORY_NOT_FOUND: $this->tpl_error = 'ご指定のカテゴリは存在しません。'; SC_Response_Ex::sendHttpStatus(404); break; case SITE_LOGIN_ERROR: $this->tpl_error = 'メールアドレスもしくはパスワードが正しくありません。'; break; case TEMP_LOGIN_ERROR: $this->tpl_error = 'メールアドレスもしくはパスワードが正しくありません。<br />本登録がお済みでない場合は、仮登録メールに記載されている<br />URLより本登録を行ってください。'; break; case CUSTOMER_ERROR: $this->tpl_error = '不正なアクセスです。'; break; case SOLD_OUT: $this->tpl_error = '申し訳ございませんが、ご購入の直前で売り切れた商品があります。この手続きは無効となりました。'; break; case CART_NOT_FOUND: $this->tpl_error = '申し訳ございませんが、カート内の商品情報の取得に失敗しました。この手続きは無効となりました。'; break; case LACK_POINT: $this->tpl_error = '申し訳ございませんが、ポイントが不足しております。この手続きは無効となりました。'; break; case FAVORITE_ERROR: $this->tpl_error = '既にお気に入りに追加されている商品です。'; break; case EXTRACT_ERROR: $this->tpl_error = "ファイルの解凍に失敗しました。\n指定のディレクトリに書き込み権限が与えられていない可能性があります。"; break; case FTP_DOWNLOAD_ERROR: $this->tpl_error = 'ファイルのFTPダウンロードに失敗しました。'; break; case FTP_LOGIN_ERROR: $this->tpl_error = 'FTPログインに失敗しました。'; break; case FTP_CONNECT_ERROR: $this->tpl_error = 'FTPログインに失敗しました。'; break; case CREATE_DB_ERROR: $this->tpl_error = "DBの作成に失敗しました。\n指定のユーザーには、DB作成の権限が与えられていない可能性があります。"; break; case DB_IMPORT_ERROR: $this->tpl_error = "データベース構造のインポートに失敗しました。\nsqlファイルが壊れている可能性があります。"; break; case FILE_NOT_FOUND: $this->tpl_error = '指定のパスに、設定ファイルが存在しません。'; break; case WRITE_FILE_ERROR: $this->tpl_error = "設定ファイルに書き込めません。\n設定ファイルに書き込み権限を与えてください。"; break; case DOWNFILE_NOT_FOUND: $this->tpl_error = 'ダウンロードファイルが存在しません。<br />申し訳ございませんが、店舗までお問合わせ下さい。'; break; case FREE_ERROR_MSG: $this->tpl_error = $this->err_msg; break; default: $this->tpl_error = 'エラーが発生しました。'; break; } }
/** * ホスト名を正規化する * * @return void */ public function normalizeHostname() { if (!USE_NORMALIZE_HOSTNAME || !isset($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_METHOD'] === 'POST') { // 処理せず戻る return; } $netUrlRequest = new Net_URL($_SERVER['REQUEST_URI']); // 要求を受けたホスト名 $request_hostname = $netUrlRequest->host; $netUrlCorrect = new Net_URL(SC_Utils_Ex::sfIsHTTPS() ? HTTPS_URL : HTTP_URL); // 設定上のホスト名 $correct_hostname = $netUrlCorrect->host; // ホスト名が不一致の場合 if ($request_hostname !== $correct_hostname) { // ホスト名を書き換え $netUrlRequest->host = $correct_hostname; // 正しい URL $correct_url = $netUrlRequest->getUrl(); // 警告 $msg = 'ホスト名不一致を検出。リダイレクト実行。'; $msg .= '要求値=' . var_export($request_hostname, true) . ' '; $msg .= '設定値=' . var_export($correct_hostname, true) . ' '; $msg .= 'リダイレクト先=' . var_export($correct_url, true) . ' '; trigger_error($msg, E_USER_WARNING); // リダイレクト(恒久的) SC_Response_Ex::sendHttpStatus(301); SC_Response_Ex::sendRedirect($correct_url); } }