Ejemplo n.º 1
0
 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
// {{{ requires
define('SAFE', true);
if (isset($_GET['admin'])) {
    define('ADMIN_FUNCTION', true);
}
require_once './require.php';
require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_SystemError_Ex.php';
// }}}
// {{{ generate page
$objPage = new LC_Page_Error_SystemError_Ex();
register_shutdown_function(array($objPage, 'destroy'));
$objPage->init();
$objPage->process();
Ejemplo n.º 2
0
 function send_err_mail($result, $sql)
 {
     $url = '';
     $errmsg = '';
     if (SC_Utils_Ex::sfIsHTTPS()) {
         $url = "https://";
     } else {
         $url = "http://";
     }
     $url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     $errmsg = $url . "\n\n";
     $errmsg .= "SERVER_ADDR:" . $_SERVER['SERVER_ADDR'] . "\n";
     $errmsg .= "REMOTE_ADDR:" . $_SERVER['REMOTE_ADDR'] . "\n";
     $errmsg .= "USER_AGENT:" . $_SERVER['HTTP_USER_AGENT'] . "\n\n";
     $errmsg .= $sql . "\n";
     $errmsg .= $result->message . "\n\n";
     $errmsg .= $result->userinfo . "\n\n";
     $arrRbacktrace = array_reverse($result->backtrace);
     foreach ($arrRbacktrace as $backtrace) {
         if ($backtrace['class'] != "") {
             $func = $backtrace['class'] . "->" . $backtrace['function'];
         } else {
             $func = $backtrace['function'];
         }
         $errmsg .= $backtrace['file'] . " " . $backtrace['line'] . ":" . $func . "\n";
     }
     require_once CLASS_EX_PATH . "page_extends/error/LC_Page_Error_SystemError_Ex.php";
     $objPage = new LC_Page_Error_SystemError_Ex();
     register_shutdown_function(array($objPage, "destroy"));
     $objPage->init();
     $objPage->process();
     if (DEBUG_MODE == true) {
         print '<pre>';
         print_r(htmlspecialchars($errmsg, ENT_QUOTES, CHAR_CODE));
         print '</pre>';
     }
     GC_Utils_Ex::gfPrintLog($errmsg);
     exit;
 }
Ejemplo n.º 3
0
 /**
  * 例外エラーページの表示
  *
  * @param string $debugMsg デバッグ用のメッセージ
  * @return void
  */
 function sfDispException($debugMsg = null)
 {
     require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_SystemError_Ex.php';
     $objPage = new LC_Page_Error_SystemError_Ex();
     register_shutdown_function(array($objPage, 'destroy'));
     $objPage->init();
     if (!is_null($debugMsg)) {
         $objPage->addDebugMsg($debugMsg);
     }
     if (function_exists("debug_backtrace")) {
         $objPage->backtrace = debug_backtrace();
     }
     GC_Utils_Ex::gfPrintLog($objPage->sfGetErrMsg());
     $objPage->process();
     exit;
 }
Ejemplo n.º 4
0
/**
 * エラー画面を表示する
 *
 * @param string|null $errstr エラーメッセージ
 * @return void
 */
function displaySystemError($errstr = null)
{
    if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
        ob_clean();
        ob_start(array('SC_MobileEmoji', 'handler'));
    } else {
        // 最下層以外の出力用バッファをクリアし、出力のバッファリングを解除する
        // FIXME #811(出力バッファリングの利用を見直し)
        while (ob_get_level() >= 2) {
            ob_end_clean();
        }
        // 最下層の出力バッファをクリアする
        ob_clean();
    }
    require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_SystemError_Ex.php';
    $objPage = new LC_Page_Error_SystemError_Ex();
    register_shutdown_function(array($objPage, 'destroy'));
    $objPage->init();
    if (isset($errstr)) {
        $objPage->arrDebugMsg[] = "▼▼▼ エラーメッセージ ▼▼▼\n" . $errstr . "▲▲▲ エラーメッセージ ▲▲▲\n";
    }
    $objPage->process();
}
Ejemplo n.º 5
-1
 /**
  * エラー画面を表示する
  *
  * @param  string|null $errstr エラーメッセージ
  * @return void
  */
 public static function displaySystemError($errstr = null)
 {
     SC_Helper_HandleError_Ex::$under_error_handling = true;
     ob_clean();
     // 絵文字変換・除去フィルターが有効か評価する。
     $loaded_ob_emoji = false;
     $arrObs = ob_get_status(true);
     foreach ($arrObs as $arrOb) {
         if ($arrOb['name'] === 'SC_MobileEmoji::handler') {
             $loaded_ob_emoji = true;
             break;
         }
     }
     // 絵文字変換・除去フィルターが無効で、利用できる場合、有効にする。
     if (!$loaded_ob_emoji && class_exists('SC_MobileEmoji')) {
         ob_start(array('SC_MobileEmoji', 'handler'));
     }
     require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_SystemError_Ex.php';
     $objPage = new LC_Page_Error_SystemError_Ex();
     $objPage->init();
     if (isset($errstr)) {
         $objPage->addDebugMsg($errstr);
     }
     $objPage->process();
 }