thêm bên dưới:
$this->data['is_mobile'] = false;
$browsers_array = array('240x320', '320x240','blackberry', 'iemobile', 'minimobile', 'mobile', 'opera mini', 'pda', 'nokia', 'UC', 'Opera Mobi', 'SymbOS', 'S60', 'phone', 'Opera mini' , 'Nexian', 'Opera mobile', 'Opera window mobile', 'LG', 'Winwap', 'pocket', 'psp', 'sony', 'samsung', 'windows ce', 'epoc', 'nitro', 'j2me', 'midp', 'cldc', 'netfront', 'mot', 'up.browser', 'audiovox', 'ericsson', 'panasonic', 'philips', 'sanyo', 'sharp', 'android', 'portalmmm', 'blazer', 'avantgo', 'danger', 'series60', 'palmsource', 'pocketpc', 'smartphone', 'rover', 'ipaq', 'au-mic', 'alcatel', 'ericy', 'up.link', 'vodafone', 'wap1.', 'wap2.', 'symbian', 't-shark', 'wireless', 'webOS', 'Pre/', 'Android', 'MAUI', 'MAUI_WAP_Browser', 'java', 'ucweb', 'ucbrowser');
foreach ($browsers_array as $ua_match)
{
if (strpos($user_browser, $ua_match) !== false)
{
$style = 12;// Edit so 12 thành id style mobile
$this->data['is_mobile'] = true;
break;
}
}
nếu có style rồi thì $style = nhập id style mobile;// Edit thành id style mobile


Comment (0)
Leave a Comment