X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_reg.php;h=d718d37849b21682924db227ef0f9ebda0e26c96;hb=bfbf712685680761babfd9ea059a224a4aa244bf;hp=a101f17ae3425e8aea0b11c905d276f06e5141f2;hpb=b8ba3824d640da47d5f81485650b5885ba60867b;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index a101f17ae3..d718d37849 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -36,9 +36,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); } return; } @@ -186,15 +186,14 @@ if (isset($_POST['ok'])) { } } // Is the password long enough? - elseif (strlen($_POST['pass1']) < $_CONFIG['pass_len']) + elseif (strlen($_POST['pass1']) < getConfig('pass_len')) { // Too short! $FORM_ERRORS[] = SPONSOR_PASSWORD_TOO_SHORT; } // Check if he has accepted the terms&conditions - if (empty($_POST['terms'])) - { + if (empty($_POST['terms'])) { // Homepage URL is empty $FORM_ERRORS[] = SPONSOR_TERMS_NOT_ACCEPTED; } @@ -203,8 +202,7 @@ if (isset($_POST['ok'])) { if (count($FORM_ERRORS) > 0) unset($_POST['ok']); } -if ((isset($_POST['ok'])) && (count($FORM_ERRORS) == 0)) -{ +if ((isset($_POST['ok'])) && (count($FORM_ERRORS) == 0)) { // Generate message array $MSGs = array( 'failed' => SPONSOR_REGISTRATION_FAILED, @@ -292,19 +290,19 @@ FROM "._MYSQL_PREFIX."_sponsor_paytypes ORDER BY pay_name", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load all types... - $OUT = "\n"; + $OUT = "
\n"; $SW = 2; while(list($id, $name, $rate, $curr, $min) = SQL_FETCHROW($result)) { - $OUT .= " - + -\n"; +
(".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." ".POINTS.")
+ +\n"; $SW = 3 - $SW; } - $OUT .= "
+ $OUT .= "
 ".$name."
-
(".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." ".POINTS.")
-
\n"; + $OUT .= "\n"; define('__PAYMENT_LIST', $OUT); SQL_FREERESULT($result); @@ -366,14 +364,14 @@ ORDER BY pay_name", __FILE__, __LINE__); // Errors found $OUT = "

- ".SPONSOR_REGISTER_SOMETHING_MISSING.":
+

".SPONSOR_REGISTER_SOMETHING_MISSING.":

-
    \n"; +
      \n"; foreach ($FORM_ERRORS as $error) { - $OUT .= "
    1. ".$error."
    2. \n"; + $OUT .= "
    3. ".$error."
    4. \n"; } // END - if - $OUT .= "

    \n"; + $OUT .= "

\n"; define('__SPONSOR_FORM_ERRORS', $OUT); define('__SPONSOR_REFID', $_POST['refid']); } else {