diff options
Diffstat (limited to 'h-source/Application/Include/version.php')
-rw-r--r-- | h-source/Application/Include/version.php | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/h-source/Application/Include/version.php b/h-source/Application/Include/version.php index 49afa96..d0e3928 100644 --- a/h-source/Application/Include/version.php +++ b/h-source/Application/Include/version.php @@ -24,11 +24,40 @@ if (!defined('EG')) die('Direct access not allowed!'); class Version { - public static function is() + public static $mobileAllowed = array( + 'home,index', + ); + + //get the subfolder of the Views folder where to look for the view files + public static function getViewSubfolder() + { + $type = self::get(); + + if ($type === 'mobile') + { + return 'Mobile'; + } + return 'Desktop'; + } + + //get the type of version: desktop or mobile + public static function get() { - return false; + if (isset($_COOKIE['version'])) + { + if (strcmp($_COOKIE['version'],'mobile') === 0) + { + return 'mobile'; + } + else if (strcmp($_COOKIE['version'],'desktop') === 0) + { + return 'desktop'; + } + } + return 'desktop'; } + //set the version public static function set() { if (isset($_GET['version'])) |