/[pkg-tikiwiki]/trunk/tiki-switch_theme.php
ViewVC logotype

Contents of /trunk/tiki-switch_theme.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations) (download)
Tue Jul 11 06:27:24 2006 UTC (6 years, 11 months ago) by marcusb-guest
File size: 520 byte(s)
Imported into trunk (integration branch).
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 ?>

  ViewVC Help
Powered by ViewVC 1.1.5