Пример #1
0
    unset($_SESSION['cartccdetail']);
    $action = "submit";
    if (ccFormatNumbers($ccnumber)) {
        $ccinfo = "new";
    }
    $fromorderform = true;
}
if ($action == "submit") {
    if (!$fromorderform) {
        check_token();
    }
    if ($nostore && !$CONFIG['CCAllowCustomerDelete']) {
        $nostore = "";
    }
    if (!$fromorderform) {
        $errormessage = checkDetailsareValid($_SESSION['uid'], false, false, false, false);
        if ($cccvv2) {
            $cccvv = $cccvv2;
        }
        if (!$cccvv) {
            $errormessage .= "<li>" . $_LANG['creditcardccvinvalid'];
        }
        if (!$errormessage) {
            $result = select_query("tblclients", "", array("id" => $_SESSION['uid']));
            $data = mysql_fetch_array($result);
            $old_firstname = $data['firstname'];
            $old_lastname = $data['lastname'];
            $old_address1 = $data['address1'];
            $old_address2 = $data['address2'];
            $old_city = $data['city'];
            $old_state = $data['state'];
Пример #2
0
$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");
$errormessage = "";
if ($whmcs->get_req_var("register")) {
    check_token();
    $errormessage = checkDetailsareValid("", true);
    if (!$errormessage) {
        $userid = addClient($firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password, $securityqid, $securityqans);
        run_hook("ClientAreaRegister", array("userid" => $userid));
        redir("", "clientarea.php");
    }
}
$pagetitle = $_LANG['clientregistertitle'];
$breadcrumbnav = "<a href=\"index.php\">" . $_LANG['globalsystemname'] . "</a> > <a href=\"register.php\">" . $_LANG['clientregistertitle'] . "</a>";
$pageicon = "images/order_big.gif";
initialiseClientArea($pagetitle, $pageicon, $breadcrumbnav);
$templatefile = "clientregister";
if (!$CONFIG['AllowClientRegister']) {
    $smarty->assign("noregistration", true);
}
include "includes/countries.php";
Пример #3
0
if (!defined("WHMCS")) {
    exit("This file cannot be accessed directly");
}
if (!function_exists("calcCartTotals")) {
    require ROOTDIR . "/includes/orderfunctions.php";
}
if (!function_exists("checkDetailsareValid")) {
    require ROOTDIR . "/includes/clientfunctions.php";
}
if (!function_exists("saveCustomFields")) {
    require ROOTDIR . "/includes/customfieldfunctions.php";
}
if ($clientip) {
    $remote_ip = $clientip;
}
$errormessage = checkDetailsareValid();
if ($errormessage && !$skipvalidation) {
    $errormessage = explode("<li>", $errormessage);
    $error = $errormessage[1];
    $apiresults = array("result" => "error", "message" => $error);
    return 1;
}
$_SESSION['currency'] = $currency;
$sendemail = $noemail ? false : true;
$langatstart = $_SESSION['Language'];
if ($language) {
    $_SESSION['Language'] = $language;
}
addClient($firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password2, $securityqid, $securityqans, $sendemail);
if ($_POST['cctype']) {
    if (!function_exists("updateCCDetails")) {
Пример #4
0
    }
    $captcha = clientAreaInitCaptcha();
    $smartyvalues['captcha'] = $captcha;
    $smartyvalues['recaptchahtml'] = clientAreaReCaptchaHTML();
    $addons_html = run_hook("ClientAreaHomepage", array());
    $ca->assign("addons_html", $addons_html);
} else {
    if ($action == "details") {
        checkContactPermission("profile");
        $ca->setTemplate("clientareadetails");
        $uneditablefields = explode(",", $CONFIG['ClientsProfileUneditableFields']);
        $smartyvalues['uneditablefields'] = $uneditablefields;
        $e = "";
        if ($save) {
            check_token();
            $e = checkDetailsareValid($client->getID(), false);
            if ($e) {
                $ca->assign("errormessage", $e);
            } else {
                $client->updateClient();
                $ca->assign("successful", true);
            }
        }
        if (!$e) {
            $exdetails = $client->getDetails();
        }
        include "includes/countries.php";
        $ca->assign("clientfirstname", $whmcs->get_req_var_if($e, "firstname", $exdetails));
        $ca->assign("clientlastname", $whmcs->get_req_var_if($e, "lastname", $exdetails));
        $ca->assign("clientcompanyname", $whmcs->get_req_var_if($e, "companyname", $exdetails));
        $ca->assign("clientemail", $whmcs->get_req_var_if($e, "email", $exdetails));