Пример #1
0
    $showIdnCodeSelection = $oIDNA->sldWasEncoded();
} else {
    if (isset($_SESSION['cart']['domains']) && sizeof($_SESSION['cart']['domains'])) {
        foreach ($_SESSION['cart']['domains'] as $cartDomain) {
            list($sld, $tld) = explode(".", $cartDomain['domain'], 2);
            $oIDNA = new NamecheapRegistrarIDNA($sld, $tld);
            if ($oIDNA->sldWasEncoded()) {
                $showIdnCodeSelection = true;
                break;
            }
        }
    }
}
if ($showIdnCodeSelection) {
    $idnCodesOptions = implode(",", array_keys($oIDNA->getCodeOptions()));
    foreach ($oIDNA->getTldList() as $tld) {
        foreach ($additionaldomainfields["." . $tld] as $additionalField) {
            if ($additionalField['Name'] == 'idnCode') {
                continue 2;
            }
        }
        $additionaldomainfields["." . $tld][] = array("Name" => "idnCode", "LangVar" => 'idnCode', "Type" => "dropdown", "Options" => $idnCodesOptions, 'Description' => $_LANG['idnCodeDescription']);
    }
}
// .ca tld additional fields
$additionaldomainfields[".ca"][] = array("Name" => "Job Title", "LangVar" => "cajobtitle", "Type" => "text", "Size" => "30", "Default" => "", "Required" => false, "Description" => "Required for non-individual registrants only");
// .fr tld additional fields
$additionaldomainfields[".fr"][] = array("Name" => "Legal Type", "LangVar" => "frlegaltype", "Type" => "dropdown", "Options" => "Company,Individual", "Default" => "Individual", "Required" => true, "Description" => '');
$additionaldomainfields[".fr"][] = array("Name" => "Date of Birth", "LangVar" => "frregistrantbirthdate", "Type" => "text", "Size" => "30", "Default" => "", "Required" => false, "Description" => "The registrant's date of birth in the form YYYY-MM-DD");
$additionaldomainfields[".fr"][] = array("Name" => "Place of Birth", "LangVar" => "frregistrantbirthplace", "Type" => "text", "Size" => "30", "Default" => "", "Required" => false, "Description" => "The registrant's place of birth. French registrants have to provide the place of birth in the form [ZIP code,City] (e.g. \"78181, Saint Quentin en Yvelines Cedex\"). Non-French registrants simply have to provide the [TWO-LETTER COUNTRY CODE] of their country of birth (e.g. \"DE\")");
$additionaldomainfields[".fr"][] = array("Name" => "Legal Id", "LangVar" => "frregistrantlegalid", "Type" => "text", "Size" => "30", "Default" => "", "Required" => false, "Description" => "French company with a SIREN or SIRET number should continue to provide this number instead as legal id. The SIREN (Système d’Identification du Répertoire des Entreprises) number is the first part of the SIRET NUMBER and consists of 9 digits. The SIRET (Système d’Identification du Répertoire des Etablissements) number is a unique identification number with 14 digits");