| 195 | | $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme'] ); |
| | 195 | $theme = $user['theme']; |
| | 196 | |
| | 197 | if (!isset($_SESSION['is_mobile'])) |
| | 198 | { |
| | 199 | include_once(PHPWG_ROOT_PATH.'include/mdetect.php'); |
| | 200 | $uagent_obj = new uagent_info(); |
| | 201 | if ($_SESSION['is_mobile'] = $uagent_obj->DetectMobileLong()) |
| | 202 | { |
| | 203 | $_SESSION['use_mobile_theme'] = !empty($conf['mobile_theme']); |
| | 204 | } |
| | 205 | } |
| | 206 | if ($_SESSION['is_mobile']) |
| | 207 | { |
| | 208 | if (isset($_REQUEST['mobile'])) |
| | 209 | { |
| | 210 | $_SESSION['use_mobile_theme'] = get_boolean($_REQUEST['mobile']); |
| | 211 | } |
| | 212 | if ($_SESSION['use_mobile_theme']) |
| | 213 | { |
| | 214 | $theme = $conf['mobile_theme']; |
| | 215 | } |
| | 216 | } |
| | 217 | $template = new Template(PHPWG_ROOT_PATH.'themes', $theme ); |