delete_supermaster.php
author peter
Mon, 10 Mar 2008 19:15:59 +0000
changeset 79 0c0aa144356a
parent 71 e1b918eaf69a
child 82 c255196bc447
permissions -rw-r--r--
[feladat @ 156] Made a lot of small changes to allow PHP to run with error_reporting E_ALL without giving notices. Most functions have been checked but some situations might give a notice.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
     1
<?php
2ff220cfde13 [feladat @ 60]
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
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    22
require_once("inc/toolkit.inc.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    23
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    24
if (!level(5))
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    25
{
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    26
        error(ERR_LEVEL_5);
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    27
        
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    28
}
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    29
79
0c0aa144356a [feladat @ 156]
peter
parents: 71
diff changeset
    30
if (isset($_GET["master_ip"])) {
0c0aa144356a [feladat @ 156]
peter
parents: 71
diff changeset
    31
        if ((isset($_GET['confirm'])) && ($_GET["confirm"] == '0')) {
13
2ff220cfde13 [feladat @ 60]
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')) {
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    34
                delete_supermaster($_GET["master_ip"]);
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    35
                clean_page("index.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    36
        }
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    37
        include_once("inc/header.inc.php");
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    38
	$info = get_supermaster_info_from_ip($_GET["master_ip"]);
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    39
        ?>
71
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    40
	<h2><?php echo _('Delete supermaster'); ?> "<?php echo $_GET["master_ip"] ?>"</h2>
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    41
	<?php echo _('Hostname in NS record'); ?>: <?php echo $info["ns_name"] ?><br>
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    42
	<?php echo _('Account'); ?>: <?php echo $info["account"] ?><br><br>
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    43
        <font class="warning"><?php echo _('Are you sure?'); ?></font><br><br>
e1b918eaf69a [feladat @ 118]
peter
parents: 48
diff changeset
    44
        <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
    45
	<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
    46
        <?php
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    47
} else {
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    48
        include_once("inc/header.inc.php");
48
2b8781fd2e49 [feladat @ 95]
rejo
parents: 47
diff changeset
    49
        echo _('Nothing to do!');
13
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    50
}
2ff220cfde13 [feladat @ 60]
rejo
parents:
diff changeset
    51
include_once("inc/footer.inc.php");