if (count($FORM_ERRORS) > 0) unsetPostRequestParameter('ok');
}
-if ((isFormSent()) && (count($FORM_ERRORS) == '0')) {
+if ((isFormSent()) && (count($FORM_ERRORS) == 0)) {
// Generate message array
$messageArray = array(
'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'),
loadTemplate('admin_settings_saved', false, $message);
} else {
// Check for payment types
- $result = SQL_QUERY("SELECT `id`, `pay_name`, `pay_rate`, `pay_currency`, `pay_min_count`
-FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes`
-ORDER BY `pay_name`", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT
+ `id`, `pay_name`, `pay_rate`, `pay_currency`, `pay_min_count`
+FROM
+ `{?_MYSQL_PREFIX?}_sponsor_paytypes`
+ORDER BY
+ pay_name` ASC', __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load all types...
// @TODO Swap this HTML code to templates
// Errors found?
if (count($FORM_ERRORS) > 0) {
- $OUT = "<div align=\"center\">
- <strong><div class=\"guest_failed\">".getMessage('SPONSOR_REGISTER_SOMETHING_MISSING').":</div></strong><br />
-</div>
-<ol>\n";
+ $OUT = loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_REGISTER_SOMETHING_MISSING');
+ $OUT .= '<ol>';
foreach ($FORM_ERRORS as $error) {
- $OUT .= "<li>".$error."</li>\n";
+ $OUT .= '<li>' . $error . '</li>';
} // END - foreach
- $OUT .= "</ol><br />\n";
+ $OUT .= '</ol>';
} // END - if
$content['form_errors'] = $OUT;