diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-06-05 15:49:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-06-05 15:49:35 +0000 |
commit | 50fc563bff9ed03b495fbe6c7fe007a357b2beb9 (patch) | |
tree | cd8cbbfad953616fd3e807f8b6597593651b1b75 /account.php | |
parent | efee3baf986359d5cdf5d03313303a0d4a3b3121 (diff) | |
download | brdo-50fc563bff9ed03b495fbe6c7fe007a357b2beb9.tar.gz brdo-50fc563bff9ed03b495fbe6c7fe007a357b2beb9.tar.bz2 |
* Enhancement: removed themes/list.php by integrating it directly into
account.php. list.php was just being clumpsy and did simply not
belong in the themes/-directory.
Diffstat (limited to 'account.php')
-rw-r--r-- | account.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/account.php b/account.php index 99da6862b..f5e7454d5 100644 --- a/account.php +++ b/account.php @@ -155,12 +155,16 @@ switch ($op) { $theme->header(); print("<FORM ACTION=\"account.php\" METHOD=post>\n"); print("<B>Theme:</B><BR>\n"); - include "themes/list.php"; - for ($i = 0; $i < count($themelist); $i++) { - if ($themelist[$i] != "") { - $options .= "<OPTION VALUE=\"$themelist[$i]\"". (((!empty($userinfo[theme])) && ($themelist[$i] == $cfg_theme)) || ($user->theme == $themelist[$i]) ? " SELECTED" : "") .">$themelist[$i]</OPTION>"; + + ### Loop (dynamically) through all available themes: + $handle = opendir('themes'); + while ($file = readdir($handle)) { + if(!ereg("^\.",$file) && file_exists("themes/$file/theme.class")) { + $options .= "<OPTION VALUE=\"$file\"". (((!empty($userinfo[theme])) && ($file == $cfg_theme)) || ($user->theme == $file) ? " SELECTED" : "") .">$file</OPTION>"; } } + closedir($handle); + if ($userinfo[theme]=="") $userinfo[theme] = $cfg_theme; print("<SELECT NAME=\"edit[theme]\">$options</SELECT><BR>\n"); print("<I>Changes the look and feel of the site.</I><P>\n"); |