//////////////////////////////////////////////////////////////////////////////////////////// case "register": if ($_GET['userid'] != "" && $_GET['email'] != "") { //Instantiate the CBilling Class $oBilling = new CBilling($config); $RequiresPayment = $oBilling->IsPaymentEnabled(); $oBilling->Close(); unset($oBilling); //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config); $bRequiresApproval = $oR3DCQuery->NewUserRequiresApproval(); $ReturnStatus = ""; if ($_GET['userid'] != "" && $_GET['email'] != "") { if ($bRequiresApproval == false && $RequiresPayment == false) { //Add the new user $ReturnStatus = $oR3DCQuery->RegisterNewPlayer($_GET['userid'], $_GET['email']); } elseif ($bRequiresApproval == true && $RequiresPayment == false) { //Add the new user $ReturnStatus = $oR3DCQuery->RegisterNewPlayer2($_GET['userid'], $_GET['email']); } } $oR3DCQuery->Close(); unset($oR3DCQuery); echo "<RESPONSE>\n"; echo "<REGISTER>"; echo $ReturnStatus; echo "</REGISTER>\n"; echo "</RESPONSE>\n"; } else { echo "<RESPONSE>\n"; echo "<REGISTER>";
if ($oR3DCQuery->ELOIsActive()) { $oR3DCQuery->ELOCreateRatings(); } $oR3DCQuery->MangeGameTimeOuts(); } $txtName = trim($_POST['txtName']); $txtEmail = trim($_POST['txtEmail']); $txtVI = trim($_POST['txtVI']); $cmdRegister = trim($_POST['cmdRegister']); $ReturnStatus = ""; $register_success = FALSE; if ($cmdRegister != "" && $txtName != "" && $txtEmail != "") { if (PhpCaptcha::Validate($_POST['txtVI'])) { if ($bRequiresApproval == false && $RequiresPayment == false) { //Add the new user $ret = $oR3DCQuery->RegisterNewPlayer($txtName, $txtEmail); $register_success = $ret['success']; $ReturnStatus = $ret['msg']; } elseif ($bRequiresApproval == true && $RequiresPayment == false) { //Add the new user $ReturnStatus = $oR3DCQuery->RegisterNewPlayer2($txtName, $txtEmail); $register_success = $ret['success']; $ReturnStatus = $ret['msg']; } } } // Convert return status in a string to display to the user if ($ReturnStatus == 'One or more required fields was left blank!') { $ReturnStatus = __l('One or more required fields was left blank!'); } else { if ($ReturnStatus == 'That userid is taken, please reregister with a different id!') {