From 6bb19d2fea5513239c2c1c017ed98269176ae0b2 Mon Sep 17 00:00:00 2001 From: jengo Date: Fri, 18 Aug 2000 22:14:08 +0000 Subject: [PATCH] Cleaned up the themes --- preferences/changetheme.php | 49 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/preferences/changetheme.php b/preferences/changetheme.php index 7cbf0709e8..fe77dc2e1f 100755 --- a/preferences/changetheme.php +++ b/preferences/changetheme.php @@ -17,6 +17,18 @@ $phpgw_flags["currentapp"] = "preferences"; include("../header.inc.php"); + if ($phpgw_info["user"]["permissions"]["anonymous"]) { + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/")); + exit; + } + + if ($ntheme) { + $theme = $ntheme; + $phpgw->preferences->update($phpgw->session->loginid,"theme"); + Header("location: " . $phpgw->link("changetheme.php")); + exit; + } + $dh = opendir($phpgw_info["server"]["server_root"] . "/themes"); while ($file = readdir($dh)) { if ($file != "." && $file != ".." && $file != "CVS") { @@ -24,31 +36,16 @@ } } - if ($phpgw_info["user"]["permissions"]["anonymous"]) { - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/")); - exit; + $phpgw->common->header(); + $phpgw->common->navbar(); + + echo "
" . lang_pref("your current theme is: x",$phpgw_info["user"]["preferences"]["theme"]); + echo "
" . lang_pref("please, select a new theme") . ":"; + echo "
"; + + for ($i=0; $ilink("changetheme.php","ntheme=" + . $installed_themes[$i]) . "\">" . $installed_themes[$i] . "\n"; } - if (!isset($submit) && !$submit) { - $phpgw->common->header(); - $phpgw->common->navbar(); - - ?> -
-
-
- -link("changetheme.php","submit=true&ntheme=" - . $installed_themes[$i]) . "\">" . $installed_themes[$i] . "\n"; - } else { - $theme = $ntheme; - $phpgw->preferences->update($phpgw->session->loginid,"theme"); - - // This way the theme is changed right away. - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] - . "/preferences/")); - } - include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); - + include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); \ No newline at end of file