Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
dom_dodel.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: dom_dodel.php,v 1.3 2003/06/10 11:18:27 root Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Delete a domain, confirm the deletion
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 $fields = array (
34  "domain" => array ("request", "string", ""),
35  "del_confirm" => array ("post", "string", ""),
36  "del_cancel" => array ("request", "string", ""),
37 );
39 
40 $dom->lock();
41 if ($del_confirm=="y")
42  if (!$dom->del_domain($domain)) {
43  $error=$err->errstr();
44  include("dom_edit.php");
45  $dom->unlock();
46  exit();
47  }
48 
49 $dom->unlock();
50 
51 if (! empty($del_cancel)) {
52  $dom->del_domain_cancel($domain);
53  // The link to this function is disable : the del_domain_cancel function need some modification
54  __("Deletion have been successfully cancelled");?><br/>
55  <p>
56  <span class="ina"><a href="main.php" target="_parent"><?php __("Click here to continue"); ?></a></span>
57  </p>
58  <?php
59  exit();
60 }
61 if ($del_confirm!="y") {
62 
63 ?>
64 <h3><?php printf(_("Confirm the deletion of domain %s"),$domain); ?></h3>
65 <hr id="topbar"/>
66 <br />
67 <p class="alert alert-warning"><?php __("WARNING"); ?><br /><?php printf(_("Confirm the deletion of domain %s"),$domain); ?><br />
68 
69 <?php __("This will delete the related sub-domains too."); ?></p>
70 <form method="post" action="dom_dodel.php" id="main">
71 <p>
72 <input type="hidden" name="del_confirm" value="y" />
73 <input type="hidden" name="domain" value="<?php echo $domain ?>" />
74  <input type="submit" class="inb ok" name="submit" value="<?php __("Yes, delete this domain name"); ?>" />
75  <input type="button" class="inb cancel" name="non" value="<?php __("No, don't delete this domain name"); ?>" onclick="history.back()" />
76 </form>
77 <?php include_once("foot.php");
78  exit();
79  }
80 ?>
81 <h3><?php printf(_("Domain %s deleted"),$domain); ?></h3>
82 <hr id="topbar"/>
83 <br />
84 <p>
85 <?php printf(_("The domain %s has been successfully deleted."),$domain); ?><br /><br />
86 <span class="ina"><a href="main.php" target="_parent"><?php __("Click here to continue"); ?></a></span>
87 <?php $mem->show_help("del_domain"); ?>
88 </p>
89 <?php include_once("foot.php"); ?>