Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
aws_users.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 accounts of the user.
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 include_once("head.php");
27 
28 ?>
29 <h3><?php __("Awstats allowed user list"); ?></h3>
30 <hr id="topbar"/>
31 <br />
32 <?php
33 
34 if (isset($error) && $error) { ?>
35 <p class="error"><?php echo $error; $error=''; ?></p>
36 <?php }
37 
38 $nologin=false;
39 if (!$r=$aws->list_login()) {
40  $nologin=true;
41  $error=$err->errstr();
42 }
43 
44  if ($quota->cancreate("aws")) { ?>
45 <p><span class="ina"><a href="aws_add.php"><?php __("Create new Statistics"); ?></a></span></p>
46 <?php } ?>
47 
48 <form method="post" action="aws_useradd.php" name="main">
49 <table class="tedit">
50 <tr><th>
51 <label for="login"><?php __("Username"); ?></label></th><td>
52  <select class="inl" name="prefixe"><?php $aws->select_prefix_list($prefixe); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" />
53 </td></tr>
54 <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#pass","#passconf"); ?></td></tr>
55 <tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="64" /></td></tr>
56 <tr class="trbtn"><td colspan="2">
57  <input type="submit" class="inb" name="submit" value="<?php __("Create this new Awstats user"); ?>" />
58  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='aws_list.php'"/>
59 
60 </td></tr>
61 </table>
62 </form>
63 <br />
64 <?php
65 
66 
67 if (isset($error) && $error) {
68 ?>
69 <p class="error"><?php echo $error ?></p>
70 <?php }
71 
72 if (!$nologin) {
73 ?>
74 
75 
76 <form method="post" action="aws_userdel.php" name="main2" id="main2">
77 <table class="tlist">
78  <tr><th colspan="2"><?php __("Action"); ?></th><th><?php __("Username"); ?></th></tr>
79 <?php
80 $col=1;
81 foreach ($r as $val) {
82  $col=3-$col;
83 ?>
84  <tr class="lst<?php echo $col; ?>">
85  <td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val; ?>" name="del_<?php echo $val; ?>" value="<?php echo $val; ?>" /></td>
86  <td><span class="ina"><a href="aws_pass.php?login=<?php echo $val ?>"><?php __("Change password"); ?></a></span></td>
87  <td><label for="del_<?php echo $val; ?>"><?php echo $val ?></label></td>
88  </tr>
89 <?php
90  }
91 ?>
92 <tr><td colspan="5"><input type="submit" name="submit" class="inb" onClick='return confirm("<?php __("Are you sure you want to delete the selected accounts?");?>");' value="<?php __("Delete checked accounts"); ?>" /></td></tr>
93 </table>
94 </form>
95 
96 
97 <?php
98  }
99 ?>
100 <script type="text/javascript">
101 document.forms['main'].login.focus();
102 document.forms['main'].setAttribute('autocomplete', 'off');
103 </script>
104 
105 <?php include_once("foot.php"); ?>