} } } if (!$infobox) { $_SESSION['currency'] = $currency; $userid = addClient($firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password, $securityqid, $securityqans, $sendemail, array("notes" => $notes, "status" => $status, "credit" => $credit, "taxexempt" => $taxexempt, "latefeeoveride" => $latefeeoveride, "overideduenotices" => $overideduenotices, "language" => $language, "billingcid" => $billingcid, "lastlogin" => "00000000000000", "groupid" => $groupid, "separateinvoices" => $separateinvoices, "disableautocc" => $disableautocc, "defaultgateway" => $paymentmethod)); unset($_SESSION['uid']); unset($_SESSION['upw']); redir("userid=" . $userid, "clientssummary.php"); } } } } releaseSession(); ob_start(); $questions = getSecurityQuestions(""); echo $infobox; echo "\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?action=add\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "firstname"); echo "</td><td class=\"fieldarea\"><input type=\"text\" size=\"30\" name=\"firstname\" value=\""; echo $firstname; echo "\" tabindex=\"1\"></td><td class=\"fieldlabel\" width=\"15%\">"; echo $aInt->lang("fields", "address1"); echo "</td><td class=\"fieldarea\"><input type=\"text\" size=\"30\" name=\"address1\" value=\""; echo $address1; echo "\" tabindex=\"8\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "lastname"); echo "</td><td class=\"fieldarea\"><input type=\"text\" size=\"30\" name=\"lastname\" value=\""; echo $lastname;
$chapter = $_POST['chapter']; $chapter = mysqli_real_escape_string(mysqli_connection(), $chapter); print getStandards($chapter); } else { if (isset($_POST['columns'])) { $columns = $_POST['columns']; if ($columns === "GOALS") { print getGoalColumnNames(); } elseif ($columns === "PHASES") { print getPhaseColumnNames(); } } else { if (isset($_POST['register'])) { $columns = $_POST['register']; if ($columns === "QUESTIONS") { print getSecurityQuestions(); } if ($columns === "REGISTER") { $data = json_decode(stripslashes($_POST['data']), true); $recaptcha = $data['recaptcha']; // verify recaptcha $url = "https://www.google.com/recaptcha/api/siteverify"; $fields = array('secret' => '6LcmTSATAAAAAFtJj2F9XlF6wl9gUmIX9Vu-4af7', 'response' => $recaptcha); //open connection $ch = curl_init($url); //set the url, number of POST vars, POST data curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //execute post
* * @ Version : 5.2.15 * @ Author : MTIMER * @ Release on : 2013-12-24 * @ Website : http://www.mtimer.cn * **/ define("CLIENTAREA", true); require "init.php"; require "includes/clientfunctions.php"; require "includes/customfieldfunctions.php"; if (isset($_SESSION['uid'])) { redir("", "clientarea.php"); } $capatacha = clientAreaInitCaptcha(); $securityquestions = getSecurityQuestions(); $firstname = $whmcs->get_req_var("firstname"); $lastname = $whmcs->get_req_var("lastname"); $companyname = $whmcs->get_req_var("companyname"); $email = $whmcs->get_req_var("email"); $address1 = $whmcs->get_req_var("address1"); $address2 = $whmcs->get_req_var("address2"); $city = $whmcs->get_req_var("city"); $state = $whmcs->get_req_var("state"); $postcode = $whmcs->get_req_var("postcode"); $country = $whmcs->get_req_var("country"); $phonenumber = $whmcs->get_req_var("phonenumber"); $password = $whmcs->get_req_var("password"); $securityqid = $whmcs->get_req_var("securityqid"); $securityqans = $whmcs->get_req_var("securityqans"); $customfield = $whmcs->get_req_var("customfield");
<!DOCTYPE html> <?php session_start(); if (!isset($_SESSION['userid'])) { ?> <?php include "util/DbUtil.php"; $db_conn = getConnectedDb(); $securityQuestions = array(); if (is_null($db_conn)) { $errorMsg = new SecurityQuestion('error', 1); $securityQuestions[] = $errorMsg; } else { $securityQuestions = getSecurityQuestions($db_conn); } ?> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link rel="stylesheet" type="text/css" href="stylesheets/index.css"> <script src="scripts/formValidation.js"></script> <script src="scripts/NewPasswordValidator.js"></script> <script src="scripts/registration.js"></script> <title>Code Cleanup main page</title> </head>
function checkDetailsareValid($uid = "", $signup = false, $checkemail = true, $captcha = true, $checkcustomfields = true) { global $whmcs; $validate = new WHMCS_Validate(); $validate->setOptionalFields($whmcs->get_config("ClientsProfileOptionalFields")); if (!$signup) { $validate->setOptionalFields($whmcs->get_config("ClientsProfileUneditableFields")); } $validate->validate("required", "firstname", "clientareaerrorfirstname"); $validate->validate("required", "lastname", "clientareaerrorlastname"); if (($signup || $checkemail) && $validate->validate("required", "email", "clientareaerroremail")) { if ($validate->validate("email", "email", "clientareaerroremailinvalid")) { if ($validate->validate("banneddomain", "email", "clientareaerrorbannedemail")) { $validate->validate("uniqueemail", "email", "ordererroruserexists", array($uid, "")); } } } $validate->validate("required", "address1", "clientareaerroraddress1"); $validate->validate("required", "city", "clientareaerrorcity"); $validate->validate("required", "state", "clientareaerrorstate"); $validate->validate("required", "postcode", "clientareaerrorpostcode"); $validate->validate("postcode", "postcode", "clientareaerrorpostcode2"); $validate->validate("required", "phonenumber", "clientareaerrorphonenumber"); $validate->validate("phone", "phonenumber", "clientareaerrorphonenumber2"); $validate->validate("country", "country", "clientareaerrorcountry"); if ($signup && $validate->validate("required", "password", "ordererrorpassword")) { if ($validate->validate("pwstrength", "password", "pwstrengthfail")) { if ($validate->validate("required", "password2", "clientareaerrorpasswordconfirm")) { $validate->validate("match_value", "password", "clientareaerrorpasswordnotmatch", "password2"); } } } if ($checkcustomfields) { $validate->validateCustomFields("client", "", $signup); } if ($signup) { $securityquestions = getSecurityQuestions(); if ($securityquestions) { $validate->validate("required", "securityqans", "securityanswerrequired"); } if ($captcha) { $validate->validate("captcha", "code", "captchaverifyincorrect"); } if ($whmcs->get_config("EnableTOSAccept")) { $validate->validate("required", "accepttos", "ordererroraccepttos"); } } run_validate_hook($validate, "ClientDetailsValidation", $_POST); $errormessage = $validate->getHTMLErrorOutput(); return $errormessage; }