// First things will do when $sec has been loaded
if (!empty($_GET) && ($_MYGET = $sec->addSlashes($_GET))) {
    $_runtime['GetFilled'] = true;
}
if (!empty($_POST) && ($_MYPOST = $sec->addSlashes($_POST))) {
    $_runtime['PostFilled'] = true;
}
unset($_GET, $_POST);
// Unset it so no one can use
// Init Cache module
$cac = new filecache($cfg['cache'], $oops, $sec);
// Init Database Unit
$db = new db($cfg['db'], $oops, $sec, $cac);
/** START OF SITE SETTING **/
$site = array();
if (!($site = $cac->read('SITE', 'SITECFG', 86400))) {
    $temp_site = array();
    if ($temp_site = $db->fetch_all_array('SELECT `settype`, `setkey`, `setvalue` FROM `' . $db->pre . 'settings`')) {
        // Load sitesetting from database
        foreach ($temp_site as $key => $val) {
            $site[$val['settype']][$val['setkey']] = $val['setvalue'];
        }
        // Check php setting for this website
        if ($_ini = ini_get_all()) {
            $site['APIFastCGI'] = isset($_ini['cgi.check_shebang_line']);
            $site['AllowUrlFopen'] = $_ini['allow_url_fopen']['local_value'];
            $site['AllowUrlInclude'] = $_ini['allow_url_include']['local_value'];
            $site['DefaultSocketTimeout'] = $_ini['default_socket_timeout']['local_value'];
            $site['FileUploadEnabled'] = $_ini['file_uploads']['local_value'];
        }
        // The htaccess has been set?