本文整理汇总了PHP中Browser::getPlatformKey方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::getPlatformKey方法的具体用法?PHP Browser::getPlatformKey怎么用?PHP Browser::getPlatformKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::getPlatformKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$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 . "&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;
示例2: define
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');
}
// 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';
}
// Captcha
if ($nv_Request->isset_request('scaptcha', 'get')) {
require NV_ROOTDIR . '/includes/core/captcha.php';
}
// Class ma hoa du lieu
$crypt = new nv_Crypt($global_config['sitekey']);