summaryrefslogtreecommitdiffstats
path: root/usr/local/www/head.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-17 17:33:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-17 17:33:40 +0000
commite06f19fa3b42cf29d5e0a6584d09fcc1d9a07244 (patch)
tree6d10f46cc7a6d7fa3deb5066d7d70efaa570976d /usr/local/www/head.inc
parentcaf7d0bc3914824210dfa48ecb027b528dcc7436 (diff)
downloadpfsense-e06f19fa3b42cf29d5e0a6584d09fcc1d9a07244.zip
pfsense-e06f19fa3b42cf29d5e0a6584d09fcc1d9a07244.tar.gz
Detect iphone / ipod
Diffstat (limited to 'usr/local/www/head.inc')
-rwxr-xr-xusr/local/www/head.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index 4c9f61c..ee45ace 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -8,6 +8,15 @@ if($config['theme'] <> "")
else
$g['theme'] = "pfsense";
+/*
+ * If this device is an apple ipod/iphone
+ * switch the theme to one that works with it.
+ */
+$apple_ua = array("iPhone","iPod");
+foreach($apple_ua as $useragent)
+ if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
+ $g['theme'] = "pfsense";
+
$pagetitle = gentitle( $pgtitle );
?>
OpenPOWER on IntegriCloud