Made themes more dynamic

This commit is contained in:
jengo 2000-08-18 21:52:23 +00:00
parent e4f7581453
commit 19fa6bb4be
2 changed files with 8 additions and 3 deletions

View File

@ -105,8 +105,7 @@
{
global $phpgw, $phpgw_info, $friendly;
if (! $friendly)
echo "<A HREF=\"".$phpgw->link($phpgw_info["server"]["app_root"]
."/view.php","id=$id")."\"><img src=\""
echo "<A HREF=\"".$phpgw->link("view.php","id=$id")."\"><img src=\""
. $phpgw_info["server"]["app_images"]."/$pic\" "
. "border=\"0\" alt=\"".htmlentities($description)."\"></a>";
}

View File

@ -16,7 +16,13 @@
$phpgw_flags["currentapp"] = "preferences";
include("../header.inc.php");
$installed_themes = array('default','blue','mojo','heaven','yellows', 'rose');
$dh = opendir($phpgw_info["server"]["server_root"] . "/themes");
while ($file = readdir($dh)) {
if ($file != "." && $file != ".." && $file != "CVS") {
$installed_themes[] = substr($file,0,strpos($file,"."));
}
}
if ($phpgw_info["user"]["permissions"]["anonymous"]) {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"));