13
|
1 |
<?php |
47
|
2 |
|
|
3 |
/* PowerAdmin, a friendly web-based admin tool for PowerDNS. |
|
4 |
* See <https://rejo.zenger.nl/poweradmin> for more details. |
|
5 |
* |
|
6 |
* Copyright 2007, 2008 Rejo Zenger <rejo@zenger.nl> |
|
7 |
* |
|
8 |
* This program is free software: you can redistribute it and/or modify |
|
9 |
* it under the terms of the GNU General Public License as published by |
|
10 |
* the Free Software Foundation, either version 3 of the License, or |
|
11 |
* (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
20 |
*/ |
|
21 |
|
13
|
22 |
require_once("inc/i18n.inc.php"); |
|
23 |
require_once("inc/toolkit.inc.php"); |
|
24 |
include_once("inc/header.inc.php"); |
|
25 |
|
|
26 |
if (!level(5)) |
|
27 |
{ |
|
28 |
?> |
|
29 |
<h3><? echo _('Oops!'); ?></h3> |
|
30 |
<p><? echo _('You are not allowed to add supermasters with your current access level!'); ?></p> |
|
31 |
<? |
|
32 |
} |
|
33 |
else |
|
34 |
{ |
|
35 |
|
|
36 |
$supermasters = get_supermasters(0); |
15
|
37 |
$num_supermasters = ($supermasters == -1) ? 0 : count($supermasters); |
13
|
38 |
?> |
|
39 |
|
|
40 |
<h3><? printf(_('List all %s supermasters'), $num_supermasters); ?></h3> |
|
41 |
<table> |
|
42 |
<tr> |
|
43 |
<th> </td> |
|
44 |
<th><? echo _('IP address of supermaster'); ?></td> |
|
45 |
<th><? echo _('Hostname in NS record'); ?></td> |
|
46 |
<th><? echo _('Account'); ?></td> |
|
47 |
</tr> |
|
48 |
<? |
|
49 |
if ($num_supermasters == 0) |
|
50 |
{ |
|
51 |
?> |
|
52 |
<tr> |
|
53 |
<td class="n"> </td> |
|
54 |
<td class="n" colspan="3"> |
|
55 |
<? echo _('No supermasters in this listing, sorry.'); ?> |
|
56 |
</td> |
|
57 |
</tr> |
|
58 |
<? |
|
59 |
} |
|
60 |
else |
|
61 |
{ |
|
62 |
foreach ($supermasters as $c) |
|
63 |
{ |
|
64 |
?> |
|
65 |
<tr> |
|
66 |
<td class="n"> |
|
67 |
<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> |
|
68 |
</td> |
|
69 |
<td class="y"><? echo $c["master_ip"] ?></td> |
|
70 |
<td class="y"><? echo $c["ns_name"] ?></td> |
|
71 |
<td class="y"><? echo $c["account"] ?></td> |
|
72 |
</tr> |
|
73 |
<? |
|
74 |
} |
|
75 |
} |
|
76 |
?> |
|
77 |
</table> |
|
78 |
<? |
|
79 |
} |
|
80 |
|
|
81 |
include_once("inc/footer.inc.php"); |
|
82 |
?> |