Exemplo n.º 1
0
function RegCallFunction($params, $func, $noarr = false)
{
    $params = RegBuildParams($params);
    if (!$params) {
        return false;
    }
    $values = array();
    if (function_exists($params['registrar'] . "_" . $func)) {
        $values = call_user_func($params['registrar'] . "_" . $func, $params);
    } else {
        return array("na" => true);
    }
    if (!$noarr && !is_array($values)) {
        $values = array();
    }
    return $values;
}
Exemplo n.º 2
0
 } else {
     if ($update == "reglock") {
         $ca->addToBreadCrumb($currpage . "#", $whmcs->get_lang("domainreglockstatus"));
         if ($save) {
             check_token();
             foreach ($domainids as $domainid) {
                 $data = get_query_vals("tbldomains", "domain,registrar", array("id" => $domainid, "userid" => $client->getID()));
                 $domain = $data['domain'];
                 $registrar = $data['registrar'];
                 $domainparts = explode(".", $domain, 2);
                 $params = array();
                 $params['domainid'] = $domainid;
                 $params['sld'] = $domainparts[0];
                 $params['tld'] = $domainparts[1];
                 $params['registrar'] = $registrar;
                 $params = RegBuildParams($params);
                 $newlockstatus = $_POST['enable'] ? "locked" : "unlocked";
                 $params['lockenabled'] = $newlockstatus;
                 $values = RegSaveRegistrarLock($params);
                 if (!function_exists($registrar . "_SaveRegistrarLock")) {
                     $errors[] = $domain . " " . $_LANG['domaincannotbemanaged'];
                 }
                 if ($values['error']) {
                     $errors[] = $domain . " - " . $values['error'];
                     continue;
                 }
             }
         }
     } else {
         if ($update == "contactinfo") {
             if (!is_array($domainids) || count($domainids) <= 0) {