Beispiel #1
0
             $dns_records[] = "<li><i class='icon-gray fa fa-gray fa-angle-right'></i> <span class='badge badge1 badge2 editRecord' data-action='edit' data-id='{$ptr->id}' data-domain_id='{$ptr->domain_id}'>{$ptr->type}</span> {$ptr->name} </li>";
         }
         $dns_records[] = "</ul>";
         // if none ignore
         $dns_records = sizeof($dns_records) == 3 ? "" : implode(" ", $dns_records);
     } else {
         $dns_records = "";
     }
 } else {
     $dns_records = "";
     $button = "";
 }
 // add button
 if ($User->settings->enablePowerDNS == 1) {
     // add new button
     if ($Subnets->validate_hostname($addresses[$n]->dns_name) && ($User->isadmin || @$User->user->pdns == "Yes")) {
         $button = "<i class='fa fa-plus-circle fa-gray fa-href editRecord' data-action='add' data-id='" . $Addresses->transform_address($addresses[$n]->ip_addr, "dotted") . "' data-domain_id='" . $addresses[$n]->dns_name . "'></i>";
     } else {
         $button = "";
     }
 }
 # resolve dns name
 $resolve = $DNS->resolve_address($addresses[$n]->ip_addr, $addresses[$n]->dns_name, false, $subnet['nameserverId']);
 print "<td class='{$resolve['class']} hostname'>{$resolve['name']} {$button} {$dns_records}</td>";
 # print firewall address object - mandatory if enabled
 if (in_array('firewallAddressObject', $selected_ip_fields) && $zone) {
     print "<td class='fwzone'>" . $addresses[$n]->firewallAddressObject . "</td>";
 }
 # print description - mandatory
 print "<td class='description'>" . $addresses[$n]->description . "</td>";
 # Print mac address icon!
Beispiel #2
0
             $dns_records[] = "<li><i class='icon-gray fa fa-gray fa-angle-right'></i> <span class='badge badge1 badge2'>{$ptr->type}</span> {$ptr->name} </li>";
         }
         $dns_records[] = "</ul>";
         // if none ignore
         $dns_records = sizeof($dns_records) == 3 ? "" : implode(" ", $dns_records);
     } else {
         $dns_records = "";
     }
 } else {
     $dns_records = "";
     $button = "";
 }
 // add button
 if ($User->settings->enablePowerDNS == 1) {
     // add new button
     if ($Subnets->validate_hostname($addresses[$n]->dns_name)) {
         $button = "<i class='fa fa-plus-circle fa-gray fa-href editRecord' data-action='add' data-id='" . $Addresses->transform_address($addresses[$n]->ip_addr, "dotted") . "' data-domain_id='" . $addresses[$n]->dns_name . "'></i>";
     } else {
         $button = "";
     }
 }
 # resolve dns name
 $resolve = $DNS->resolve_address($addresses[$n]->ip_addr, $addresses[$n]->dns_name, false, $subnet['nameserverId']);
 print "<td class='{$resolve['class']} hostname'>{$resolve['name']} {$button} {$dns_records}</td>";
 # print description - mandatory
 print "<td class='description'>" . $addresses[$n]->description . "</td>";
 # Print mac address icon!
 if (in_array('mac', $selected_ip_fields)) {
     if (!empty($addresses[$n]->mac)) {
         print "<td class='narrow'><i class='info fa fa-gray fa-sitemap' rel='tooltip' data-container='body' title='" . _('MAC') . ": " . $addresses[$n]->mac . "'></i></td>";
     } else {