aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-12-14 15:59:54 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-12-14 15:59:54 +0000
commit805b61328629813aad77c2e0f935e31cb381e500 (patch)
tree6f7fbd10bec359516b9dddb437e6472baa1ba431 /h-source/Application/Include
parentf49ae662a10351e84e97aebd15394df5a591898f (diff)
added the first view files of the mobile version
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r--h-source/Application/Include/version.php33
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']))