public static function cge_is_smartphone($params, &$smarty) { $browser = cge_utils::get_browser(); $smartphone = $browser->isMobile(); if (isset($params['assign'])) { $smarty->assign($params['assign'], $smartphone); return; } return $smartphone; }
protected function can_smart_embed($src) { global $CMS_ADMIN_PAGE; global $CMS_STYLESHEET; $imagsize = filesize($src); $browser = cge_utils::get_browser(); switch ($browser->getBrowser()) { case Browser::BROWSER_IE: $ver = $browser->getVersion(); if ($ver <= 7) { return FALSE; } if ($CMS_STYLESHEET && $ver < 8) { return FALSE; } if ($ver == 8 && $imagsize >= 32 * 1024) { return FALSE; } return TRUE; default: return TRUE; } }