}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Create array for form errors (= missing data)
$FORM_ERRORS = array();
break;
default:
- if (!IS_ADMIN())
- {
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
+ if (!IS_ADMIN()) {
// Message for testing admin
$MSG = ADMIN_SPONSOR_UNKOWN_STATUS_1.$STATUS.ADMIN_SPONSOR_UNKOWN_STATUS_2;
- }
- else
- {
+ } else {
// Message for the guest
$MSG = SPONSOR_UNKOWN_STATUS_1.$STATUS.SPONSOR_UNKOWN_STATUS_2;
}
// Display message
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-}
- else
-{
+} 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__);
- if (SQL_NUMROWS($result) > 0)
- {
+ if (SQL_NUMROWS($result) > 0) {
// Load all types...
$OUT = "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"300\" class=\"left2 right2 top2\">\n";
$SW = 2;
<STRONG><FONT class=\"guest_failed\">".SPONSOR_REGISTER_SOMETHING_MISSING.":</FONT></STRONG><br />
</P>
<OL>\n";
- foreach ($FORM_ERRORS as $error)
- {
+ foreach ($FORM_ERRORS as $error) {
$OUT .= "<LI>".$error."</LI>\n";
- }
+ } // END - if
+
$OUT .= "</OL><br />\n";
define('__SPONSOR_FORM_ERRORS', $OUT);
define('__SPONSOR_REFID', $_POST['refid']);
- }
- else
- {
+ } else {
// None found, first call
define('__COMPANY' , "");
define('__POSITION' , "");
define('__SPONSOR_FORM_ERRORS', "");
}
- // Prepare referral things
- if (!isset($_GET['refid']))
- {
- // No referral link
+ // Prepare referal things
+ if (!isset($_GET['refid'])) {
+ // No referal link
define('__SPONSOR_REFID', "0");
- }
- else
- {
- // Referral ID transmitted, we don't care here if it is right or not
+ } else {
+ // Referal ID transmitted, we don't care here if it is right or not
define('__SPONSOR_REFID', bigintval($_GET['refid']));
}
// Display registration form
LOAD_TEMPLATE("guest_sponsor_reg");
- }
- else
- {
+ } else {
// Nothing added so far
LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_PAYMENT_LIST_IS_EMPTY);
}