Example #1
0
}
if ($global_config['is_url_rewrite']) {
    $check_rewrite_file = nv_check_rewrite_file();
    if (!$check_rewrite_file) {
        $global_config['is_url_rewrite'] = 0;
    }
    if (empty($global_config['is_url_rewrite'])) {
        $db->sql_query("UPDATE `" . NV_CONFIG_GLOBALTABLE . "` SET `config_value`= '0' WHERE `module`='global' AND `config_name` = 'is_url_rewrite'");
        nv_delete_all_cache();
        //xoa toan bo cache
    }
}
if (defined('NV_ADMIN')) {
    if (!in_array(NV_LANG_DATA, $global_config['allow_adminlangs'])) {
        if ($global_config['lang_multi']) {
            $nv_Request->set_Cookie('data_lang', $global_config['site_lang'], NV_LIVE_COOKIE_TIME);
        }
        Header("Location: " . NV_BASE_ADMINURL);
        exit;
    }
    if (!in_array(NV_LANG_INTERFACE, $global_config['allow_adminlangs'])) {
        if ($global_config['lang_multi']) {
            $nv_Request->set_Cookie('int_lang', $global_config['site_lang'], NV_LIVE_COOKIE_TIME);
        }
        Header("Location: " . NV_BASE_ADMINURL);
        exit;
    }
}
//Class ma hoa du lieu $crypt->hash($data)
require_once NV_ROOTDIR . '/includes/class/crypt.class.php';
$crypt = new nv_Crypt($global_config['sitekey'], NV_CRYPT_SHA1 == 1 ? 'sha1' : 'md5');