X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-optimize.php;h=ff266c741ca34543d5c1401f878e1c7d019f0424;hb=2dbbe24bedc12bc5e4c91136277355b05b333ba3;hp=0bb91c5709d330eb3f971b9cf2721dce1ec6e8b9;hpb=427719103e37ed2e27803b833dc5db5841e4dec9;p=mailer.git diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index 0bb91c5709..ff266c741c 100644 --- a/inc/modules/admin/what-optimize.php +++ b/inc/modules/admin/what-optimize.php @@ -1,7 +1,7 @@ 0) { - $OPT = OPTIMIZE_STATUS_OPTIMIZED; - $B1 = ""; $B2 = ""; + $optimizeStatus = '{--ADMIN_OPTIMIZE_STATUS_OPTIMIZED--}'; + $B1 = ''; $B2 = ''; $gain_tabs++; - } elseif (count(explode(" ", $row_array[2])) == 0) { - $OPT = constant('OPTIMIZE_STATUS_'.strtoupper($row_array[2]).''); + } elseif (count(explode(' ', $row_array[2])) == 0) { + $optimizeStatus = '{--ADMIN_OPTIMIZE_STATUS_' . strtoupper($row_array[2]) . '--}'; } // Prepare data for the row template $content = array( - 'sw' => $SW, 'b1' => $B1, 'b2' => $B2, 'tpl' => $row_array[0], - 'rep' => $REP, - 'opt' => $OPT, - 'sum' => TRANSLATE_COMMA($row_array[3]), - 'sav' => TRANSLATE_COMMA($row_array[4]), + 'rep' => $repairStatus, + 'opt' => $optimizeStatus, + 'sum' => $row_array[3], + 'sav' => $row_array[4], ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_optimize_row", true, $content); - $SW = 3 - $SW; -} -define('__TABLE_ROWS', $OUT); + $OUT .= loadTemplate('admin_optimize_row', true, $content); +} // END - foreach + +// Transfer main data +$content = $DATA; + +// Remember rows +$content['rows'] = $OUT; -// Prepare data for the template -define('__TOTAL_TABS' , $DATA['total_tabs']); -define('__TOTAL_SIZE' , TRANSLATE_COMMA($DATA['total_size'])); -define('__TOTAL_CALLS' , $DATA['total_rows']); -define('__TOTAL_OPTIMIZED', TRANSLATE_COMMA($DATA['total_opti'])); -define('__NOW_OPTIMIZED' , $gain_tabs); -define('__NOW_SAVED' , TRANSLATE_COMMA($DATA['total_gain'])); +// Transfer data to $content for template +$content['now_optimized'] = $gain_tabs; // Load main template -LOAD_TEMPLATE("admin_optimize"); +loadTemplate('admin_optimize', false, $content); -// +// [EOF] ?>