if ($client_info['is_bot'] and empty($client_info['bot_info']['allowed'])) { trigger_error('Sorry! Website does not support the bot', 256); } //Xac dinh co phai truy cap bang mobile hay khong $client_info['is_mobile'] = nv_checkmobile(); //Chan hoac chuyen huong neu truy cap tu mobile //if ($client_info['is_mobile']) // trigger_error('Sorry! Website does not support the browser your mobile', 256); //Ket noi voi class chong flood if (defined('NV_IS_FLOOD_BLOCKER') and NV_IS_FLOOD_BLOCKER == 1 and !$nv_Request->isset_request('admin', 'session') and (!$nv_Request->isset_request('second', 'get') or $nv_Request->isset_request('second', 'get') and $client_info['is_myreferer'] != 1)) { require_once NV_ROOTDIR . '/includes/core/flood_blocker.php'; } //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')) { include_once NV_ROOTDIR . "/includes/core/captcha.php"; } //Bat dau phien lam viec cua MySQL require_once NV_ROOTDIR . '/includes/class/mysql.class.php'; $db_config['new_link'] = NV_MYSQL_NEW_LINK; $db_config['persistency'] = NV_MYSQL_PERSISTENCY; $db = new sql_db($db_config); if (!empty($db->error)) { $die = !empty($db->error['user_message']) ? $db->error['user_message'] : $db->error['message']; $die .= !empty($db->error['code']) ? ' (Code: ' . $db->error['code'] . ')' : ''; trigger_error($die, 256); } unset($db_config['dbpass']);
$client_info['browser'] = array_combine(array('key', 'name'), explode('|', nv_getBrowser(NV_USER_AGENT))); if (preg_match('/^([^0-9]+)([0-9]+)\\.(.*)$/', $client_info['browser']['name'], $matches)) { $client_info['browser']['version'] = (int) $matches[2]; unset($matches); } else { $client_info['browser']['version'] = 0; } } // Xac dinh co phai truy cap bang mobile hay khong $client_info['is_mobile'] = nv_checkmobile(NV_USER_AGENT); // Ket noi voi class chong flood if ($global_config['is_flood_blocker'] and !$nv_Request->isset_request('admin', 'session') and (!$nv_Request->isset_request('second', 'get') or $nv_Request->isset_request('second', 'get') and $client_info['is_myreferer'] != 1)) { require NV_ROOTDIR . '/includes/core/flood_blocker.php'; } // 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))); // Captcha if ($nv_Request->isset_request('scaptcha', 'get')) { require NV_ROOTDIR . '/includes/core/captcha.php'; } // Class ma hoa du lieu require NV_ROOTDIR . '/includes/class/crypt.class.php'; $crypt = new nv_Crypt($global_config['sitekey']); $global_config['ftp_user_pass'] = $crypt->aes_decrypt(nv_base64_decode($global_config['ftp_user_pass'])); if (isset($nv_plugin_area[1])) { // Kết nối với các plugin Trước khi kết nối CSDL foreach ($nv_plugin_area[1] as $_fplugin) { include NV_ROOTDIR . '/includes/plugin/' . $_fplugin; } } // Bat dau phien lam viec cua MySQL
$level_txt = '<b>' . $lang_module['level2'] . '</b>'; } else { $array_mod = array(); foreach ($list_modules as $row_mod) { if (!empty($row_mod['admins']) and in_array($row['admin_id'], explode(",", $row_mod['admins']))) { $array_mod[] = $row_mod['custom_title']; } } $level_txt = implode(', ', $array_mod); } $last_login = intval($row['last_login']); $last_login = $last_login ? nv_date("l, d/m/Y H:i", $last_login) : $lang_module['last_login0']; $last_agent = $row['last_agent']; $row['full_name'] = empty($row['full_name']) ? $row['full_name'] : $row['username']; $browser = array_combine(array('key', 'name'), explode("|", nv_getBrowser($last_agent, NV_ROOTDIR . '/includes/ini/br.ini'))); $os = array_combine(array('key', 'name'), explode("|", nv_getOs($last_agent, NV_ROOTDIR . '/includes/ini/os.ini'))); $is_suspend = intval($row['is_suspend']); if (empty($is_suspend)) { $is_suspend = $lang_module['is_suspend0']; } else { $last_reason = unserialize($row['susp_reason']); $last_reason = array_shift($last_reason); list($susp_admin_id, $susp_admin_name) = $db->sql_fetchrow($db->sql_query("SELECT `userid`,`full_name` FROM `" . NV_USERS_GLOBALTABLE . "` WHERE `userid`=" . intval($last_reason['start_admin']))); $susp_admin_name = "<a href=\"" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&id=" . $susp_admin_id . "\">" . $susp_admin_name . "</a>"; $is_suspend = sprintf($lang_module['is_suspend1'], nv_date("d/m/Y H:i", $last_reason['starttime']), $susp_admin_name, $last_reason['info']); } $thead = array(); $thead['level'] = $level; if (defined("NV_IS_GODADMIN")) { $thead['edit'] = 1; $thead['chg_is_suspend'] = $row['admin_id'] != $admin_info['admin_id'] ? 1 : 0;
} elseif ($level == 2) { $level_txt = '<strong>' . $lang_global['level2'] . '</strong>'; } else { $array_mod = array(); foreach ($list_modules as $row_mod) { if (!empty($row_mod['admins']) and in_array($row['admin_id'], explode(',', $row_mod['admins']))) { $array_mod[] = $row_mod['custom_title']; } } $level_txt = implode(', ', $array_mod); } $last_login = intval($row['last_login']); $last_login = $last_login ? nv_date('l, d/m/Y H:i', $last_login) : $lang_module['last_login0']; $last_agent = $row['last_agent']; $browser = array_combine(array('key', 'name'), explode('|', nv_getBrowser($last_agent))); $os = array_combine(array('key', 'name'), explode('|', nv_getOs($last_agent))); $is_suspend = intval($row['is_suspend']); if (empty($is_suspend)) { $is_suspend = $lang_module['is_suspend0']; } else { $last_reason = unserialize($row['susp_reason']); $last_reason = array_shift($last_reason); list($susp_admin_id, $susp_admin_name) = $db->query('SELECT userid,first_name,last_name FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid=' . intval($last_reason['start_admin']))->fetch(3); $susp_admin_name = "<a href=\"" . NV_BASE_ADMINURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&id=" . $susp_admin_id . "\">" . $susp_admin_name . "</a>"; $is_suspend = sprintf($lang_module['is_suspend1'], nv_date('d/m/Y H:i', $last_reason['starttime']), $susp_admin_name, $last_reason['info']); } $thead = array(); $thead['level'] = $level; if (defined('NV_IS_GODADMIN')) { $thead['edit'] = 1; $thead['chg_is_suspend'] = $row['admin_id'] != $admin_info['admin_id'] ? 1 : 0;