X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_reg.php;h=ace46f1b4056bcdb244ca37c2493b5f480feab16;hb=2bda7ccdfd87b065a61ff976b5f9e98e46f73591;hp=ceb9c6638c2c6d8b1c51f8c531f529dc0b4f1a66;hpb=d8148e3f1f3a6762b2e786dbe99ada269dcf2ea0;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index ceb9c6638c..ace46f1b40 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Anmeldeformular fuer Sponsoren * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -35,7 +40,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { - addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); return; } @@ -279,23 +284,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'))); @@ -400,7 +406,7 @@ ORDER BY pay_name", __FILE__, __LINE__); LOAD_TEMPLATE("guest_sponsor_reg"); } else { // Nothing added so far - LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_PAYMENT_LIST_IS_EMPTY); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY')); } // Free memory