Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
aws_del.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: Delete requested awstats statistics.
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 
27 $error="";
28 // On parcours les POST_VARS et on repere les del_.
29 reset($_POST);
30 $found=false;
31 while (list($key,$val)=each($_POST)) {
32  if (substr($key,0,4)=="del_") {
33  // Effacement du jeu de stats $val
34  $r=$aws->delete_stats($val);
35  $found=true;
36  if (!$r) {
37  $error.=$err->errstr()."<br />";
38  } else {
39  $error.=sprintf(_("The statistics %s has been successfully deleted"),$r)."<br />";
40  }
41  }
42 }
43 
44 if (!$found) {
45  $error.=_("Please check the statistics set you want to delete");
46  }
47 
48 include("aws_list.php");
49 exit();
50 
51 ?>