1
+ − 1
<?php
+ − 2
+ − 3
require_once ( "inc/toolkit.inc.php" );
+ − 4
+ − 5
if ( $_GET [ "id" ]) {
+ − 6
if ( $_GET [ "confirm" ] == '0' ) {
+ − 7
clean_page ( "edit.php?id=" . $_GET [ "domain" ]);
+ − 8
} elseif ( $_GET [ "confirm" ] == '1' ) {
+ − 9
delete_record ( $_GET [ "id" ]);
+ − 10
clean_page ( "edit.php?id=" . $_GET [ "domain" ]);
+ − 11
}
+ − 12
include_once ( "inc/header.inc.php" );
13
+ − 13
?>
+ − 14
+ − 15
<h2> <? echo _ ( 'Delete record' ); ?> "<?
1
+ − 16
$data = get_record_from_id ( $_GET [ "id" ]);
+ − 17
print $data [ "name" ] . " IN " . $data [ "type" ] . " " . $data [ "content" ];
13
+ − 18
?> "</h2> <?
1
+ − 19
if (( $data [ "type" ] == "NS" && $data [ "name" ] == get_domain_name_from_id ( $_GET [ "domain" ])) || $data [ "type" ] == "SOA" ) {
13
+ − 20
print "<font class= \" warning \" >" . _ ( 'You are trying to delete a record that is needed for this zone to work.' ) . "</font><br>" ;
1
+ − 21
}
13
+ − 22
?> <br><font class= "warning" > <? echo _ ( 'Are you sure?' ); ?> </font><br><br>
+ − 23
<input type= "button" class= "button" OnClick= "location.href=' <? echo $_SERVER [ "REQUEST_URI" ] ?> &confirm=1'" value= " <? echo _ ( 'Yes' ); ?> " >
+ − 24
<input type= "button" class= "button" OnClick= "location.href=' <? echo $_SERVER [ "REQUEST_URI" ] ?> &confirm=0'" value= " <? echo _ ( 'No' ); ?> " >
1
+ − 25
<?
+ − 26
} else {
+ − 27
include_once ( "inc/header.inc.php" );
+ − 28
die ( "Nothing to do!" );
+ − 29
}
+ − 30
include_once ( "inc/footer.inc.php" );