diff --git a/m/index.php b/m/index.php index feec1ab..cab46c7 100755 --- a/m/index.php +++ b/m/index.php @@ -28,12 +28,14 @@ require '../sysconfig.inc.php'; // set cookie -$cookie_path = preg_replace('@\/m\/*@i', '', SENAYAN_WEB_ROOT_DIR); +$cookie_path = preg_replace('@m\/*@i', '', SENAYAN_WEB_ROOT_DIR); // create cookies of lightweight mode if (isset($_GET['fullsite'])) { - // remove cookies - @setcookie('LIGHTWEIGHT_MODE', 1, time()-43200, $cookie_path); -} else { @setcookie('LIGHTWEIGHT_MODE', 1, time()+43200, $cookie_path); } + @setcookie('FULLSITE_MODE', 1, time()+43200, $cookie_path); +} else { + // remove cookies + @setcookie('FULLSITE_MODE', 0, time()-43200, $cookie_path); +} // redirect to main bootstrap header('Location: ../index.php'); ?> diff --git a/sysconfig.inc.php b/sysconfig.inc.php index 3c2bdda..aa912bd 100755 --- a/sysconfig.inc.php +++ b/sysconfig.inc.php @@ -550,7 +550,7 @@ function stripslashes_deep($value) $sysconf['authority_level'][10] = __('Contributor'); // redirect to mobile template on mobile mode -if (defined('LIGHTWEIGHT_MODE') OR isset($_COOKIE['LIGHTWEIGHT_MODE'])) { +if (defined('LIGHTWEIGHT_MODE') AND ! isset($_COOKIE['FULLSITE_MODE'])) { $sysconf['template']['theme'] = 'lightweight'; $sysconf['template']['css'] = $sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/style.css'; $sysconf['enable_xml_detail'] = false; diff --git a/template/lightweight/index_template.inc.php b/template/lightweight/index_template.inc.php index c1b7711..c1b6dc9 100755 --- a/template/lightweight/index_template.inc.php +++ b/template/lightweight/index_template.inc.php @@ -60,6 +60,9 @@ 'site' => array('url' => 'index.php?p=member', 'text' => __('Member Area') ) + 'fullsite' => array('url' => 'm/index.php?fullsite=1', + 'text' => __('Full Site') + ) ); /*---------------------------------------------------- @@ -150,4 +153,4 @@ - \ No newline at end of file +