list_supermasters.php
changeset 13 2ff220cfde13
child 15 305cee3b388d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/list_supermasters.php	Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,71 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+include_once("inc/header.inc.php");
+
+if (!level(5))
+{
+?>
+     <h3><? echo _('Oops!'); ?></h3>
+     <p><? echo _('You are not allowed to add supermasters with your current access level!'); ?></p>
+<?
+} 
+else
+{
+
+	$supermasters = get_supermasters(0);
+	$num_supermasters = count($supermasters);
+	if ($supermasters < 0)
+	{
+		$num_supermasters = "0";
+	}
+	else
+	{
+		$num_supermasters = count($supermasters);
+	}
+
+	?>
+
+	   <h3><? printf(_('List all %s supermasters'), $num_supermasters); ?></h3>
+	   <table>
+	    <tr>
+	     <th>&nbsp;</td>
+	     <th><? echo _('IP address of supermaster'); ?></td>
+	     <th><? echo _('Hostname in NS record'); ?></td>
+	     <th><? echo _('Account'); ?></td>
+	    </tr>
+	<?
+	   if ($num_supermasters == 0)
+	   {
+	?>
+	    <tr>
+	     <td class="n">&nbsp;</td>
+	     <td class="n" colspan="3">
+	      <? echo _('No supermasters in this listing, sorry.'); ?>
+	     </td>
+	    </tr>
+	<?
+	   }
+	   else
+	   {
+		   foreach ($supermasters as $c)
+		   {
+	?>
+	    <tr>
+	     <td class="n">
+	      <a href="delete_supermaster.php?master_ip=<? echo $c["master_ip"] ?>"><img src="images/delete.gif" title="<? print _('Delete supermaster') . ' ' . $c["master_ip"]; ?>" alt="[ <? echo _('Delete supermaster'); ?> ]"></a>
+	     </td>
+	     <td class="y"><? echo $c["master_ip"] ?></td>
+	     <td class="y"><? echo $c["ns_name"] ?></td>
+	     <td class="y"><? echo $c["account"] ?></td>
+	    </tr>
+	<?
+		   }
+	   }
+	?>
+	   </table>
+<?
+}
+
+include_once("inc/footer.inc.php");
+?>