|
1 <?php |
|
2 |
|
3 // +--------------------------------------------------------------------+ |
|
4 // | PowerAdmin | |
|
5 // +--------------------------------------------------------------------+ |
|
6 // | Copyright (c) 1997-2002 The PowerAdmin Team | |
|
7 // +--------------------------------------------------------------------+ |
|
8 // | This source file is subject to the license carried by the overal | |
|
9 // | program PowerAdmin as found on http://poweradmin.sf.net | |
|
10 // | The PowerAdmin program falls under the QPL License: | |
|
11 // | http://www.trolltech.com/developer/licensing/qpl.html | |
|
12 // +--------------------------------------------------------------------+ |
|
13 // | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> | |
|
14 // | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> | |
|
15 // +--------------------------------------------------------------------+ |
|
16 |
|
17 // |
|
18 // $Id: delete_record.php,v 1.5 2002/12/10 01:29:47 azurazu Exp $ |
|
19 // |
|
20 |
|
21 require_once("inc/toolkit.inc.php"); |
|
22 |
|
23 if ($_GET["id"]) { |
|
24 if ($_GET["confirm"] == '0') { |
|
25 clean_page("edit.php?id=".$_GET["domain"]); |
|
26 } elseif ($_GET["confirm"] == '1') { |
|
27 delete_record($_GET["id"]); |
|
28 clean_page("edit.php?id=".$_GET["domain"]); |
|
29 } |
|
30 include_once("inc/header.inc.php"); |
|
31 ?><H2>Delete record "<? |
|
32 $data = get_record_from_id($_GET["id"]); |
|
33 print $data["name"]." IN ".$data["type"]." ".$data["content"]; |
|
34 ?>"</H2><? |
|
35 if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") { |
|
36 print "<FONT CLASS=\"warning\">You are trying to delete a record that is needed for this zone to work.</FONT><BR>"; |
|
37 } |
|
38 ?><BR><FONT CLASS="warning">Are you sure?</FONT><BR><BR> |
|
39 <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=1'" VALUE="Yes"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=0'" VALUE="No"> |
|
40 <? |
|
41 } else { |
|
42 include_once("inc/header.inc.php"); |
|
43 die("Nothing to do!"); |
|
44 } |
|
45 include_once("inc/footer.inc.php"); |