egroupware_official/preferences/changetheme.php

48 lines
1.8 KiB
PHP
Raw Normal View History

2000-08-18 05:24:22 +02:00
<?php
/**************************************************************************\
* phpGroupWare - preferences *
* http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "preferences");
2000-08-18 05:24:22 +02:00
include("../header.inc.php");
2000-08-19 00:14:08 +02:00
if ($ntheme) {
$theme = $ntheme;
$phpgw->common->preferences_update($phpgw_info["user"]["userid"],"theme","common");
2000-08-19 00:14:08 +02:00
Header("location: " . $phpgw->link("changetheme.php"));
exit;
}
2000-08-18 23:52:23 +02:00
$dh = opendir($phpgw_info["server"]["server_root"] . "/themes");
while ($file = readdir($dh)) {
2000-08-20 00:56:14 +02:00
# if ($file != "." && $file != ".." && $file != "CVS") {
if ( eregi( "\.theme$", $file ) ) {
2000-08-18 23:52:23 +02:00
$installed_themes[] = substr($file,0,strpos($file,"."));
}
}
2000-08-18 05:24:22 +02:00
$phpgw->common->phpgw_header();
2000-08-19 00:14:08 +02:00
$phpgw->common->navbar();
2000-08-18 05:24:22 +02:00
2000-09-07 23:35:30 +02:00
echo "<br>" . lang("your current theme is: x",$phpgw_info["user"]["preferences"]["theme"]);
echo "<br>" . lang("please, select a new theme") . ":";
2000-08-19 00:14:08 +02:00
echo "<br>";
2000-08-18 05:24:22 +02:00
2000-08-19 00:14:08 +02:00
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";
2000-08-18 05:24:22 +02:00
}
$phpgw->common->phpgw_footer();
2000-08-20 00:56:14 +02:00
?>