]> git.mxchange.org Git - mailer.git/blobdiff - inc/theme-manager.php
ADMIN_MEMBER_SELECTION_BOX() does now return a select-tag with the member list
[mailer.git] / inc / theme-manager.php
index 5a3f843988c85669372c6ec052b5f12a8c1d195f..0ee37962e4c86e77643b4776632f04970bf243ed 100644 (file)
@@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 // Always make sure the session management is initialized first
 require_once(PATH."inc/session.php");
 
-//
+// Get current theme name
 function GET_CURR_THEME() {
        global $INC_POOL, $_CONFIG, $CSS;
 
@@ -69,10 +69,10 @@ function GET_CURR_THEME() {
                $theme = sprintf("%stheme/%s/theme.php", PATH, $_GET['theme']);
 
                // Installation mode active
-               if ((!empty($_GET['theme'])) && (file_exists($theme)) && (is_readable($theme))) {
+               if ((!empty($_GET['theme'])) && (FILE_READABLE($theme))) {
                        // Set cookie from URL data
                        set_session("mxchange_theme", $_GET['theme']);
-               } elseif (file_exists(PATH."theme/".$_POST['theme']."/theme.php")) {
+               } elseif (FILE_READABLE(PATH."theme/".$_POST['theme']."/theme.php")) {
                        // Set cookie from posted data
                        set_session("mxchange_theme", $_POST['theme']);
                }
@@ -88,7 +88,7 @@ function GET_CURR_THEME() {
        $theme = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($ret));
 
        // Try to load the requested include file
-       if ((@file_exists($theme)) && (is_readable($theme))) $INC_POOL[] = $theme;
+       if (FILE_READABLE($theme)) $INC_POOL[] = $theme;
 
        // Return theme value
        return $ret;
@@ -112,7 +112,7 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        while(list($theme) = SQL_FETCHROW($result)) {
                // Load it's theme.php file
                $INC = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($theme));
-               if ((file_exists($INC)) && (is_readable($INC))) {
+               if (FILE_READABLE($INC)) {
                        // And save all data in array
                        require($INC);
                        $THEMES['theme_unix'][] = $theme;