Ejemplo n.º 1
0
     $smartyvalues['permissions'] = $whmcs->get_req_var_if($e, "permissions", $contact_data);
     $smartyvalues['generalemails'] = $whmcs->get_req_var_if($e, "generalemails", $contact_data);
     $smartyvalues['productemails'] = $whmcs->get_req_var_if($e, "productemails", $contact_data);
     $smartyvalues['domainemails'] = $whmcs->get_req_var_if($e, "domainemails", $contact_data);
     $smartyvalues['invoiceemails'] = $whmcs->get_req_var_if($e, "invoiceemails", $contact_data);
     $smartyvalues['supportemails'] = $whmcs->get_req_var_if($e, "supportemails", $contact_data);
 } else {
     if ($action == "addcontact") {
         checkContactPermission("contacts");
         $ca->setTemplate("clientareaaddcontact");
         $ca->addToBreadCrumb("clientarea.php?action=details", $whmcs->get_lang("clientareanavdetails"));
         $ca->addToBreadCrumb("clientarea.php?action=addcontact", $whmcs->get_lang("clientareanavaddcontact"));
         include "includes/countries.php";
         if ($submit) {
             check_token();
             $errormessage = checkContactDetails("", true);
             if (!$subaccount) {
                 $password = $permissions = "";
             }
             $smartyvalues['errormessage'] = $errormessage;
             if (!$errormessage) {
                 $contactid = addContact($client->getID(), $firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password, $permissions, $generalemails, $productemails, $domainemails, $invoiceemails, $supportemails);
                 redir("action=contacts&id=" . $contactid . "&success=1");
                 exit;
             }
         }
         $contactsarray = $client->getContacts();
         $smartyvalues['contacts'] = $contactsarray;
         if (!$permissions) {
             $permissions = array();
         }
Ejemplo n.º 2
0
 if (!$_SESSION['uid']) {
     if ($custtype == "existing") {
         if (!validateClientLogin($loginemail, $loginpw)) {
             $errormessage .= "<li>" . $_LANG['loginincorrect'];
         }
     } else {
         $_SESSION['cart']['user'] = array("firstname" => $firstname, "lastname" => $lastname, "companyname" => $companyname, "email" => $email, "address1" => $address1, "address2" => $address2, "city" => $city, "state" => $state, "postcode" => $postcode, "country" => $country, "phonenumber" => $phonenumber);
         $errormessage = checkDetailsareValid("", true, true, false);
     }
 }
 if ($contact == "new") {
     redir("a=addcontact");
     exit;
 }
 if ($contact == "addingnew") {
     $errormessage .= checkContactDetails("", false, "domaincontact");
 }
 if ($availablegateways[$paymentmethod]['type'] == "CC" && $ccinfo) {
     if ($ccinfo == "new") {
         $errormessage .= updateCCDetails("", $cctype, $ccnumber, $cccvv, $ccexpirymonth . $ccexpiryyear, $ccstartmonth . $ccstartyear, $ccissuenum);
     }
     if (!$cccvv) {
         $errormessage .= "<li>" . $_LANG['creditcardccvinvalid'];
     }
     $_SESSION['cartccdetail'] = encrypt(base64_encode(serialize(array($cctype, $ccnumber, $ccexpirymonth, $ccexpiryyear, $ccstartmonth, $ccstartyear, $ccissuenum, $cccvv, $nostore))));
 }
 $validate = new WHMCS_Validate();
 run_validate_hook($validate, "ShoppingCartValidateCheckout", $_REQUEST);
 if (isset($_SESSION['uid']) && $whmcs->get_config("EnableTOSAccept")) {
     $validate->validate("required", "accepttos", "ordererroraccepttos");
 }