Example #1
0
define('NV_USER_AGENT', $nv_Request->user_agent);
//HTTP_USER_AGENT
define("NV_BASE_SITEURL", $nv_Request->base_siteurl . '/');
//vd: /ten_thu_muc_chua_site/
define("NV_BASE_ADMINURL", $nv_Request->base_adminurl . '/');
//vd: /ten_thu_muc_chua_site/admin/
define('NV_DOCUMENT_ROOT', $nv_Request->doc_root);
// D:/AppServ/www
define('NV_EOL', strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? "\r\n" : (strtoupper(substr(PHP_OS, 0, 3) == 'MAC') ? "\r" : "\n"));
//Ngat dong
define('NV_UPLOAD_MAX_FILESIZE', min(nv_converttoBytes(ini_get('upload_max_filesize')), nv_converttoBytes(ini_get('post_max_size')), $global_config['nv_max_size']));
define('NV_UPLOADS_REAL_DIR', NV_ROOTDIR . '/' . NV_UPLOADS_DIR);
//Xac dinh duong dan thuc den thu muc upload
define('NV_CACHE_PREFIX', md5($global_config['sitekey'] . NV_BASE_SITEURL));
//Hau to cua file cache
if (preg_match("/^[0-9]{10,}\$/", $nv_Request->get_string('nocache', 'get', '')) and $client_info['is_myreferer'] === 1) {
    define('NV_IS_AJAX', true);
}
//Chan truy cap neu HTTP_USER_AGENT == 'none'
if (NV_USER_AGENT == "none") {
    trigger_error('We\'re sorry. The software you are using to access our website is not allowed. Some examples of this are e-mail harvesting programs and programs that will  copy websites to your hard drive. If you feel you have gotten this message  in error, please send an e-mail addressed to admin. Your I.P. address has been logged. Thanks.', 256);
}
//xac dinh co phai User_Agent cua NukeViet hay khong
if (NV_USER_AGENT == 'NUKEVIET CMS ' . $global_config['version'] . '. Developed by VINADES. Url: http://nukeviet.vn. Code: ' . md5($global_config['sitekey'])) {
    define('NV_IS_MY_USER_AGENT', true);
}
//Xac dinh co phai la bot hay khong
$client_info['bot_info'] = nv_check_bot();
$client_info['is_bot'] = !empty($client_info['bot_info']) ? 1 : 0;
//Neu la bot va bot bi cam truy cap
if ($client_info['is_bot'] and empty($client_info['bot_info']['allowed'])) {
Example #2
0
//vd: D:/AppServ/www/ten_thu_muc_chua_site/sess/
$client_info['session_id'] = $nv_Request->session_id;
//ten cua session
$client_info['referer'] = $nv_Request->referer;
//referer
$client_info['is_myreferer'] = $nv_Request->referer_key;
//0 = referer tu ben ngoai site, 1 = referer noi bo, 2 = khong co referer
$client_info['selfurl'] = $nv_Request->my_current_domain . $nv_Request->request_uri;
//trang dang xem
$client_info['agent'] = $nv_Request->user_agent;
//HTTP_USER_AGENT
$client_info['session_id'] = $nv_Request->session_id;
//ten cua session
$global_config['sitekey'] = md5($_SERVER['SERVER_NAME'] . NV_ROOTDIR . $client_info['session_id']);
//Xac dinh co phai AJAX hay khong
if (preg_match("/^[0-9]{10,}\$/", $nv_Request->get_string('nocache', 'get', '')) and $client_info['is_myreferer'] === 1) {
    define('NV_IS_AJAX', true);
}
//Chan truy cap neu HTTP_USER_AGENT == 'none'
if (NV_USER_AGENT == "none") {
    trigger_error('We\'re sorry. The software you are using to access our website is not allowed. Some examples of this are e-mail harvesting programs and programs that will  copy websites to your hard drive. If you feel you have gotten this message  in error, please send an e-mail addressed to admin. Your I.P. address has been logged. Thanks.', 256);
}
//Xac dinh co phai la bot hay khong
$client_info['bot_info'] = nv_check_bot();
$client_info['is_bot'] = !empty($client_info['bot_info']) ? 1 : 0;
//Xac dinh borwser cua client
$client_info['browser'] = $client_info['is_bot'] ? array('key' => "Unknown", 'name' => 'Unknown') : array_combine(array('key', 'name'), explode("|", nv_getBrowser(NV_USER_AGENT, NV_ROOTDIR . '/includes/ini/br.ini')));
//Xac dinh OS cua client
$client_info['client_os'] = $client_info['is_bot'] ? array('key' => "Robot", 'name' => $client_info['bot_info']['name']) : array_combine(array('key', 'name'), explode("|", nv_getOs(NV_USER_AGENT, NV_ROOTDIR . '/includes/ini/os.ini')));
//Captcha
if ($nv_Request->isset_request('scaptcha', 'get')) {
Example #3
0
$sys_info['register_globals'] = $nv_Request->is_register_globals;
// 0 = khong, 1 = bat
$sys_info['magic_quotes_gpc'] = $nv_Request->is_magic_quotes_gpc;
// 0 = khong, 1 = co
// vd: D:/AppServ/www/ten_thu_muc_chua_site/sess/
$sys_info['sessionpath'] = $nv_Request->session_save_path;
// ten cua session
$client_info['session_id'] = $nv_Request->session_id;
// referer
$client_info['referer'] = $nv_Request->referer;
// 0 = referer tu ben ngoai site, 1 = referer noi bo, 2 = khong co referer
$client_info['is_myreferer'] = $nv_Request->referer_key;
// trang dang xem
$client_info['selfurl'] = $nv_Request->my_current_domain . $nv_Request->request_uri;
// Xac dinh co phai AJAX hay khong
if (preg_match('/^[0-9]{10,}$/', $nv_Request->get_string('nocache', 'get', '')) and $client_info['is_myreferer'] === 1) {
    define('NV_IS_AJAX', true);
}
// Chan truy cap neu HTTP_USER_AGENT == 'none'
if (NV_USER_AGENT == 'none' and NV_ANTI_AGENT) {
    trigger_error('We\'re sorry. The software you are using to access our website is not allowed. Some examples of this are e-mail harvesting programs and programs that will copy websites to your hard drive. If you feel you have gotten this message in error, please send an e-mail addressed to admin. Your I.P. address has been logged. Thanks.', 256);
}
// xac dinh co phai User_Agent cua NukeViet hay khong
if (NV_USER_AGENT == 'NUKEVIET CMS ' . $global_config['version'] . '. Developed by VINADES. Url: http://nukeviet.vn. Code: ' . md5($global_config['sitekey'])) {
    define('NV_IS_MY_USER_AGENT', true);
}
// Xac dinh co phai la bot hay khong
$client_info['bot_info'] = nv_check_bot();
$client_info['is_bot'] = !empty($client_info['bot_info']) ? 1 : 0;
// Neu la bot va bot bi cam truy cap
if ($client_info['is_bot'] and empty($client_info['bot_info']['allowed'])) {
Example #4
0
$sys_info['register_globals'] = $nv_Request->is_register_globals;
// 0 = khong, 1 = bat
$sys_info['magic_quotes_gpc'] = $nv_Request->is_magic_quotes_gpc;
// 0 = khong, 1 = co
// vd: D:/AppServ/www/ten_thu_muc_chua_site/sess/
$sys_info['sessionpath'] = $nv_Request->session_save_path;
// ten cua session
$client_info['session_id'] = $nv_Request->session_id;
// referer
$client_info['referer'] = $nv_Request->referer;
// 0 = referer tu ben ngoai site, 1 = referer noi bo, 2 = khong co referer
$client_info['is_myreferer'] = $nv_Request->referer_key;
// trang dang xem
$client_info['selfurl'] = $nv_Request->my_current_domain . $nv_Request->request_uri;
// Xac dinh co phai AJAX hay khong
if (preg_match('/^[0-9]{10,}$/', $nv_Request->get_string('nocache', 'get', '')) and $client_info['is_myreferer'] === 1) {
    define('NV_IS_AJAX', true);
}
// Chan truy cap neu HTTP_USER_AGENT == 'none'
if (NV_USER_AGENT == 'none' and NV_ANTI_AGENT) {
    trigger_error('We\'re sorry. The software you are using to access our website is not allowed. Some examples of this are e-mail harvesting programs and programs that will copy websites to your hard drive. If you feel you have gotten this message in error, please send an e-mail addressed to admin. Your I.P. address has been logged. Thanks.', 256);
}
// xac dinh co phai User_Agent cua NukeViet hay khong
if (NV_USER_AGENT == 'NUKEVIET CMS ' . $global_config['version'] . '. Developed by VINADES. Url: http://nukeviet.vn. Code: ' . md5($global_config['sitekey'])) {
    define('NV_IS_MY_USER_AGENT', true);
}
// Xac dinh borwser cua client
$browser = new Browser(NV_USER_AGENT);
$client_info['browser'] = array();
$client_info['browser']['key'] = $browser->getBrowserKey();
$client_info['browser']['name'] = $browser->getBrowser();
Example #5
0
//0 = khong, 1 = bat
$sys_info['magic_quotes_gpc'] = $nv_Request->is_magic_quotes_gpc;
// 0 = khong, 1 = co
$sys_info['sessionpath'] = $nv_Request->session_save_path;
//vd: D:/AppServ/www/ten_thu_muc_chua_site/sess/
$client_info['session_id'] = $nv_Request->session_id;
//ten cua session
$client_info['referer'] = $nv_Request->referer;
//referer
$client_info['is_myreferer'] = $nv_Request->referer_key;
//0 = referer tu ben ngoai site, 1 = referer noi bo, 2 = khong co referer
$client_info['selfurl'] = $nv_Request->my_current_domain . $nv_Request->request_uri;
//trang dang xem
$client_info['agent'] = $nv_Request->user_agent;
//HTTP_USER_AGENT
if (preg_match("/^[0-9]{10,}\$/", $nv_Request->get_string('nocache', 'get', '')) and $client_info['is_myreferer'] === 1) {
    define('NV_IS_AJAX', true);
}
//Chan truy cap neu HTTP_USER_AGENT == 'none'
if (NV_USER_AGENT == "none") {
    trigger_error('We\'re sorry. The software you are using to access our website is not allowed. Some examples of this are e-mail harvesting programs and programs that will  copy websites to your hard drive. If you feel you have gotten this message  in error, please send an e-mail addressed to admin. Your I.P. address has been logged. Thanks.', 256);
}
//xac dinh co phai User_Agent cua NukeViet hay khong
if (NV_USER_AGENT == 'NUKEVIET CMS ' . $global_config['version'] . '. Developed by VINADES. Url: http://nukeviet.vn. Code: ' . md5($global_config['sitekey'])) {
    define('NV_IS_MY_USER_AGENT', true);
}
//Xac dinh co phai la bot hay khong
$client_info['bot_info'] = nv_check_bot();
$client_info['is_bot'] = !empty($client_info['bot_info']) ? 1 : 0;
//Neu la bot va bot bi cam truy cap
if ($client_info['is_bot'] and empty($client_info['bot_info']['allowed'])) {