delete_record.php
author rejo
Tue, 10 Apr 2007 22:40:43 +0000
changeset 1 58094faf794d
child 2 9a485c41cfcf
permissions -rw-r--r--
[feladat @ 2] Creation of initial working branch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     1
<?php
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     2
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     3
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     4
// | PowerAdmin								|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     5
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     6
// | Copyright (c) 1997-2002 The PowerAdmin Team			|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     7
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     8
// | This source file is subject to the license carried by the overal	|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     9
// | program PowerAdmin as found on http://poweradmin.sf.net		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    10
// | The PowerAdmin program falls under the QPL License:		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    11
// | http://www.trolltech.com/developer/licensing/qpl.html		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    12
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    13
// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl>	|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    14
// |          Sjeemz <sjeemz <AT> sjeemz <DOT> nl>			|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    15
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    16
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    17
//
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    18
// $Id: delete_record.php,v 1.5 2002/12/10 01:29:47 azurazu Exp $
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    19
//
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    20
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    21
require_once("inc/toolkit.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    22
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    23
if ($_GET["id"]) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    24
        if ($_GET["confirm"] == '0') {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    25
                clean_page("edit.php?id=".$_GET["domain"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    26
        } elseif ($_GET["confirm"] == '1') {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    27
                delete_record($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    28
                clean_page("edit.php?id=".$_GET["domain"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    29
        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    30
        include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    31
        ?><H2>Delete record "<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    32
        $data = get_record_from_id($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    33
        print $data["name"]." IN ".$data["type"]." ".$data["content"];
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    34
        ?>"</H2><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    35
        if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    36
                print "<FONT CLASS=\"warning\">You are trying to delete a record that is needed for this zone to work.</FONT><BR>";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    37
        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    38
        ?><BR><FONT CLASS="warning">Are you sure?</FONT><BR><BR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    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">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    40
        <?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    41
} else {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    42
        include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    43
        die("Nothing to do!");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    44
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    45
include_once("inc/footer.inc.php");