delete_record.php
changeset 13 2ff220cfde13
parent 2 9a485c41cfcf
child 37 b785e54690ce
equal deleted inserted replaced
12:7be4525290cc 13:2ff220cfde13
     1 <?php
     1 <?php
     2 
       
     3 // +--------------------------------------------------------------------+
       
     4 // | PowerAdmin								|
       
     5 // +--------------------------------------------------------------------+
       
     6 // | Copyright (c) 1997-2002 The PowerAdmin Team			|
       
     7 // +--------------------------------------------------------------------+
       
     8 // | This source file is subject to the license carried by the overal	|
       
     9 // | program PowerAdmin as found on http://poweradmin.sf.net		|
       
    10 // | The PowerAdmin program falls under the QPL License:		|
       
    11 // | http://www.trolltech.com/developer/licensing/qpl.html		|
       
    12 // +--------------------------------------------------------------------+
       
    13 // | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl>	|
       
    14 // |          Sjeemz <sjeemz <AT> sjeemz <DOT> nl>			|
       
    15 // +--------------------------------------------------------------------+
       
    16 
       
    17 //
       
    18 // $Id: delete_record.php,v 1.5 2002/12/10 01:29:47 azurazu Exp $
       
    19 //
       
    20 
     2 
    21 require_once("inc/toolkit.inc.php");
     3 require_once("inc/toolkit.inc.php");
    22 
     4 
    23 if ($_GET["id"]) {
     5 if ($_GET["id"]) {
    24         if ($_GET["confirm"] == '0') {
     6         if ($_GET["confirm"] == '0') {
    26         } elseif ($_GET["confirm"] == '1') {
     8         } elseif ($_GET["confirm"] == '1') {
    27                 delete_record($_GET["id"]);
     9                 delete_record($_GET["id"]);
    28                 clean_page("edit.php?id=".$_GET["domain"]);
    10                 clean_page("edit.php?id=".$_GET["domain"]);
    29         }
    11         }
    30         include_once("inc/header.inc.php");
    12         include_once("inc/header.inc.php");
    31         ?><H2><? echo _('Delete record'); ?> "<?
    13         ?>
       
    14 	
       
    15 	<h2><? echo _('Delete record'); ?> "<?
    32         $data = get_record_from_id($_GET["id"]);
    16         $data = get_record_from_id($_GET["id"]);
    33         print $data["name"]." IN ".$data["type"]." ".$data["content"];
    17         print $data["name"]." IN ".$data["type"]." ".$data["content"];
    34         ?>"</H2><?
    18         ?>"</h2><?
    35         if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") {
    19         if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") {
    36                 print "<FONT CLASS=\"warning\">" . ('You are trying to delete a record that is needed for this zone to work.') . "</FONT><BR>";
    20                 print "<font class=\"warning\">" . _('You are trying to delete a record that is needed for this zone to work.') . "</font><br>";
    37         }
    21         }
    38         ?><BR><FONT CLASS="warning"><? echo _('Are you sure?'); ?></FONT><BR><BR>
    22         ?><br><font class="warning"><? echo _('Are you sure?'); ?></font><br><br>
    39         <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=1'" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=0'" VALUE="<? echo _('No'); ?>">
    23         <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<? echo _('Yes'); ?>"> 
       
    24 	<input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<? echo _('No'); ?>">
    40         <?
    25         <?
    41 } else {
    26 } else {
    42         include_once("inc/header.inc.php");
    27         include_once("inc/header.inc.php");
    43         die("Nothing to do!");
    28         die("Nothing to do!");
    44 }
    29 }