diff options
| author | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 06:10:37 +0000 |
|---|---|---|
| committer | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 06:10:37 +0000 |
| commit | 7a60287675715612fae9e9fe3e53bb3ea94f70a1 (patch) | |
| tree | 1fd007f0f6356a9c5358ec3c22fab5b665097a09 /switch_theme.php | |
| download | themes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.tar.gz themes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.tar.bz2 themes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.zip | |
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'switch_theme.php')
| -rw-r--r-- | switch_theme.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/switch_theme.php b/switch_theme.php new file mode 100644 index 0000000..58464ff --- /dev/null +++ b/switch_theme.php @@ -0,0 +1,27 @@ +<?php + +// Initialization +require_once( '../bit_setup_inc.php' ); +include_once( KERNEL_PKG_PATH.'BitBase.php' ); + +if (isset($_SERVER['HTTP_REFERER'])) { + $orig_url = $_SERVER['HTTP_REFERER']; +} else { + $orig_url = $bitIndex; +} + +if (isset($_GET['theme']) && $gBitSystem->getPreference('feature_user_theme') == 'y'){ + $new_theme = $_GET['theme']; + if(isset($user) && $gBitSystem->getPreference('feature_userPreferences') == 'y' ) { + $gBitUser->storePreference('theme',$new_theme); + setcookie('tiki-theme', '', time()-3600*24*30*12, $gBitSystem->getPreference('cookie_path'), $gBitSystem->getPreference('cookie_domain')); + } else { + setcookie('tiki-theme', $new_theme, time()+3600*24*30*12, $gBitSystem->getPreference('cookie_path'), $gBitSystem->getPreference('cookie_domain')); + } +} else{ + setcookie('tiki-theme', '', time()-3600*24*30*12, $gBitSystem->getPreference('cookie_path'), $gBitSystem->getPreference('cookie_domain')); +} + +header("location: $orig_url"); +exit; +?> |
