Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
dom_substatus.php
Go to the documentation of this file.
1 <?php
2 require_once("../class/config.php");
3 
4 $fields = array (
5  "sub_id" => array ("request", "integer", ""),
6  "status" => array ("request", "string", ""),
7 );
9 
10 $dom->lock();
11 
12 $r=$dom->sub_domain_change_status($sub_id,$status);
13 
14 # Usefull for dom_edit
15 $domi = $dom->get_sub_domain_all($sub_id);
16 $domain=$domi['domain'];
17 $sub=$domi['name'];
18 
19 $dom->unlock();
20 
21 if (!$r) {
22  $error=$err->errstr();
23  $noread=true;
24  include("dom_edit.php");
25  exit();
26 } else {
27  $t = time();
28  // XXX: we assume the cron job is at every 5 minutes
29  $error=strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => date('H:i:s', $t), '%time' => date('H:i:s', ($t-($t%300)+300))));
30  foreach($fields as $k=>$v) unset($k);
31 }
32 include("dom_edit.php");
33 exit;
34 
35 ?>