require($INC);
} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php?module=index");
-} elseif (!EXT_IS_ACTIVE("theme")) {
- ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
+ addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
return;
}
if (!empty($_POST['member_theme'])) {
// Save theme to member's profile
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET curr_theme='%s' WHERE userid=%s LIMIT 1",
- array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__);
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
+ array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__);
// Set new theme for guests
$newTheme = SQL_ESCAPE($_POST['member_theme']);
// Change to new theme
- set_session("mxchange_theme", $newTheme);
+ set_session('mxchange_theme', $newTheme);
// Theme saved!
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_THEME_SAVED);
</TD>
<TD class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">".$THEMES['theme_name'][$key]."</TD>
<TD class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">
- <A href=\"mailto:".$THEMES['theme_email'][$key]."?Subject=[Theme:] ".$THEMES['theme_name'][$key]." (".$unix.")"."\">".$THEMES['theme_author'][$key]."</A>
+ <a href=\"mailto:".$THEMES['theme_email'][$key]."?Subject=[Theme:] ".$THEMES['theme_name'][$key]." (".$unix.")"."\">".$THEMES['theme_author'][$key]."</a>
</TD>
<TD class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">
- <A href=\"".DEREFERER($THEMES['theme_url'][$key])."\" target=\"_blank\">".$THEMES['theme_url'][$key]."</A>
+ <a href=\"".DEREFERER($THEMES['theme_url'][$key])."\" target=\"_blank\">".$THEMES['theme_url'][$key]."</a>
</TD>
<TD class=\"switch_sw".$SW." bottom2\" align=\"center\">v".$THEMES['theme_ver'][$key]."</TD>
</TR>\n";