From: <mo...@us...> - 2003-09-18 18:14:31
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1:/tmp/cvs-serv25251 Added Files: tiki-switch_theme.php Log Message: added a module for anyone can change his own theme even anonymous (patch #799103 from hanno stock) --- NEW FILE: tiki-switch_theme.php --- <?php // Initialization require_once('tiki-setup.php'); include_once('lib/tikilib.php'); if (isset($_SERVER['HTTP_REFERER'])) { $orig_url = $_SERVER['HTTP_REFERER']; } else { $orig_url = $tikiIndex; } if (isset($_GET['theme'])){ $new_theme = $_GET['theme']; if($feature_userPreferences == 'y' && $user && $change_theme == 'y') { $tikilib->set_user_preference($user,'theme',$new_theme); } else { setcookie('tiki-theme', $new_theme, time()+3600*24*30*12, '', $_SERVER['SERVER_NAME']); } } header("location: $orig_url"); exit; ?> |