<?php
error_reporting(E_ALL); //E_ALL
function cache_shutdown_error() {
    $error = '';
    $_error = error_get_last();

    if ($_error && in_array($_error['type'], array(1, 4, 16, 64, 256, 4096, E_ALL))) {

        $error .= '<font color=red>你的代码出错了：</font></br>';
        $error .= '致命错误:' . $_error['message'] . '</br>';
        $error .= '文件:' . $_error['file'] . '</br>';
        $error .= '在第' . $_error['line'] . '行</br>';
        file_put_contents(DIR_LOGS."500error.txt","\n".date('Y-m-d H:i:s',time()).":\n".$error,FILE_APPEND);
    }
}

register_shutdown_function("cache_shutdown_error");

ini_set('display_errors', 0);
 
 
 // Version
define('VERSION', '3.0.3.2');

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}
 
// VirtualQMOD
//require_once('./vqmod/vqmod.php');
//VQMod::bootup();
require_once('./vendor/autoload.php');

//\Sentry\init(['dsn' => 'https://3a424824557a4a3b9e951bf914fb3415@o4505198324285440.ingest.sentry.io/4505198419378176' ]);

define("sentry",false); 
// VQMODDED Startup
//require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));

require_once(DIR_SYSTEM . 'startup.php');

start('catalog');
