X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_reg.php;h=5d12728fdf77e79491e8e05c06cd60611329e47f;hp=1b0aefd2746a3c22000e8c2cf024ebb48fb2941b;hb=4001187f22197f55e5a1f211fc8defcc180f7c32;hpb=a47a9c49a7813304ac78deb3741bdd85e6d50912 diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 1b0aefd274..5d12728fdf 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -279,23 +279,24 @@ ORDER BY pay_name", __FILE__, __LINE__); // @TODO Swap this HTML code to templates $OUT = "\n"; $SW = 2; - while (list($id, $name, $rate, $curr, $min) = SQL_FETCHROW($result)) { - $OUT .= " - -\n"; + while ($content = SQL_FETCHARRAY($result)) { + // Prepare content for output + $content['sw'] = $SW; + $content['res'] = TRANSLATE_COMMA($content['pay_rate'] * $content['pay_min_count']); + + // Load row template and switch color + $OUT .= LOAD_TEMPLATE("guest_sponsor_payment_row", false, $content); $SW = 3 - $SW; } $OUT .= "
-  ".$name."
-
(".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." {!POINTS!})
-
\n"; + + // @TODO Rewrite this constant define('__PAYMENT_LIST', $OUT); - SQL_FREERESULT($result); // Check for invalid entries - if (count($FORM_ERRORS) > 0) - { + if (count($FORM_ERRORS) > 0) { // Some found... :-( + // @TODO Rewrite these constants define('__COMPANY' , COMPILE_CODE(REQUEST_POST('company'))); define('__POSITION' , COMPILE_CODE(REQUEST_POST('position'))); define('__TAX_IDENT', COMPILE_CODE(REQUEST_POST('tax_ident')));