Index: wifidog/media/base_theme/stylesheet-mobile.css
===================================================================
--- wifidog/media/base_theme/stylesheet-mobile.css	(revision 0)
+++ wifidog/media/base_theme/stylesheet-mobile.css	(revision 0)
@@ -0,0 +1,38 @@
+#left_area {
+	width: 100%;
+	position: static;
+	float: none;
+}
+
+#left_area_top {
+	position: static;
+	float: none;
+}
+
+#left_area_middle {
+	position: static;
+	float: none;
+}
+
+form.language {
+	text-align: center;
+}
+
+#main_area {
+	width: 100%;
+	float: none;
+}
+
+#main_area_top {
+	float: left;
+}
+
+#main_area_middle {
+	position: relative;
+	float: left;
+}
+
+#login_form {
+	float: none;
+}
+
Index: wifidog/config.php
===================================================================
--- wifidog/config.php	(revision 1457)
+++ wifidog/config.php	(working copy)
@@ -212,6 +212,7 @@
 // Filenames and directories
 define('NETWORK_THEME_PACKS_DIR', 'media/network_theme_packs/');
 define('STYLESHEET_NAME', 'stylesheet.css');
+define('STYLESHEET_MOBILE_NAME', 'stylesheet-mobile.css');
 define('PRINT_STYLESHEET_NAME', 'printer.css');
 define('LOGIN_PAGE_NAME', 'login.html');
 define('HOTSPOT_STATUS_PAGE', 'hotspot_status.php');
Index: wifidog/classes/MainUI.php
===================================================================
--- wifidog/classes/MainUI.php	(revision 1457)
+++ wifidog/classes/MainUI.php	(working copy)
@@ -575,6 +575,12 @@
         if ($networkThemePack) {
             $this->appendStylesheetURL($networkThemePack->getStylesheetUrl());
         }
+        // if we're an iPhone...
+        if(empty($agent)) $agent = $_SERVER['HTTP_USER_AGENT'];
+        if(stristr($agent,'iphone') or stristr($agent,'ipod')) {
+            $this->smarty->assign('iPhoneUI', true);
+            $this->appendStylesheetURL(BASE_THEME_URL . STYLESHEET_MOBILE_NAME);
+        }
         // Checks to see if the theme file exists and if so, checks whether it should always show the page header.
         if (defined('ALWAYS_SHOW_HEADER') && ALWAYS_SHOW_HEADER == true) {
             $this->smarty->assign('alwaysShowHeader', true);
Index: wifidog/templates/classes/MainUI_Display.tpl
===================================================================
--- wifidog/templates/classes/MainUI_Display.tpl	(revision 1457)
+++ wifidog/templates/classes/MainUI_Display.tpl	(working copy)
@@ -51,6 +51,9 @@
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
         <meta http-equiv="Pragma" content="no-cache">
         <meta http-equiv="Expires" content="-1">
+	{if $iPhoneUI}
+		<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=no; width=device-width" />
+	{/if}
         {$htmlHeaders}
         <title>{$title}</title>
         {foreach from=$stylesheetUrlArray item=stylesheetUrl}

