20 */ |
20 */ |
21 |
21 |
22 require_once("inc/toolkit.inc.php"); |
22 require_once("inc/toolkit.inc.php"); |
23 include_once("inc/header.inc.php"); |
23 include_once("inc/header.inc.php"); |
24 |
24 |
25 if (!level(5)) |
25 (verify_permission(supermaster_view)) ? $perm_sm_view = "1" : $perm_sm_view = "0" ; |
26 { |
26 (verify_permission(supermaster_edit)) ? $perm_sm_edit = "1" : $perm_sm_edit = "0" ; |
27 ?> |
|
28 <h3><?php echo _('Oops!'); ?></h3> |
|
29 <p><?php echo _('You are not allowed to add supermasters with your current access level!'); ?></p> |
|
30 <?php |
|
31 } |
|
32 else |
|
33 { |
|
34 |
27 |
35 $supermasters = get_supermasters(0); |
28 $supermasters = get_supermasters(); |
36 $num_supermasters = ($supermasters == -1) ? 0 : count($supermasters); |
|
37 ?> |
|
38 |
29 |
39 <h3><?php printf(_('List all %s supermasters'), $num_supermasters); ?></h3> |
30 echo " <h2>" . _('List all supermasters') . "</h2>\n"; |
40 <table> |
31 echo " <table>\n"; |
41 <tr> |
32 echo " <tr>\n"; |
42 <th> </td> |
33 echo " <th> </th>\n"; |
43 <th><?php echo _('IP address of supermaster'); ?></td> |
34 echo " <th>" . _('IP address of supermaster') . "</th>\n"; |
44 <th><?php echo _('Hostname in NS record'); ?></td> |
35 echo " <th>" . _('Hostname in NS record') . "</th>\n"; |
45 <th><?php echo _('Account'); ?></td> |
36 echo " <th>" . _('Account') . "</th>\n"; |
46 </tr> |
37 echo " </tr>\n"; |
47 <?php |
38 if ($num_supermasters == "0") { |
48 if ($num_supermasters == 0) |
39 echo " <tr>\n"; |
49 { |
40 echo " <td class=\"n\"> </td>\n"; |
50 ?> |
41 echo " <td class=\"n\" colspan=\"3\">\n"; |
51 <tr> |
42 echo " " . _('No supermasters in this listing, sorry.') . "\n"; |
52 <td class="n"> </td> |
43 echo " </td>\n"; |
53 <td class="n" colspan="3"> |
44 echo " </tr>\n"; |
54 <?php echo _('No supermasters in this listing, sorry.'); ?> |
45 } else { |
55 </td> |
46 foreach ($supermasters as $c) { |
56 </tr> |
47 echo " <tr>\n"; |
57 <?php |
48 if ($perm_sm_edit == "1") { |
58 } |
49 echo " <td class=\"n\"><a href=\"delete_supermaster.php?master_ip=" . $c['master_ip'] . "\"><img src=\"images/delete.gif\" title=\"" . _('Delete supermaster') . ' ' . $c['master_ip'] . "\" alt=\"[ " . _('Delete supermaster') . " ]\"></a></td>\n"; |
59 else |
50 } else { |
60 { |
51 echo "<td> </td>\n"; |
61 foreach ($supermasters as $c) |
52 } |
62 { |
53 echo " <td class=\"y\">" . $c['master_ip'] . "</td>\n"; |
63 ?> |
54 echo " <td class=\"y\">" . $c['ns_name'] . "</td>\n"; |
64 <tr> |
55 echo " <td class=\"y\">" . $c['account'] . "</td>\n"; |
65 <td class="n"> |
56 echo " </tr>\n"; |
66 <a href="delete_supermaster.php?master_ip=<?php echo $c["master_ip"] ?>"><img src="images/delete.gif" title="<?php print _('Delete supermaster') . ' ' . $c["master_ip"]; ?>" alt="[ <?php echo _('Delete supermaster'); ?> ]"></a> |
57 } |
67 </td> |
|
68 <td class="y"><?php echo $c["master_ip"] ?></td> |
|
69 <td class="y"><?php echo $c["ns_name"] ?></td> |
|
70 <td class="y"><?php echo $c["account"] ?></td> |
|
71 </tr> |
|
72 <?php |
|
73 } |
|
74 } |
|
75 ?> |
|
76 </table> |
|
77 <?php |
|
78 } |
58 } |
|
59 echo " </table>\n"; |
79 |
60 |
80 include_once("inc/footer.inc.php"); |
61 include_once("inc/footer.inc.php"); |
81 ?> |
62 ?> |