-$OUT = ""; $SW = 2;
-foreach ($THEMES['theme_unix'] as $key=>$unix)
-{
- $default = "";
- if (get_session('mxchange_theme') == $unix) $default = " checked selected";
-
- // Add row
- $OUT .= "<TR>
- <TD class=\"switch_sw".$SW." bottom2 right2\" align=\"center\" height=\"30\">
- <INPUT type=\"radio\" name=\"member_theme\" class=\"member_normal\" value=\"".$unix."\"".$default.">
- </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>
- </TD>
- <TD class=\"switch_sw".$SW." bottom2 right2\" align=\"center\">
- <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";
- $SW = 3 - $SW;
-}
-if (empty($OUT))
-{
- // No themes found???
- $OUT = "<TR>
- <TD colspan=\"5\" class=\"bottom2\" height=\"80\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, MEMBER_NO_THEMES_FOUND)."
- </TD>
-</TR>\n";
-}
-define('__THEME_LIST', $OUT);
+$OUT = '';
+foreach ($themes['theme_unix'] as $key => $unix) {
+ $default = '';
+ if (getCurrentTheme() == $unix) {
+ $default = ' checked="checked"';
+ } // END - if
+
+ // Prepare content
+ $content = array(
+ 'unix' => $unix,
+ 'default' => $default,
+ 'theme_name' => $themes['theme_name'][$key],
+ 'theme_email' => $themes['theme_email'][$key],
+ 'theme_author' => $themes['theme_author'][$key],
+ 'theme_url' => $themes['theme_url'][$key],
+ 'theme_version' => $themes['theme_version'][$key]
+ );
+
+ // Load row template
+ $OUT .= loadTemplate('member_themes_row', TRUE, $content);
+} // END - foreach
+
+if (empty($OUT)) {
+ // No themes found???
+ $OUT = '<tr>
+ <td colspan="5" class="bottom" height="80">
+ ' . displayMessage('{--MEMBER_NO_THEMES_FOUND--}', TRUE) . '
+ </td>
+</tr>';
+} // END - if