delete_record.php
author rejo
Wed, 27 Jun 2007 20:45:51 +0000
changeset 29 e1c60f72d494
parent 13 2ff220cfde13
child 37 b785e54690ce
permissions -rw-r--r--
[feladat @ 76] Changed some of the functions that are used for the listing of (all) zones. Instead of getting all zones from the database, it now only requests exactlty what it needs. Considerable perfomance improvement.
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
require_once("inc/toolkit.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     4
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     5
if ($_GET["id"]) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     6
        if ($_GET["confirm"] == '0') {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     7
                clean_page("edit.php?id=".$_GET["domain"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     8
        } elseif ($_GET["confirm"] == '1') {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     9
                delete_record($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    10
                clean_page("edit.php?id=".$_GET["domain"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    11
        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    12
        include_once("inc/header.inc.php");
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    13
        ?>
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    14
	
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    15
	<h2><? echo _('Delete record'); ?> "<?
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    16
        $data = get_record_from_id($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    17
        print $data["name"]." IN ".$data["type"]." ".$data["content"];
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    18
        ?>"</h2><?
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    19
        if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") {
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    20
                print "<font class=\"warning\">" . _('You are trying to delete a record that is needed for this zone to work.') . "</font><br>";
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    21
        }
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    22
        ?><br><font class="warning"><? echo _('Are you sure?'); ?></font><br><br>
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    23
        <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<? echo _('Yes'); ?>"> 
2ff220cfde13 [feladat @ 60]
rejo
parents: 2
diff changeset
    24
	<input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<? echo _('No'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    25
        <?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    26
} else {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    27
        include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    28
        die("Nothing to do!");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    29
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    30
include_once("inc/footer.inc.php");