Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
aws_list.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: List awstats statistics and manage them.
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 include_once("head.php");
27 ?>
28 
29 <h3><?php __("Statistics List"); ?></h3>
30 <hr id="topbar"/>
31 <br />
32 <?php if (!empty($error)) { echo "<p class=\"error\">$error</p>"; $error=''; } ?>
33 <p>
34 <?php
35 
36 $nosta=false;
37 if (!$r=$aws->get_list()) {
38  $error=$err->errstr();
39  $nosta=true;
40 }
41 
42 if (!empty($error)) { echo "<p class=\"error\">$error</p>"; $error=''; }
43 ?>
44 
45 <span class="ina"><a href="aws_users.php"><?php __("Manage allowed users' accounts"); ?></a></span><br /><br />
46 
47 <?php
48 if ($quota->cancreate("aws")) { ?>
49  <span class="ina"><a href="aws_add.php"><?php __("Create new Statistics"); ?></a></span><br />
50 <?php } // cancreate ?>
51 </p>
52 
53 <?php if (!$nosta) { ?>
54 
55 <form method="post" action="aws_del.php">
56 <table cellspacing="0" cellpadding="4">
57  <tr><th colspan="2"><?php __("Action"); ?></th><th><?php __("Domain name"); ?></th><th><?php __("Allowed Users"); ?></th><th><?php __("View the statistics"); ?></th></tr>
58 <?php
59 reset($r);
60 $col=1;
61 while (list($key,$val)=each($r)) {
62  $col=3-$col;
63 ?>
64  <tr class="lst<?php echo $col; ?>">
65  <td><input type="checkbox" class="inc" id="del_<?php echo $val["id"]; ?>" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td>
66  <td><div class="ina"><a href="aws_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" title="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
67  <td class='retour-auto'><label for="del_<?php echo $val["id"]; ?>" ><?php echo $val["hostname"] ?></label></td>
68  <td><?php echo $val["users"] ?></td>
69  <td><div class="ina"><a href="/cgi-bin/awstats.pl?config=<?php echo $val["hostname"]; ?>" target="_blank" ><img src="images/stat.png" alt="<?php __("View the statistics"); ?>" /><?php __("View the statistics"); ?></a></div></td>
70  </tr>
71 <?php } // while ?>
72 
73 <tr><td colspan="5"><input type="submit" class="inb" name="submit" onClick='return confirm("<?php __("Are you sure you want to delete the selected statistics?");?>");' value="<?php __("Delete the checked Statistics"); ?>" /></td></tr>
74 </table>
75 </form>
76 <?php
77 } // if !nosta
78 
79 include_once("foot.php");
80 ?>