* -------------------------------------------------------------------- *
* Kurzbeschreibung : Anmeldeformular fuer Sponsoren *
* -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
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--}');
}
} // 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--}',
);
// Calulate points
- $result = SQL_QUERY_ESC('SELECT
+ $result = sqlQueryEscaped('SELECT
(`pay_rate` * `pay_min_count`) AS `points`,
`pay_min_count`,
`pay_currency`
`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);
displayMessage($message);
} else {
// Check for payment types
- $result = SQL_QUERY('SELECT
+ $result = sqlQuery('SELECT
`id`,
`pay_name`,
`pay_rate`,
`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']);
} // 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);
$OUT = '';
// Errors found?
- if (count($formErrors) > 0) {
- $OUT = displayMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}', TRUE);
+ if (isFilledArray($formErrors)) {
+ $OUT = returnMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}');
$OUT .= '<ol>';
foreach ($formErrors as $error) {
$OUT .= '<li>' . $error . '</li>';
}
// Free memory
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
}
// [EOF]