]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_reg.php
Variable DEPTH must be deleted before ADD_POINTS_REFSYSTEM() is being called :(
[mailer.git] / inc / modules / guest / what-sponsor_reg.php
index ec788933bfdd2679157cacaa67ebdb79333a1301..d3af4b373c8a05ea408c3ce996f588cd476d057c 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 }
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
 
 // Create array for form errors (= missing data)
 $FORM_ERRORS = array();
@@ -193,7 +193,7 @@ if (isset($_POST['ok'])) {
                }
        }
        // Is the password long enough?
-        elseif (strlen($_POST['pass1']) < $CONFIG['pass_len'])
+        elseif (strlen($_POST['pass1']) < $_CONFIG['pass_len'])
        {
                // Too short!
                $FORM_ERRORS[] = SPONSOR_PASSWORD_TOO_SHORT;
@@ -310,7 +310,7 @@ ORDER BY pay_name", __FILE__, __LINE__);
                {
                        $OUT .= "<TR>
   <TD class=\"bottom2 switch_sw".$SW."\" height=\"50\" style=\"padding-left: 2px; padding-right: 2px\">
-    <INPUT type=\"radio\" name=\"pay_type\" class=\"guest_normal\" value=\"".bigintval($id)."\">&nbsp;".$name."<BR>
+    <INPUT type=\"radio\" name=\"pay_type\" class=\"guest_normal\" value=\"".bigintval($id)."\">&nbsp;".$name."<br />
     <DIV align=\"right\">(".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." ".POINTS.")</DIV>
   </TD>
 </TR>\n";
@@ -344,21 +344,21 @@ ORDER BY pay_name", __FILE__, __LINE__);
                        switch ($_POST['gender'])
                        {
                        case "M": // Male
-                               define('__GENDER_M'  , " selected");
+                               define('__GENDER_M'  , " selected=\"selected\"");
                                define('__GENDER_F'  , "");
                                define('__GENDER_C'  , "");
                                break;
 
                        case "F": // Female
                                define('__GENDER_M'  , "");
-                               define('__GENDER_F'  , " selected");
+                               define('__GENDER_F'  , " selected=\"selected\"");
                                define('__GENDER_C'  , "");
                                break;
 
                        case "C": // Company
                                define('__GENDER_M'  , "");
                                define('__GENDER_F'  , "");
-                               define('__GENDER_C'  , " selected");
+                               define('__GENDER_C'  , " selected=\"selected\"");
                                break;
                        }
 
@@ -366,26 +366,26 @@ ORDER BY pay_name", __FILE__, __LINE__);
                        switch ($_POST['receive_warnings'])
                        {
                        case "Y":
-                               define('__REC_Y'    , " selected");
+                               define('__REC_Y'    , " selected=\"selected\"");
                                define('__REC_N'    , "");
                                break;
 
                        case "N":
                                define('__REC_Y'    , "");
-                               define('__REC_N'    , " selected");
+                               define('__REC_N'    , " selected=\"selected\"");
                                break;
                        }
 
                        // Errors found
                        $OUT = "<P align=\"center\">
-  <STRONG><FONT class=\"guest_failed\">".SPONSOR_REGISTER_SOMETHING_MISSING.":</FONT></STRONG><BR>
+  <STRONG><FONT class=\"guest_failed\">".SPONSOR_REGISTER_SOMETHING_MISSING.":</FONT></STRONG><br />
 </P>
 <OL>\n";
                        foreach ($FORM_ERRORS as $error)
                        {
                                $OUT .= "<LI>".$error."</LI>\n";
                        }
-                       $OUT .= "</OL><BR>\n";
+                       $OUT .= "</OL><br />\n";
                        define('__SPONSOR_FORM_ERRORS', $OUT);
                        define('__SPONSOR_REFID', $_POST['refid']);
                }
@@ -417,15 +417,15 @@ ORDER BY pay_name", __FILE__, __LINE__);
                        define('__SPONSOR_FORM_ERRORS', "");
                }
 
-               // Prepare referral things
+               // Prepare referal things
                if (!isset($_GET['refid']))
                {
-                       // No referral link
+                       // No referal link
                        define('__SPONSOR_REFID', "0");
                }
                 else
                {
-                       // Referral ID transmitted, we don't care here if it is right or not
+                       // Referal ID transmitted, we don't care here if it is right or not
                        define('__SPONSOR_REFID', bigintval($_GET['refid']));
                }