Example #1
0
     check_token();
     $wc = $whmcs->get_req_var("wc");
     $contactdetails = $whmcs->get_req_var("contactdetails");
     foreach ($wc as $wc_key => $wc_val) {
         if ($wc_val == "contact") {
             $selctype = $sel[$wc_key][0];
             $selcid = substr($sel[$wc_key], 1);
             $tmpcontactdetails = array();
             if ($selctype == "c") {
                 $tmpcontactdetails = get_query_vals("tblcontacts", "", array("userid" => $client->getID(), "id" => $selcid));
             } else {
                 if ($selctype == "u") {
                     $tmpcontactdetails = get_query_vals("tblclients", "", array("id" => $client->getID()));
                 }
             }
             $contactdetails[$wc_key] = $domains->buildWHOISSaveArray($tmpcontactdetails);
             continue;
         }
     }
     $success = $domains->moduleCall("SaveContactDetails", array("contactdetails" => $contactdetails));
     if ($success) {
         $smartyvalues['successful'] = true;
     } else {
         $smartyvalues['error'] = $domains->getLastError();
     }
 }
 $success = $domains->moduleCall("GetContactDetails");
 if ($success) {
     $smartyvalues['contactdetails'] = $domains->getModuleReturn();
 } else {
     $smartyvalues['error'] = $domains->getLastError();