source: alternc/trunk/bureau/admin/hta_edit.php @ 2677

Revision 2677, 3.9 KB checked in by benjamin, 3 years ago (diff)

dans l'edition des domaines, on a maintenant des formulaires PROPRES ... et l'adresse IP n'est pas preremplie desormais (ca me pourrissait la vie ce truc de xxx.xxx.xxx.xxx)

Line 
1<?php
2/*
3 $Id: hta_edit.php,v 1.4 2003/06/10 13:16:11 root Exp $
4 ----------------------------------------------------------------------
5 AlternC - Web Hosting System
6 Copyright (C) 2002 by the AlternC Development Team.
7 http://alternc.org/
8 ----------------------------------------------------------------------
9 Based on:
10 Valentin Lacambre's web hosting softwares: http://altern.org/
11 ----------------------------------------------------------------------
12 LICENSE
13
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License (GPL)
16 as published by the Free Software Foundation; either version 2
17 of the License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 GNU General Public License for more details.
23
24 To read the license please visit http://www.gnu.org/copyleft/gpl.html
25 ----------------------------------------------------------------------
26 Original Author of file: Franck Missoum, Benjamin Sonntag
27 Purpose of file: Edit a protected folder
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31include_once("head.php");
32
33$fields = array (
34        "dir"      => array ("request", "string", ""),
35);
36getFields($fields);
37
38if (!$dir) {
39        $error=_("No folder selected!");
40} else {
41        $r=$hta->get_hta_detail($dir);
42        if (!$r) {
43                $error=$err->errstr();
44        }
45}
46
47?>
48<h3><?php printf(_("List of authorized user in folder %s"),$dir); ?></h3>
49<?php
50        if (!count($r)) {
51                echo "<p class=\"error\">".sprintf(_("No authorized user in %s"),$dir)."</p>";
52        } else {
53          reset($r);
54         
55?>
56<form method="post" action="hta_dodeluser.php">
57<table cellspacing="0" cellpadding="4">
58        <tr>
59   <th colspan="2" ><input type="hidden" name="dir" value="<?php echo $dir?>"><?php __("Actions"); ?></th>
60                <th><?php __("Username"); ?></th>
61        </tr>
62<?php
63$col=1;
64
65for($i=0;$i<count($r);$i++){
66        $col=3-$col;
67?>
68        <tr class="lst<?php echo $col; ?>">
69                <td align="center"><input type="checkbox" class="inc" name="d[]"" value="<?php echo $r[$i]?>" /></td>
70                <td>
71<div class="ina"><a href="hta_edituser.php?user=<?php echo $r[$i]?>&amp;dir=<?php echo $dir?>"><img src="icon/encrypted.png" alt="<?php __("Change this user's password"); ?>" /><?php __("Change this user's password"); ?></a></div>
72</td>
73                <td><?php echo $r[$i]; ?></td>
74        </tr>
75<?php
76}
77?>
78</table>
79<br />
80<input type="submit" class="inb" name="submit" value="<?php __("Delete the checked users"); ?>" />
81</form>
82
83<?php } ?>
84<p>
85<span class="inb"><a href="bro_main.php?R=<?php echo $dir ?>"><?php __("Show this folder's content in the File Browser"); ?></a></span>
86</p>
87
88<p>&nbsp;</p>
89
90<hr />
91<p><?php __("Adding an authorized user"); ?></p>
92
93<form method="post" action="hta_doadduser.php" name="main" id="main">
94<table class="tedit">
95        <tr>
96                <td><input type="hidden" name="dir" value="<?php echo $dir ?>" /><?php __("Folder"); ?></td>
97                <td><code><?php echo $dir; ?></code></td>
98        </tr>
99        <tr>
100                <td><label for="user"><?php __("Username"); ?></label></td>
101                <td><input type="text" class="int" name="user" id="user" value="" size="20" maxlength="64" /></td>
102        </tr>
103        <tr>
104                <td><label for="password"><?php __("Password"); ?></label></td>
105                <td><input type="password" class="int" name="password" id="password" value="" size="20" maxlength="64" /></td>
106        </tr>
107        <tr>
108                <td><label for="passwordconf"><?php __("Confirm password"); ?></label></td>
109                <td><input type="password" class="int" name="passwordconf" id="passwordconf" value="" size="20" maxlength="64" /></td>
110        </tr>
111</table>
112<br />
113<input type="submit" class="inb" value="<?php __("Add this user"); ?>" />
114</form>
115<script type="text/javascript">
116document.forms['main'].user.focus();
117document.forms['main'].setAttribute('autocomplete', 'off');
118</script>
119
120<?php include_once("foot.php"); ?>
Note: See TracBrowser for help on using the repository browser.