Alternc  latest
Alternc logiel libre pour l'hébergement
dom_dodel.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Delete a domain, confirm the deletion
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 include_once("head.php");
28 
29 $fields = array (
30  "domain" => array ("request", "string", ""),
31  "del_confirm" => array ("post", "string", ""),
32  "del_cancel" => array ("post", "string", ""),
33 );
35 
36 if ($del_confirm=="y") {
37  if (!$dom->del_domain($domain)) {
38  include("dom_edit.php");
39  exit();
40  }
41 }
42 
43 if (! empty($del_cancel)) {
44  $dom->lock();
45  $dom->del_domain_cancel($domain);
46  $dom->unlock();
47 
48  // The link to this function is disable : the del_domain_cancel function need some modification
49  $msg->raise("INFO", "dom", _("Deletion have been successfully cancelled"));
50  echo $msg->msg_html_all();
51 ?>
52  <p>
53  <span class="ina"><a href="main.php" target="_parent"><?php __("Click here to continue"); ?></a></span>
54  </p>
55  <?php
56  exit();
57 }
58 if ($del_confirm!="y") {
59 
60 ?>
61 <h3><?php printf(_("Confirm the deletion of domain %s"),$domain); ?></h3>
62 <hr id="topbar"/>
63 <br />
64 <p class="alert alert-warning"><?php __("WARNING"); ?><br /><?php printf(_("Confirm the deletion of domain %s"),$domain); ?><br />
65 
66 <?php __("This will delete the related sub-domains too."); ?></p>
67 <form method="post" action="dom_dodel.php" id="main">
68  <?php csrf_get(); ?>
69 <p>
70 <input type="hidden" name="del_confirm" value="y" />
71 <input type="hidden" name="domain" value="<?php ehe($domain); ?>" />
72  <input type="submit" class="inb ok" name="submit" value="<?php __("Yes, delete this domain name"); ?>" />
73  <input type="button" class="inb cancel" name="non" value="<?php __("No, don't delete this domain name"); ?>" onclick="history.back()" />
74 </form>
75 <?php include_once("foot.php");
76  exit();
77 }
78 ?>
79 <h3><?php printf(_("Domain %s deleted"),$domain); ?></h3>
80 <hr id="topbar"/>
81 <br />
82 <?php
83 $msg->raise("INFO", "dom", _("The domain %s has been successfully deleted."),$domain);
84 echo $msg->msg_html_all();
85 ?>
86 </p>
87 <span class="ina"><a href="main.php" target="_parent"><?php __("Click here to continue"); ?></a></span>
88 <?php $mem->show_help("del_domain"); ?>
89 </p>
90 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$fields
Delete a domain, confirm the deletion.
Definition: dom_dodel.php:29
$domain
Definition: dom_import.php:36
__($str)
Definition: functions.php:404
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159
$dom
Definition: whois_test.php:10