]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
All database names are now 'back-ticked' and constant _MYSQL_PREFIX is wrapped. Partl...
[mailer.git] / inc / libs / theme_functions.php
index 31ec274cca32e60bd48b8738b12f12416b06f066..92a2a47ac49e215c9fa14b71f8e864c4acea331f 100644 (file)
@@ -68,9 +68,9 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        // Construct selection form for the box template
        $OUT = "";
        foreach ($THEMES['theme_unix'] as $key => $theme) {
-               $OUT .= "  <OPTION value=\"".$theme."\"";
+               $OUT .= "  <option value=\"".$theme."\"";
                if ($theme == GET_CURR_THEME()) $OUT .= " selected=\"selected\"";
-               $OUT .= ">".$THEMES['theme_name'][$key]."</OPTION>\n";
+               $OUT .= ">".$THEMES['theme_name'][$key]."</option>\n";
        } // END - foreach
 
        // Return generated selection
@@ -101,7 +101,7 @@ function THEME_GET_VERSION ($name) {
                incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Load version from database
-               $result = SQL_QUERY_ESC("SELECT theme_ver FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Entry found?
@@ -146,7 +146,7 @@ function THEME_IS_ACTIVE ($name) {
                incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Check if current theme is already imported or not
-               $result = SQL_QUERY_ESC("SELECT theme_active FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Is the theme active and installed?
@@ -182,7 +182,7 @@ function GET_CURR_THEME_NAME () {
                incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Check if current theme is already imported or not
-               $result = SQL_QUERY_ESC("SELECT theme_name FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Load theme name
@@ -205,7 +205,7 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme)) {
        $newTheme = $_POST['new_theme'];
 
        // Change to new theme
-       set_session("mxchange_theme", $newTheme);
+       set_session('mxchange_theme', $newTheme);
 
        // Remove current from array and set new
        $theme = sprintf("%stheme/%s/theme.php", PATH, $currTheme);