X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-optimize.php;h=48f1cdfbe72e871281f23dee4ecf349f9add1144;hb=29157685184b9aa2ddbf42e9d2e49141af95f7e2;hp=46a4a8c87b6b098183769e2c03260c83afd208d3;hpb=f97a999e0737c0007ae9c3c26dfef49f75a175ac;p=mailer.git diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index 46a4a8c87b..48f1cdfbe7 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 = '{--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 = '{--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('__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] ?>