Alternc
3.2
Alternc logiel libre pour l'hébergement
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
hta_edit.php
Go to the documentation of this file.
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
*/
30
require_once(
"../class/config.php"
);
31
include_once(
"head.php"
);
32
33
$fields
= array (
34
"dir"
=> array (
"request"
,
"string"
,
""
),
35
);
36
getFields
(
$fields
);
37
38
if
(!$dir) {
39
$error
=_(
"No folder selected!"
);
40
}
else
{
41
$r
=$hta->get_hta_detail($dir);
42
if
(!
$r
) {
43
$error
=
$err
->errstr();
44
}
45
}
// if !$dir
46
47
?>
48
<h3><?php printf(_(
"List of authorized user in folder %s"
),$dir); ?></h3>
49
<hr
id
=
"topbar"
/>
50
<br />
51
<?php
52
if
(!count(
$r
)) {
53
echo
"<p class=\"alert alert-warning\">"
.sprintf(_(
"No authorized user in %s"
),$dir).
"</p>"
;
54
}
else
{
55
reset(
$r
);
56
?>
57
<form method=
"post"
action=
"hta_dodeluser.php"
>
58
<table cellspacing=
"0"
cellpadding=
"4"
class
=
'tlist'
>
59
<tr>
60
<th colspan=
"2"
><input type=
"hidden"
name=
"dir"
value=
"<?php echo $dir?>"
> </th>
61
<th><?php
__
(
"Username"
); ?></th>
62
</tr>
63
<?php
64
for
(
$i
=0;
$i
<count(
$r
);
$i
++){ ?>
65
<tr
class
=
"lst"
>
66
<td align=
"center"
><input type=
"checkbox"
class
=
"inc"
name=
"d[]"
value=
"<?php echo $r[$i]?>"
/></td>
67
<td>
68
<div
class
=
"ina"
><a href=
"hta_edituser.php?user=<?php echo urlencode($r[$i])?>&dir=<?php echo urlencode($dir); ?>"
><img src=
"icon/encrypted.png"
alt=
"<?php __("
Change
this
user
's password"); ?>" /><?php __("Change this user'
s password
"); ?></a></div>
69
</td>
70
<td><?php echo $r[$i]; ?></td>
71
</tr>
72
<?php
73
} // for $i
74
?>
75
</table>
76
77
<br />
78
<input type="
submit
" class="
inb
" name="
submit
" value="
<?php
__
(
"Delete the checked users"
); ?>
" />
79
</form>
80
81
<?php } // else !count $r ?>
82
<p>
83
<span class="
inb
"><a href="
bro_main.php?R=<?php echo $dir ?>
"><?php __("
Show
this
folder
's content in the File Browser"); ?></a></span>
84
</p>
85
86
<p> </p>
87
88
<fieldset>
89
<legend><h3><?php __("Adding an authorized user"); ?></h3></legend>
90
91
<form method="post" action="hta_doadduser.php" name="main" id="main">
92
<table class="tedit">
93
<tr>
94
<th><input type="hidden" name="dir" value="<?php echo $dir ?>" /><?php __("Folder"); ?></th>
95
<td><?php echo '
<a href=
"bro_main.php?R='.urlencode($dir).'"
>
'.htmlspecialchars($dir).'
</a>
'; ?></td>
96
</tr>
97
<tr>
98
<th><label for="user"><?php __("Username"); ?></label></th>
99
<td><input type="text" class="int" name="user" id="user" value="" size="20" maxlength="64" /></td>
100
</tr>
101
<tr>
102
<th><label for="password"><?php __("Password"); ?></label></th>
103
<td><input type="password" class="int" name="password" id="password" value="" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#password","#passwordconf"); ?></td>
104
</tr>
105
<tr>
106
<th><label for="passwordconf"><?php __("Confirm password"); ?></label></th>
107
<td><input type="password" class="int" name="passwordconf" id="passwordconf" value="" size="20" maxlength="64" /></td>
108
</tr>
109
</table>
110
111
<br />
112
<input type="submit" class="inb ok" value="<?php __("Add this user"); ?>" />
113
<input type="button" class="inb cancel" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='
hta_list.php
';"/>
114
</form>
115
</fieldset>
116
117
<script type="text/javascript">
118
document.forms['
main
'].user.focus();
119
document.forms['
main
'].setAttribute('
autocomplete
', '
off
');
120
</script>
121
122
<?php include_once("foot.php"); ?>
code
alternc
bureau
admin
hta_edit.php
Generated on Mon Mar 24 2014 17:14:20 for Alternc by
1.8.1.2