Example #1
0
function show_pages($id)
{
    global $pages;
    if (!isset($pages[$id])) {
        return;
    }
    echo '<ul>';
    foreach ($pages[$id] as $page) {
        if ($page['name'] == '') {
            $page['name'] = 'NO NAME';
        }
        echo '<li id="page_' . $page['id'] . '"><a';
        if ($page['disabled'] == '1') {
            echo ' class="disabled"';
        }
        echo '>' . htmlspecialchars($page['name']) . '</a>';
        show_pages($page['id']);
        echo '</li>';
    }
    echo '</ul>';
}
Example #2
0
    update_soa_serial($zone_id);
    dnssec_secure_zone($zone_name);
    dnssec_rectify_zone($zone_id);
}
if (isset($_POST['unsign_zone'])) {
    $zone_name = get_zone_name_from_id($zone_id);
    dnssec_unsecure_zone($zone_name);
    update_soa_serial($zone_id);
}
$domain_type = get_domain_type($zone_id);
$record_count = count_zone_records($zone_id);
$zone_templates = get_list_zone_templ($_SESSION['userid']);
$zone_template_id = get_zone_template($zone_id);
echo "   <h2>" . _('Edit zone') . " \"" . get_zone_name_from_id($zone_id) . "\"</h2>\n";
echo "   <div class=\"showmax\">\n";
show_pages($record_count, $iface_rowamount, $zone_id);
echo "   </div>\n";
$records = get_records_from_domain_id($zone_id, ROWSTART, $iface_rowamount, RECORD_SORT_BY);
if ($records == "-1") {
    echo " <p>" . _("This zone does not have any records. Weird.") . "</p>\n";
} else {
    echo "   <form method=\"post\" action=\"\">\n";
    echo "   <table>\n";
    echo "    <tr>\n";
    echo "     <th>&nbsp;</th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=id\">" . _('Id') . "</a></th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=name\">" . _('Name') . "</a></th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=type\">" . _('Type') . "</a></th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=content\">" . _('Content') . "</a></th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=prio\">" . _('Priority') . "</a></th>\n";
    echo "     <th><a href=\"edit.php?id=" . $zone_id . "&amp;record_sort_by=ttl\">" . _('TTL') . "</a></th>\n";
    $zone_sort_by = 'name';
}
echo "    <h2>" . _('List zones') . "</h2>\n";
if ($perm_view == "none") {
    echo "     <p>" . _('You do not have the permission to see any zones.') . "</p>\n";
} elseif ($count_zones_view > $iface_rowamount && $count_zones_all_letterstart == "0" || $count_zones_view == 0) {
    if ($count_zones_view > $iface_rowamount) {
        echo "<div class=\"showmax\">";
        show_letters(LETTERSTART);
        echo "</div>";
    }
    echo "     <p>" . _('There are no zones to show in this listing.') . "</p>\n";
} else {
    if (LETTERSTART != 'all') {
        echo "     <div class=\"showmax\">\n";
        show_pages($count_zones_all_letterstart, $iface_rowamount);
        echo "     </div>\n";
    }
    if ($count_zones_view > $iface_rowamount) {
        echo "<div class=\"showmax\">";
        show_letters(LETTERSTART);
        echo "</div>";
    }
    echo "     <form method=\"post\" action=\"delete_domains.php\">\n";
    echo "     <table>\n";
    echo "      <tr>\n";
    echo "       <th>&nbsp;</th>\n";
    echo "       <th>&nbsp;</th>\n";
    echo "       <th><a href=\"list_zones.php?zone_sort_by=name\">" . _('Name') . "</a></th>\n";
    echo "       <th><a href=\"list_zones.php?zone_sort_by=type\">" . _('Type') . "</a></th>\n";
    echo "       <th><a href=\"list_zones.php?zone_sort_by=count_records\">" . _('Records') . "</a></th>\n";