X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_reg.php;h=784f56f6c32414891a57964716a1e081ac283783;hb=5b90ab389309595fde01542842169d6cbd2fc562;hp=847576f5477b12b4b6bca2ca9b5e4904bb0168f1;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 847576f547..784f56f6c3 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -182,7 +182,7 @@ if (isFormSent()) { array_push($formErrors, '{--SPONSOR_PASSWORD2_EMPTY--}'); } } - } elseif (strlen(postRequestElement('password1')) < getPassLen()) { + } elseif (strlen(postRequestElement('password1')) < getMinPasswordLength()) { // Password is to short! array_push($formErrors, '{--SPONSOR_PASSWORD_TOO_SHORT--}'); } @@ -194,10 +194,10 @@ if (isFormSent()) { } // END - if // If there is something wrong/missing stop registration - if (count($formErrors) > 0) unsetPostRequestElement('ok'); + if (isFilledArray($formErrors)) unsetPostRequestElement('ok'); } // END - if -if ((isFormSent()) && (count($formErrors) == 0)) { +if ((isFormSent()) && (!isFilledArray($formErrors))) { // Generate message array $messageArray = array( 'failed' => '{--SPONSOR_REGISTRATION_FAILED--}', @@ -205,7 +205,7 @@ if ((isFormSent()) && (count($formErrors) == 0)) { ); // Calulate points - $result = SQL_QUERY_ESC('SELECT + $result = sqlQueryEscaped('SELECT (`pay_rate` * `pay_min_count`) AS `points`, `pay_min_count`, `pay_currency` @@ -215,10 +215,10 @@ WHERE `id`=%s LIMIT 1', array(postRequestElement('pay_type')), __FILE__, __LINE__); - list($points, $pay, $curr) = SQL_FETCHROW($result); + list($points, $pay, $curr) = sqlFetchRow($result); // Free memory - SQL_FREERESULT($result); + sqlFreeResult($result); // Add points to array postRequestElement('points_amount', $points); @@ -233,7 +233,7 @@ LIMIT 1', displayMessage($message); } else { // Check for payment types - $result = SQL_QUERY('SELECT + $result = sqlQuery('SELECT `id`, `pay_name`, `pay_rate`, @@ -241,12 +241,12 @@ LIMIT 1', `pay_min_count` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` -ORDER BY +ORDER BY `pay_name` ASC', __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result)) { + if (!ifSqlHasZeroNums($result)) { // Load all types... $OUT = ''; - while ($content = SQL_FETCHARRAY($result)) { + while ($content = sqlFetchArray($result)) { // Prepare content for output $content['res'] = translateComma($content['pay_rate'] * $content['pay_min_count']); @@ -263,7 +263,7 @@ ORDER BY } // END - foreach // Check for invalid entries - if (count($formErrors) > 0) { + if (isFilledArray($formErrors)) { // Some found... :-( foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fax','cell','email','url') as $entry) { $content[$entry] = postRequestElement($entry); @@ -278,8 +278,8 @@ ORDER BY $OUT = ''; // Errors found? - if (count($formErrors) > 0) { - $OUT = displayMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}', TRUE); + if (isFilledArray($formErrors)) { + $OUT = returnMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}'); $OUT .= '
    '; foreach ($formErrors as $error) { $OUT .= '
  1. ' . $error . '
  2. '; @@ -308,7 +308,7 @@ ORDER BY } // Free memory - SQL_FREERESULT($result); + sqlFreeResult($result); } // [EOF]