Exemple #1
0
 function __construct(AbstractRegistryModule $reg_module)
 {
     $this->DB = Core::GetDBInstance();
     $this->DBDomain = DBDomain::GetInstance();
     $this->DBContact = DBContact::GetInstance();
     $this->DBHameserverHost = DBNameserverHost::GetInstance();
     $this->RegModule = $reg_module;
     $this->Manifest = $reg_module->Manifest;
     $this->Extension = $reg_module->Extension;
     //$reg_module->SetRegistryAccessible(new RegistryAccessible($this));
     $reg_module->SetRegistryAccessible($this);
     // Get interfaces implemented by module
     $impls = (array) class_implements(get_class($reg_module));
     $this->ObserverImplemented = in_array('IRegistryObserver', $impls);
     $this->ServerPollableImplemented = in_array('IRegistryModuleServerPollable', $impls);
     $this->ClientPollableImplemented = in_array('IRegistryModuleClientPollable', $impls);
 }
 public function InitializeModule($extension, DataForm $config)
 {
     parent::InitializeModule($extension, $config);
     $promo_code_lines = array_filter(array_map("trim", explode("\n", $this->Config->GetFieldByName("PromotionCodes")->Value)));
     if ($promo_code_lines) {
         foreach ($promo_code_lines as $promo_code_line) {
             list($tld, $code) = explode(" ", $promo_code_line, 2);
             $this->PromotionCodes[trim($tld)] = trim($code);
         }
     }
 }
 public function InitializeModule($extension, DataForm $config)
 {
     parent::InitializeModule($extension, $config);
     $this->IdnSunriseStart = strtotime("February 1 2010 08:00 UTC+2");
     $this->IdnSunriseEnd = strtotime("April 1 2010 00:00 UTC+2");
 }
Exemple #4
0
        $rows = $db->GetAll("SELECT name, TLD FROM domains WHERE status = 'Delegated'");
    } else {
        for ($i = 1; $i < $_SERVER["argc"]; $i++) {
            list($name, $tld) = explode(".", $_SERVER["argv"][$i], 2);
            $rows[] = array("name" => $name, "TLD" => $tld);
        }
    }
} else {
    print "Usage reset-pw.php [options] [domain1, domain2 ...]\n";
    print "Options:\n";
    print "  --all Update all 'Delegated' domains\n";
    die;
}
print "Starting...\n";
foreach ($rows as $row) {
    try {
        $Registry = RegistryModuleFactory::GetInstance()->GetRegistryByExtension($row["TLD"]);
        if ($Registry->GetManifest()->GetRegistryOptions()->ability->change_domain_authcode == 1) {
            $pw = AbstractRegistryModule::GeneratePassword();
            print "Updating {$row["name"]}.{$row["TLD"]} (pw: {$pw})\n";
            $Domain = DBDomain::GetInstance()->LoadByName($row["name"], $row["TLD"]);
            $Registry->UpdateDomainAuthCode($Domain, $pw);
            print "Updated\n";
        } else {
            print "Not supported for {$row["name"]}.{$row["TLD"]}\n";
        }
    } catch (Exception $e) {
        print "error: {$e->getMessage()}\n";
    }
}
print "Done\n";
 public function __construct(RegistryManifest $Manifest)
 {
     parent::__construct($Manifest);
     $this->ContacttypeSRSMap = array(CONTACT_TYPE::REGISTRANT => 'RESPONSIBLE PERSON', CONTACT_TYPE::ADMIN => 'ADMIN CONTACT', CONTACT_TYPE::TECH => "TECHNICAL CONTACT", CONTACT_TYPE::BILLING => "BILLING CONTACT");
 }