Alternc  latest
Alternc logiel libre pour l'hébergement
dom_substatus.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  * Subdomain change status page
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 $fields = array (
29  "sub_id" => array ("get", "integer", ""),
30  "status" => array ("get", "string", ""),
31 );
33 
34 $dom->lock();
35 
36 $r=$dom->sub_domain_change_status($sub_id,$status);
37 
38 # Useful for dom_edit
39 $domi = $dom->get_sub_domain_all($sub_id);
40 $domain=$domi['domain'];
41 $sub=$domi['name'];
42 
43 $dom->unlock();
44 
45 if (!$r) {
46  $noread=true;
47  include("dom_edit.php");
48  exit();
49 } else {
50  $t = time();
51  // TODO: we assume the cron job is at every 5 minutes
52  $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)));
53  foreach($fields as $k=>$v) unset($k);
54 }
55 include("dom_edit.php");
57 
58 ?>
$msg
Definition: bootstrap.php:75
$noread
exit
$sub
$domi
$fields
Subdomain change status page.
$domain
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