13
|
1 |
<?php |
47
|
2 |
|
119
|
3 |
/* Poweradmin, a friendly web-based admin tool for PowerDNS. |
47
|
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 |
|
82
|
25 |
(verify_permission(supermaster_view)) ? $perm_sm_view = "1" : $perm_sm_view = "0" ; |
|
26 |
(verify_permission(supermaster_edit)) ? $perm_sm_edit = "1" : $perm_sm_edit = "0" ; |
13
|
27 |
|
82
|
28 |
$supermasters = get_supermasters(); |
13
|
29 |
|
110
|
30 |
echo " <h2>" . _('List supermasters') . "</h2>\n"; |
82
|
31 |
echo " <table>\n"; |
|
32 |
echo " <tr>\n"; |
|
33 |
echo " <th> </th>\n"; |
|
34 |
echo " <th>" . _('IP address of supermaster') . "</th>\n"; |
|
35 |
echo " <th>" . _('Hostname in NS record') . "</th>\n"; |
|
36 |
echo " <th>" . _('Account') . "</th>\n"; |
|
37 |
echo " </tr>\n"; |
|
38 |
if ($num_supermasters == "0") { |
|
39 |
echo " <tr>\n"; |
|
40 |
echo " <td class=\"n\"> </td>\n"; |
|
41 |
echo " <td class=\"n\" colspan=\"3\">\n"; |
110
|
42 |
echo " " . _('There are no zones to show in this listing.') . "\n"; |
82
|
43 |
echo " </td>\n"; |
|
44 |
echo " </tr>\n"; |
|
45 |
} else { |
|
46 |
foreach ($supermasters as $c) { |
|
47 |
echo " <tr>\n"; |
|
48 |
if ($perm_sm_edit == "1") { |
|
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"; |
|
50 |
} else { |
|
51 |
echo "<td> </td>\n"; |
|
52 |
} |
|
53 |
echo " <td class=\"y\">" . $c['master_ip'] . "</td>\n"; |
|
54 |
echo " <td class=\"y\">" . $c['ns_name'] . "</td>\n"; |
|
55 |
echo " <td class=\"y\">" . $c['account'] . "</td>\n"; |
|
56 |
echo " </tr>\n"; |
|
57 |
} |
13
|
58 |
} |
82
|
59 |
echo " </table>\n"; |
13
|
60 |
|
|
61 |
include_once("inc/footer.inc.php"); |
|
62 |
?> |