Alternc  latest
Alternc logiel libre pour l'hébergement
aws_doedit.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  AlternC - Web Hosting System
5  Copyright (C) 2000-2012 by the AlternC Development Team.
6  https://alternc.org/
7  ----------------------------------------------------------------------
8  LICENSE
9 
10  This program is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License (GPL)
12  as published by the Free Software Foundation; either version 2
13  of the License, or (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  To read the license please visit http://www.gnu.org/copyleft/gpl.html
21  ----------------------------------------------------------------------
22  Purpose of file: Edit a statistic set
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 
27 $fields = array (
28  "id" => array ("request", "integer", 0),
29  "awsusers" => array ("post", "array", ""),
30  "hostaliases" => array ("post", "array", ""),
31  "public" => array ("post", "integer", "")
32 );
34 
35 if (!$id) {
36  $msg->raise('Error', "aws", _("No Statistics selected!"));
37 } else {
38  $ha ="";
39  foreach($hostaliases as $ho)
40  $ha .= "$ho ";
41 
42  $r=$aws->put_stats_details($id,$awsusers,$ha,$public);
43  if (!$r) {
44  include("aws_edit.php");
45  exit();
46  } else {
47  $msg->raise('INFO', "aws", _("The Statistics has been successfully changed"));
48  include("aws_list.php");
49  exit();
50  }
51 }
52 ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$r
Definition: aws_doedit.php:42
$fields
Definition: aws_doedit.php:27
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
if(!isset($is_include)) if(! $key &&! $crt) $id