- $SW = 2; $OUT = ""; $TSIZE = 0;
- foreach ($THEMES['fname'] as $idx => $name) {
- // Generate download link
- $LINK = SERVER_URL."/themes/theme-".$name.".zip";
- $OUT .= "<TR>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".($idx + 1).".</TD>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\"><A href=\"".$LINK."\">".$name."</A></TD>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".MAKE_DATETIME($THEMES['fctime'][$idx], "2")."</TD>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".TRANSLATE_COMMA(round($THEMES['fsize'][$idx] / 1.024) / 1000)." ".KBYTES."</TD>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2\">".$THEMES['ver'][$idx]." (".$THEMES['cver'][$idx].")</TD>
-</TR>
-<TR>
- <TD class=\"switch_sw".$SW." bottom2\"> </TD>
- <TD colspan=\"4\" class=\"switch_sw".$SW." bottom2\">
- <FONT class=\"tiny\">".$THEMES['infos'][$idx]."</FONT>
- </TD>
-</TR>\n";
- $TSIZE += $THEMES['fsize'][$idx];
+ $OUT = ''; $SW = 2; $totalSize = 0;
+ foreach ($themes['fname'] as $idx => $name) {
+ // Prepare data
+ $content = array(
+ 'sw' => $SW,
+ 'index' => ($idx + 1),
+ 'name' => $name,
+ 'created' => generateDateTime($themes['fctime'][$idx], '2'),
+ 'size' => translateComma(round($themes['fsize'][$idx] / 1.024) / 1000),
+ 'version' => $themes['ver'][$idx],
+ 'current' => $themes['cver'][$idx],
+ 'infos' => $themes['infos'][$idx],
+ );
+
+ // Load row template
+ $OUT .= loadTemplate('admin_list_theme_row', true, $content);
+
+ // Add total size
+ $totalSize += $themes['fsize'][$idx];
+
+ // Switch color