Пример #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 = new Browser($last_agent);
 $browser = array('key' => $_browser->getBrowserKey(), 'name' => $_browser->getBrowser());
 $os = array('key' => $_browser->getPlatformKey(), 'name' => $_browser->getPlatform());
 $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 . "&amp;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;
Пример #2
0
// 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();
if (preg_match('/^([0-9]+)\\.(.*)$/', $browser->getVersion(), $matches)) {
    $client_info['browser']['version'] = (int) $matches[1];
} else {
    $client_info['browser']['version'] = 0;
}
$client_info['is_mobile'] = $browser->isMobile();
$client_info['is_tablet'] = $browser->isTablet();
$client_info['is_bot'] = $browser->isRobot();
$client_info['client_os'] = array('key' => $browser->getPlatformKey(), 'name' => $browser->getPlatform());
$is_mobile_tablet = $client_info['is_mobile'] . '-' . $client_info['is_tablet'];
if ($is_mobile_tablet != $nv_Request->get_string('is_mobile_tablet', 'session')) {
    $nv_Request->set_Session('is_mobile_tablet', $is_mobile_tablet);
    $nv_Request->unset_request('nv' . NV_LANG_DATA . 'themever', 'cookie');
}