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/toolkit.inc.php"); |
|
23 |
include_once("inc/header.inc.php"); |
|
24 |
|
|
25 |
if (!level(5)) |
|
26 |
{ |
|
27 |
?> |
71
|
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 |
13
|
31 |
} |
|
32 |
else |
|
33 |
{ |
|
34 |
|
|
35 |
$supermasters = get_supermasters(0); |
15
|
36 |
$num_supermasters = ($supermasters == -1) ? 0 : count($supermasters); |
13
|
37 |
?> |
|
38 |
|
71
|
39 |
<h3><?php printf(_('List all %s supermasters'), $num_supermasters); ?></h3> |
13
|
40 |
<table> |
|
41 |
<tr> |
|
42 |
<th> </td> |
71
|
43 |
<th><?php echo _('IP address of supermaster'); ?></td> |
|
44 |
<th><?php echo _('Hostname in NS record'); ?></td> |
|
45 |
<th><?php echo _('Account'); ?></td> |
13
|
46 |
</tr> |
71
|
47 |
<?php |
13
|
48 |
if ($num_supermasters == 0) |
|
49 |
{ |
|
50 |
?> |
|
51 |
<tr> |
|
52 |
<td class="n"> </td> |
|
53 |
<td class="n" colspan="3"> |
71
|
54 |
<?php echo _('No supermasters in this listing, sorry.'); ?> |
13
|
55 |
</td> |
|
56 |
</tr> |
71
|
57 |
<?php |
13
|
58 |
} |
|
59 |
else |
|
60 |
{ |
|
61 |
foreach ($supermasters as $c) |
|
62 |
{ |
|
63 |
?> |
|
64 |
<tr> |
|
65 |
<td class="n"> |
71
|
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> |
13
|
67 |
</td> |
71
|
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> |
13
|
71 |
</tr> |
71
|
72 |
<?php |
13
|
73 |
} |
|
74 |
} |
|
75 |
?> |
|
76 |
</table> |
71
|
77 |
<?php |
13
|
78 |
} |
|
79 |
|
|
80 |
include_once("inc/footer.inc.php"); |
|
81 |
?> |