X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-theme_edit.php;h=15418d191cb147ff6d22b74768d46c1670caee25;hb=306158d5fb74ec96f0c2321834f702ecb0874a7d;hp=9246c4bf46228ecd8f73fc7abd0121115e1c7871;hpb=75ad748a68473ace540251427a74fb781b1145e9;p=mailer.git diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 9246c4bf46..15418d191c 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -55,7 +55,7 @@ if ($SEL > 0) if (isset($_POST['status'])) { // Change status - if ($_POST['active'][$id] == "Y") + if ($_POST['active'][$id] == 'Y') { $SQL = "UPDATE "._MYSQL_PREFIX."_themes SET theme_active='N' WHERE id='".$id."' LIMIT 1"; } @@ -78,14 +78,11 @@ if ($SEL > 0) // Output generated? if (empty($OUT)) ADMIN_THEME_NO_OUTPUT; -} - elseif (!empty($_GET['default_theme'])) -{ +} elseif (!empty($_GET['default_theme'])) { // Save theme - $POST['default_theme'] = $_GET['default_theme']; - @setcookie("mxchange_theme", $POST['default_theme'], (time() + 60*60*24*365), COOKIE_PATH); - $_COOKIE['mxchange_theme'] = $POST['default_theme']; - ADMIN_SAVE_SETTINGS($POST, "_config", "config='0'"); + $POST['default_theme'] = SQL_ESCAPE($_GET['default_theme']); + set_session("mxchange_theme", $POST['default_theme'], (time() + 60*60*24*365), COOKIE_PATH); + ADMIN_SAVE_SETTINGS($POST); } // Switch to testing mode