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 |
|
126
|
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(); |
129
|
29 |
$num_supermasters = ($supermasters == -1) ? 0 : count($supermasters); |
13
|
30 |
|
110
|
31 |
echo " <h2>" . _('List supermasters') . "</h2>\n"; |
82
|
32 |
echo " <table>\n"; |
|
33 |
echo " <tr>\n"; |
|
34 |
echo " <th> </th>\n"; |
|
35 |
echo " <th>" . _('IP address of supermaster') . "</th>\n"; |
|
36 |
echo " <th>" . _('Hostname in NS record') . "</th>\n"; |
|
37 |
echo " <th>" . _('Account') . "</th>\n"; |
|
38 |
echo " </tr>\n"; |
|
39 |
if ($num_supermasters == "0") { |
|
40 |
echo " <tr>\n"; |
|
41 |
echo " <td class=\"n\"> </td>\n"; |
|
42 |
echo " <td class=\"n\" colspan=\"3\">\n"; |
110
|
43 |
echo " " . _('There are no zones to show in this listing.') . "\n"; |
82
|
44 |
echo " </td>\n"; |
|
45 |
echo " </tr>\n"; |
|
46 |
} else { |
|
47 |
foreach ($supermasters as $c) { |
|
48 |
echo " <tr>\n"; |
|
49 |
if ($perm_sm_edit == "1") { |
|
50 |
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"; |
|
51 |
} else { |
|
52 |
echo "<td> </td>\n"; |
|
53 |
} |
|
54 |
echo " <td class=\"y\">" . $c['master_ip'] . "</td>\n"; |
|
55 |
echo " <td class=\"y\">" . $c['ns_name'] . "</td>\n"; |
|
56 |
echo " <td class=\"y\">" . $c['account'] . "</td>\n"; |
|
57 |
echo " </tr>\n"; |
|
58 |
} |
13
|
59 |
} |
82
|
60 |
echo " </table>\n"; |
13
|
61 |
|
|
62 |
include_once("inc/footer.inc.php"); |
|
63 |
?> |