list_supermasters.php
author rejo
Fri, 11 Jul 2008 07:44:10 +0000
changeset 183 aae57715199e
parent 129 92de73876d6e
permissions -rw-r--r--
[feladat @ 291] Bugfix. A user without the privilige to change the permission templates for users couldn't change user properties. Closes: #80.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
     1
<?php
47
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     2
119
f74e4f88b680 [feladat @ 222]
rejo
parents: 110
diff changeset
     3
/*  Poweradmin, a friendly web-based admin tool for PowerDNS.
47
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     4
 *  See <https://rejo.zenger.nl/poweradmin> for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     5
 *
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     6
 *  Copyright 2007, 2008  Rejo Zenger <rejo@zenger.nl>
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     7
 *
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     8
 *  This program is free software: you can redistribute it and/or modify
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
     9
 *  it under the terms of the GNU General Public License as published by
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    10
 *  the Free Software Foundation, either version 3 of the License, or
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    11
 *  (at your option) any later version.
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    12
 *
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    13
 *  This program is distributed in the hope that it will be useful,
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    16
 *  GNU General Public License for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    17
 *
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    18
 *  You should have received a copy of the GNU General Public License
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    20
 */
ae140472d97c [feladat @ 94]
rejo
parents: 15
diff changeset
    21
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    22
require_once("inc/toolkit.inc.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    23
include_once("inc/header.inc.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    24
126
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    25
(verify_permission('supermaster_view')) ? $perm_sm_view = "1" :  $perm_sm_view = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    26
(verify_permission('supermaster_edit')) ? $perm_sm_edit = "1" :  $perm_sm_edit = "0" ;
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    27
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    28
$supermasters = get_supermasters();
129
92de73876d6e [feladat @ 233]
rejo
parents: 126
diff changeset
    29
$num_supermasters = ($supermasters == -1) ? 0 : count($supermasters);
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    30
110
455405c757e1 [feladat @ 210]
rejo
parents: 82
diff changeset
    31
echo "     <h2>" . _('List supermasters') . "</h2>\n";  
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    32
echo "     <table>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    33
echo "      <tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    34
echo "       <th>&nbsp;</th>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    35
echo "       <th>" . _('IP address of supermaster') . "</th>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    36
echo "       <th>" . _('Hostname in NS record') . "</th>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    37
echo "       <th>" . _('Account') . "</th>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    38
echo "      </tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    39
if ($num_supermasters == "0") {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    40
	echo "      <tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    41
	echo "       <td class=\"n\">&nbsp;</td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    42
	echo "       <td class=\"n\" colspan=\"3\">\n";
110
455405c757e1 [feladat @ 210]
rejo
parents: 82
diff changeset
    43
	echo "        " . _('There are no zones to show in this listing.') . "\n";
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    44
	echo "       </td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    45
	echo "      </tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    46
} else {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    47
	foreach ($supermasters as $c) {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    48
		echo "      <tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    49
		if ($perm_sm_edit == "1") {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    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";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    51
		} else {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    52
			echo "<td>&nbsp;</td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    53
		}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    54
		echo "       <td class=\"y\">" . $c['master_ip'] . "</td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    55
		echo "       <td class=\"y\">" . $c['ns_name'] . "</td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    56
		echo "       <td class=\"y\">" . $c['account'] . "</td>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    57
		echo "      </tr>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    58
	}
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    59
}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    60
echo "     </table>\n";
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    61
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    62
include_once("inc/footer.inc.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    63
?>