-}
- elseif (sizeof($PATCHES['fname']) > 0)
-{
- // Some patches are available
- $OUT = ""; $SW = "2";
- foreach ($PATCHES['fname'] as $idx=>$file)
- {
- $SIZE = TRANSLATE_COMMA(round($PATCHES['fsize'][$idx]/102.4)/10);
- $content = array(
- 'sw' => $SW,
- 'patch_url' => SERVER_URL."/patches/".$file,
- 'patch_title' => str_replace("_", " ", str_replace(".zip", "", $file)),
- 'patch_ctime' => MAKE_DATETIME($PATCHES['ctime'][$idx], "2"),
- 'patch_size' => $SIZE,
- 'patch_desc' => COMPILE_CODE($PATCHES['descr'][$idx]),
- );
- // Evaluate descrition code
- $eval = "\$content['patch_desc'] = \"".$content['patch_desc']."\";";
- eval($eval);
-
- // Load template, switch color and count total size up
- $OUT .= LOAD_TEMPLATE("admin_patches_row", true, $content);
- $SW = 3 - $SW;
- }
- define('__PATCH_ROWS', $OUT);
-
- // Total size
- define('__TOTAL_SIZE', TRANSLATE_COMMA($TOTAL_SIZE / 1024));
-
- // Load main template
- LOAD_TEMPLATE("admin_patches");
-}
- else
-{