Пример #1
0
     print "\t&nbsp;&nbsp; DNS zone <strong>{$domain->name}</strong></li>";
     print " <form name='domainEdit' id='domainEdit'><input type='hidden' name='action' value='delete'><input type='hidden' name='id' value='{$domain->id}'></form>";
     print "\t<div class='domain-edit-result'></div>";
     print "</div>";
 } elseif (isset($_POST['DNSrecursive']) && $domain === false) {
     // use default values
     $values = json_decode($User->settings->powerDNS, true);
     $values['name'] = $zone;
     // create domain
     $PowerDNS->domain_edit("add", array("name" => $zone, "type" => "NATIVE"));
     // save id
     $domain_id = $PowerDNS->get_last_db_id();
     // create default records
     $PowerDNS->create_default_records($values);
     // create PTR records
     $Addresses->pdns_validate_connection();
     $hosts = $Addresses->fetch_subnet_addresses($subnet_old_details['id'], "ip_addr", "asc");
     // loop
     if (sizeof($hosts) > 0) {
         $cnt = 0;
         $err = 0;
         $ski = 0;
         // loop
         foreach ($hosts as $h) {
             if ($h->PTRignore == "1") {
                 $ski++;
             } elseif ($Addresses->ptr_add($h, false, $h->id) !== false) {
                 $cnt++;
             } else {
                 $err++;
             }