]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_reg.php
More use of EL, fix for admin links
[mailer.git] / inc / modules / guest / what-sponsor_reg.php
index 312627aac8639292e259eb6aea75edee6c49f161..3556a9447bde6597a7f3b843e62be350d406675c 100644 (file)
@@ -199,7 +199,7 @@ if (isFormSent()) {
        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'),
@@ -279,9 +279,12 @@ WHERE `id`='%s' LIMIT 1",
        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
@@ -331,15 +334,13 @@ ORDER BY `pay_name`", __FILE__, __LINE__);
 
                        // 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;