Alternc  latest
Alternc logiel libre pour l'hébergement
dom_subdodel.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  * After confirmation of a subdomain deletion, do it here.
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 ("post", "integer", ""),
31 );
33 
34 $dom->lock();
35 $r=$dom->get_sub_domain_all($sub_domain_id);
36 $dt=$dom->domains_type_lst();
37 $dom->unlock();
38 
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 $dom->lock();
47 $r=$dom->get_sub_domain_all($sub_domain_id);
48 $dom->del_sub_domain($sub_domain_id);
49 $dom->unlock();
50 
51 ?>
52 <h3><?php echo sprintf(_("Deleting the subdomain %s:"),(($r['name'])?$r['name'].".":$r['name']).$r['domain']); ?></h3>
53 <hr id="topbar"/>
54 <br />
55 <?php
56  if ($msg->has_msgs("ERROR")) {
57  echo $msg->msg_html_all();
58  include_once("foot.php");
59  exit();
60  } else {
61  $t = time();
62  // TODO: we assume the cron job is at every 5 minutes
63  $msg->raise("INFO", "dom", _("The modifications will take effect at %s. Server time is %s."), array(date('H:i:s', ($t-($t%300)+300)), date('H:i:s', $t)));
64  echo $msg->msg_html_all();
65  }
66 ?>
67 <p><span class="ina"><a href="dom_edit.php?domain=<?php echo urlencode($r['domain']) ?>"><?php __("Click here to continue"); ?></a></span></p>
68 <?php include_once("foot.php"); ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$isinvited
Definition: config.php:204
$dt
$r
$fields
After confirmation of a subdomain deletion, do it here.
__($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
foreach($domaines_user as $domaine) $t
$dom
Definition: whois_test.php:10