diff -r c72d6d51f3d3 -r c255196bc447 delete_supermaster.php --- a/delete_supermaster.php Wed Mar 12 20:45:56 2008 +0000 +++ b/delete_supermaster.php Tue Mar 25 22:45:31 2008 +0000 @@ -20,32 +20,43 @@ */ require_once("inc/toolkit.inc.php"); +include_once("inc/header.inc.php"); -if (!level(5)) -{ - error(ERR_LEVEL_5); - +$master_ip = "-1" +if (isset($_GET['master_ip']) && (is_valid_ip($_GET['master_ip']) || is_valid_ip6($_GET['master_ip']))) { + $master_ip = $_GET['master_ip']; +} + +$confirm = "-1"; +if ((isset($_GET['confirm']) && v_num($_GET['confirm']) + $confirm = $_GET['confirm']; } -if (isset($_GET["master_ip"])) { - if ((isset($_GET['confirm'])) && ($_GET["confirm"] == '0')) { - clean_page("index.php"); - } elseif ((isset($_GET["confirm"])) && ($_GET['confirm'] == '1')) { - delete_supermaster($_GET["master_ip"]); - clean_page("index.php"); - } - include_once("inc/header.inc.php"); - $info = get_supermaster_info_from_ip($_GET["master_ip"]); - ?> -

""

- :
- :

-

- &confirm=1'" value=""> - &confirm=0'" value=""> - " . _('Delete supermaster') . " \"" . $master_ip . "\"\n"; + + if ($_GET["confirm"] == '1') { + if (delete_supermaster($master_ip)) { + success(SUC_ZONE_DEL); + } + } else { + echo "

\n"; + echo " " . _('Hostname in NS record') . ": " . $info['ns_name'] . "
\n"; + echo " " . _('Account') . ": " . $info['account'] . "\n"; + echo "

\n"; + echo "

" . _('Are you sure?') . "

\n"; + echo " \n"; + echo " \n"; + } + } } + include_once("inc/footer.inc.php");