X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-optimize.php;h=571df6957cc8b42f97dab9e89ab9f2156c781da3;hb=8ce32e702f3caa76b8d446902948e83e1e6854c8;hp=45d3032af6ad29ae2f270a7e7565825ad045384a;hpb=414570c5081d337bb6c28dcf521bd8bca02f69e7;p=mailer.git diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index 45d3032af6..571df6957c 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, + $row = array( '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('__ROWS', $OUT); + $OUT .= loadTemplate('admin_optimize_row', true, $row); +} // END - foreach + +// 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] ?>