delete_domain.php
author peter
Wed, 12 Mar 2008 19:47:25 +0000
changeset 80 48b5f7021aaa
parent 79 0c0aa144356a
child 82 c255196bc447
permissions -rw-r--r--
[feladat @ 158] Bugfix for ticket:18: Minor modification in the CSS to make sure no data is displayed on top of other data. Also a little modification to make sure the sub-owners (if there are any) are displayed above the record form, instead of next to it.
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
47
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     3
/*  PowerAdmin, a friendly web-based admin tool for PowerDNS.
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     4
 *  See <https://rejo.zenger.nl/poweradmin> for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     5
 *
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     6
 *  Copyright 2007, 2008  Rejo Zenger <rejo@zenger.nl>
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     7
 *
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     8
 *  This program is free software: you can redistribute it and/or modify
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
     9
 *  it under the terms of the GNU General Public License as published by
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    10
 *  the Free Software Foundation, either version 3 of the License, or
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    11
 *  (at your option) any later version.
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    12
 *
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    13
 *  This program is distributed in the hope that it will be useful,
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    16
 *  GNU General Public License for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    17
 *
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    18
 *  You should have received a copy of the GNU General Public License
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    20
 */
ae140472d97c [feladat @ 94]
rejo
parents: 37
diff changeset
    21
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    22
require_once("inc/toolkit.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    23
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    24
if (!level(5))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    25
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    26
        error(ERR_LEVEL_5);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    27
        
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    28
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    29
79
0c0aa144356a [feladat @ 156]
peter
parents: 71
diff changeset
    30
if (isset($_GET["id"])) {
0c0aa144356a [feladat @ 156]
peter
parents: 71
diff changeset
    31
        if ((isset($_GET["confirm"])) && ($_GET['confirm'] == '0')) {
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    32
                clean_page("index.php");
79
0c0aa144356a [feladat @ 156]
peter
parents: 71
diff changeset
    33
        } elseif ((isset($_GET["confirm"])) && ($_GET['confirm'] == '1')) {
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    34
                delete_domain($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    35
                clean_page("index.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    36
        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    37
        include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    38
        $info = get_domain_info_from_id($_GET["id"]);
71
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    39
        ?><h2><?php echo _('Delete zone'); ?> "<?php echo $info["name"] ?>"</h2>
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    40
        <?php
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    41
	if($info["owner"])
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    42
	{
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    43
		print (_('Owner') . ": " . $info["owner"] . "<br>"); 
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    44
	}
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    45
	print (_('Type') . ": " . strtolower($info["type"]) . "<br>");
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    46
	print (_('Number of records in zone') . ": " . $info["numrec"] . "<br>");
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    47
	if($info["type"] == "SLAVE")
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    48
	{
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    49
		$slave_master = get_domain_slave_master($_GET["id"]);
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    50
		if(supermaster_exists($slave_master))
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    51
		{
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    52
			print ("<font class=\"warning\">");
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    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);
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    54
			print ("</font><br>");
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    55
		}
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    56
	}
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    57
	?>
71
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    58
	<font class="warning"><?php echo _('Are you sure?'); ?></font>
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 3
diff changeset
    59
	<br><br>
71
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    60
	<input type="button" class="button" OnClick="location.href='<?php echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<?php echo _('Yes'); ?>">
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    61
	<input type="button" class="button" OnClick="location.href='<?php echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<?php echo _('No'); ?>">
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    62
	<?php
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    63
} elseif ($_GET["edit"]) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    64
        include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    65
} else {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    66
        include_once("inc/header.inc.php");
48
2b8781fd2e49 [feladat @ 95]
rejo
parents: 47
diff changeset
    67
        echo _('Nothing to do!');
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    68
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    69
include_once("inc/footer.inc.php");