1
+ − 1
<?php
+ − 2
47
+ − 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
1
+ − 22
require_once ( "inc/toolkit.inc.php" );
+ − 23
+ − 24
if ( ! level ( 5 ))
+ − 25
{
+ − 26
error ( ERR_LEVEL_5 );
+ − 27
+ − 28
}
+ − 29
+ − 30
if ( $_GET [ "id" ]) {
+ − 31
if ( $_GET [ "confirm" ] == '0' ) {
+ − 32
clean_page ( "index.php" );
+ − 33
} elseif ( $_GET [ "confirm" ] == '1' ) {
+ − 34
delete_domain ( $_GET [ "id" ]);
+ − 35
clean_page ( "index.php" );
+ − 36
}
+ − 37
include_once ( "inc/header.inc.php" );
+ − 38
$info = get_domain_info_from_id ( $_GET [ "id" ]);
71
+ − 39
?> <h2> <?php echo _ ( 'Delete zone' ); ?> " <?php echo $info [ "name" ] ?> "</h2>
+ − 40
<?php
13
+ − 41
if ( $info [ "owner" ])
+ − 42
{
+ − 43
print ( _ ( 'Owner' ) . ": " . $info [ "owner" ] . "<br>" );
+ − 44
}
+ − 45
print ( _ ( 'Type' ) . ": " . strtolower ( $info [ "type" ]) . "<br>" );
+ − 46
print ( _ ( 'Number of records in zone' ) . ": " . $info [ "numrec" ] . "<br>" );
+ − 47
if ( $info [ "type" ] == "SLAVE" )
+ − 48
{
+ − 49
$slave_master = get_domain_slave_master ( $_GET [ "id" ]);
+ − 50
if ( supermaster_exists ( $slave_master ))
+ − 51
{
+ − 52
print ( "<font class= \" warning \" >" );
+ − 53
printf ( _ ( 'You are about to delete a slave zone of which the master nameserver, %s, is a supermaster. Deleting the zone now, will result in temporary removal only. Whenever the supermaster sends a notification for this zone, it will be added again!' ), $slave_master );
+ − 54
print ( "</font><br>" );
+ − 55
}
+ − 56
}
+ − 57
?>
71
+ − 58
<font class="warning"> <?php echo _ ( 'Are you sure?' ); ?> </font>
13
+ − 59
<br><br>
71
+ − 60
<input type="button" class="button" OnClick="location.href=' <?php echo $_SERVER [ "REQUEST_URI" ] ?> &confirm=1'" value=" <?php echo _ ( 'Yes' ); ?> ">
+ − 61
<input type="button" class="button" OnClick="location.href=' <?php echo $_SERVER [ "REQUEST_URI" ] ?> &confirm=0'" value=" <?php echo _ ( 'No' ); ?> ">
+ − 62
<?php
1
+ − 63
} elseif ( $_GET [ "edit" ]) {
+ − 64
include_once ( "inc/header.inc.php" );
+ − 65
} else {
+ − 66
include_once ( "inc/header.inc.php" );
48
+ − 67
echo _ ( 'Nothing to do!' );
1
+ − 68
}
+ − 69
include_once ( "inc/footer.inc.php" );