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
?>
+ − 28
<h3> <? echo _ ( 'Oops!' ); ?> </h3>
+ − 29
<p> <? echo _ ( 'You are not allowed to add supermasters with your current access level!' ); ?> </p>
+ − 30
<?
+ − 31
}
+ − 32
else
+ − 33
{
+ − 34
+ − 35
$supermasters = get_supermasters ( 0 );
15
+ − 36
$num_supermasters = ( $supermasters == - 1 ) ? 0 : count ( $supermasters );
13
+ − 37
?>
+ − 38
+ − 39
<h3> <? printf ( _ ( 'List all %s supermasters' ), $num_supermasters ); ?> </h3>
+ − 40
<table>
+ − 41
<tr>
+ − 42
<th> </td>
+ − 43
<th> <? echo _ ( 'IP address of supermaster' ); ?> </td>
+ − 44
<th> <? echo _ ( 'Hostname in NS record' ); ?> </td>
+ − 45
<th> <? echo _ ( 'Account' ); ?> </td>
+ − 46
</tr>
+ − 47
<?
+ − 48
if ( $num_supermasters == 0 )
+ − 49
{
+ − 50
?>
+ − 51
<tr>
+ − 52
<td class= "n" > </td>
+ − 53
<td class= "n" colspan= "3" >
+ − 54
<? echo _ ( 'No supermasters in this listing, sorry.' ); ?>
+ − 55
</td>
+ − 56
</tr>
+ − 57
<?
+ − 58
}
+ − 59
else
+ − 60
{
+ − 61
foreach ( $supermasters as $c )
+ − 62
{
+ − 63
?>
+ − 64
<tr>
+ − 65
<td class= "n" >
+ − 66
<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>
+ − 67
</td>
+ − 68
<td class= "y" > <? echo $c [ "master_ip" ] ?> </td>
+ − 69
<td class= "y" > <? echo $c [ "ns_name" ] ?> </td>
+ − 70
<td class= "y" > <? echo $c [ "account" ] ?> </td>
+ − 71
</tr>
+ − 72
<?
+ − 73
}
+ − 74
}
+ − 75
?>
+ − 76
</table>
+ − 77
<?
+ − 78
}
+ − 79
+ − 80
include_once ( "inc/footer.inc.php" );
+ − 81
?>