More rewrites/fixes (not all is fixed) for ext-sponsor
[mailer.git] / inc / modules / sponsor / account.php
index e76cdacf095c69993abaa7387b61877576e9805d..76889dc415ab0d92a76f80d66cf690575c6974b6 100644 (file)
@@ -51,7 +51,7 @@ if (!defined('__SECURITY')) {
 
 // Data for the formular
 $result = SQL_QUERY_ESC("SELECT
-       `company`, `position`, `tax_ident`,
+       `id`, `company`, `position`, `tax_ident`,
        `gender`, `surname`, `family`, `street_nr1`, `street_nr2`, `zip`, `city`, `country`,
        `phone`, `fax`, `cell`, `email`, `url`,
        `status`, `receive_warnings`
@@ -120,10 +120,10 @@ if (SQL_NUMROWS($result) == 1) {
 
                        if (!empty($message)) {
                                // Output message
-                               $OUT = loadTemplate('admin_settings_saved', true, $message);
+                               $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, $message);
                        } else {
                                // No message generated
-                               $OUT = loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MESSAGE_GENERATED--}');
+                               $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MESSAGE_GENERATED--}');
                        }
                } else {
                        // Init gender
@@ -135,16 +135,16 @@ if (SQL_NUMROWS($result) == 1) {
                        $content['gender_' . strtolower($content['gender'])] = ' selected="selected"';
 
                        // Output formular
-                       $OUT = loadTemplate('sponsor_account_form', true, $content);
+                       $GLOBALS['sponsor_output'] = loadTemplate('sponsor_account_form', true, $content);
                }
        } else {
                // Locked or so?
                $STATUS = sponsorTranslateUserStatus($content['status']);
-               $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS));
+               $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS));
        }
 } else {
        // Sponsor account not found!
-       $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id')));
+       $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id')));
 }
 
 // Free memory