diff -r c72d6d51f3d3 -r c255196bc447 list_zones.php --- a/list_zones.php Wed Mar 12 20:45:56 2008 +0000 +++ b/list_zones.php Tue Mar 25 22:45:31 2008 +0000 @@ -22,110 +22,72 @@ require_once("inc/toolkit.inc.php"); include_once("inc/header.inc.php"); -$num_all_domains = zone_count(0); -$doms = zone_count(0, LETTERSTART); -?> -

-"; - show_pages($doms,ROWAMOUNT); - echo ""; +if (verify_permission(zone_content_view_others)) { $perm_view = "all" ; } +elseif (verify_permission(zone_content_view_own)) { $perm_view = "own" ; } +else { $perm_view = "none" ;} + +if (verify_permission(zone_content_edit_others)) { $perm_edit = "all" ; } +elseif (verify_permission(zone_content_edit_own)) { $perm_edit = "own" ;} +else { $perm_edit = "none" ; } + +$count_zones_all = zone_count_ng("all"); +$count_zones_all_letterstart = zone_count_ng($perm_view,LETTERSTART); +$count_zones_view = zone_count_ng($perm_view); +$count_zones_edit = zone_count_ng($perm_edit); + +echo "

" . _('List zones') . "

\n"; + +if ($perm_view == "none") { + echo "

" . _("You do not have the permission to see any zones.") . "

\n"; +} else { + echo "
\n"; + show_pages($count_zones_all_letterstart,ROWAMOUNT); + echo "
\n"; -if ($num_all_domains > ROWAMOUNT) -{ - echo "
"; - show_letters(LETTERSTART); - echo "
"; -} -?> - - - - - - - - - + if ($count_zones_view > ROWAMOUNT) { + echo "
"; + show_letters(LETTERSTART); + echo "
"; + } + echo "
 
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; - - - - - -\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + echo " \n"; + echo "
 " . _('Name') . "" . _('Type') . "" . _('Records') . "" . _('Owner') . "
 
\n"; + echo " \"[\n"; + if ( $perm_edit != "all" || $perm_edit != "none") { + $user_is_zone_owner = verify_user_is_owner_zoneid($zone["id"]); + } + if ( $perm_edit == "all" || ( $perm_edit == "own" && $user_is_zone_owner == "1") ) { + echo " \"[\n"; + } + echo " " . $zone["name"] . "" . strtolower($zone["type"]) . "" . $zone["count_records"] . "" . $zone_owners . "
\n"; + } -// If he has domains, dump them (duh) -else -{ - foreach ($doms as $c) - { - ?> - - - - ">" alt="[ ]"> - - ">" alt="[]"> - - - - - - -"; - } - else - { - print "".$zone_owners.""; - } - print "\n"; - } -} - -?> - - - -

- -

- - - - echo _('You only administer some records of domains marked with an (*).'); -?> - -