mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Cleaned up the themes
This commit is contained in:
parent
19fa6bb4be
commit
6bb19d2fea
@ -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 "<br>" . lang_pref("your current theme is: x",$phpgw_info["user"]["preferences"]["theme"]);
|
||||
echo "<br>" . lang_pref("please, select a new theme") . ":";
|
||||
echo "<br>";
|
||||
|
||||
for ($i=0; $i<count($installed_themes); $i++) {
|
||||
echo "<br><a href=\"" . $phpgw->link("changetheme.php","ntheme="
|
||||
. $installed_themes[$i]) . "\">" . $installed_themes[$i] . "</a>\n";
|
||||
}
|
||||
|
||||
if (!isset($submit) && !$submit) {
|
||||
$phpgw->common->header();
|
||||
$phpgw->common->navbar();
|
||||
|
||||
?>
|
||||
<br><?php echo lang_pref("your current theme is: x",$phpgw_info["user"]["preferences"]["theme"]); ?>
|
||||
<br><?php echo lang_pref("please, select a new theme").":"; ?>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
for ($i=0; $i < count($installed_themes); $i++)
|
||||
echo "<br><a href=\"" . $phpgw->link("changetheme.php","submit=true&ntheme="
|
||||
. $installed_themes[$i]) . "\">" . $installed_themes[$i] . "</a>\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");
|
Loading…
Reference in New Issue
Block a user