| 1 |
<?php
|
| 2 |
|
| 3 |
// Initialization
|
| 4 |
require_once('tiki-setup.php');
|
| 5 |
include_once('lib/tikilib.php');
|
| 6 |
|
| 7 |
if (isset($_SERVER['HTTP_REFERER'])) {
|
| 8 |
$orig_url = $_SERVER['HTTP_REFERER'];
|
| 9 |
} else {
|
| 10 |
$orig_url = $tikiIndex;
|
| 11 |
}
|
| 12 |
|
| 13 |
if (isset($_GET['theme'])){
|
| 14 |
$new_theme = $_GET['theme'];
|
| 15 |
if($feature_userPreferences == 'y' && $user && $change_theme == 'y') {
|
| 16 |
$tikilib->set_user_preference($user,'theme',$new_theme);
|
| 17 |
} else {
|
| 18 |
$a = setcookie('tiki-theme', $new_theme, time()+3600*24*30*12);
|
| 19 |
}
|
| 20 |
}
|
| 21 |
|
| 22 |
header("location: $orig_url");
|
| 23 |
exit;
|
| 24 |
?>
|