Alternc  latest
Alternc logiel libre pour l'hébergement
dom_subdel.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  * Form to confirm the deletion of a subdomain
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  "sub_domain_id" => array ("request", "integer", ""),
31 );
33 
34 $dom->lock();
35 $r=$dom->get_sub_domain_all($sub_domain_id);
36 $dom->unlock();
37 
38 $dt=$dom->domains_type_lst();
39 if (!$isinvited && $dt[strtolower($r['type'])]["enable"] != "ALL" ) {
40  $msg->raise("ERROR", "dom", _("This page is restricted to authorized staff"));
41  echo $msg->msg_html_all();
42  exit();
43 }
44 
45 ?>
46 <h3><?php printf(_("Deleting subdomain %s"),ife($r['name'],$r['name'].".").$r['domain']); ?> : </h3>
47 <?php
48 if ($msg->has_msgs("ERROR")) {
49  echo $msg->msg_html_all();
50  include_once("foot.php");
51  exit();
52 }
53 ?>
54 <hr id="topbar"/>
55 <br />
56 <form action="dom_subdodel.php" method="post">
57  <?php csrf_get(); ?>
58  <p class="alert alert-warning">
59  <input type="hidden" name="sub_domain_id" value="<?php ehe($sub_domain_id); ?>" />
60  <?php __("WARNING : You are going to delete a sub-domain."); ?></p>
61  <p><?php
62  __("Informations about the subdomain you're going to delete:");
63  echo "<ul>";
64  echo "<li>"._("Entry:")." ".( empty($r['name'])?'':$r['name'].".").$r['domain']."</li>";
65  echo "<li>"._("Type:")." "._($r['type_desc'])."</li>";
66  if (!empty($r['dest'])) {
67  echo "<li>"._("Value:")." "._($r['dest'])."</li>";
68  }
69  echo "</ul>";
70  echo "<br/>";
71  __("Do you really want to delete it?");
72  ?>
73  </p>
74  <blockquote>
75  <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp;
76  <span class="ina"><a href="dom_edit.php?domain=<?php echo urlencode($r['domain']) ?>"><?php __("No"); ?></a></span></p>
77  </blockquote>
78 </form>
79 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$isinvited
Definition: config.php:204
$dt
Definition: dom_subdel.php:38
$r
Definition: dom_subdel.php:35
$fields
Form to confirm the deletion of a subdomain.
Definition: dom_subdel.php:29
ife($test, $tr, $fa="")
Definition: functions.php:416
__($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