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
ftp_del.php
Go to the documentation of this file.
1
<?php
2
/*
3
$Id: ftp_del.php,v 1.2 2003/06/10 06:45:16 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: Benjamin Sonntag
27
Purpose of file: Delete ftp accounts
28
----------------------------------------------------------------------
29
*/
30
require_once(
"../class/config.php"
);
31
32
$error
=
""
;
33
// On parcours les POST_VARS et on repere les del_.
34
reset($_POST);
35
$lst_todel
=array();
36
while
(list(
$key
,
$val
)=each($_POST)) {
37
if
(substr(
$key
,0,4)==
"del_"
) {
38
$lst_todel
[]=
$val
;
39
}
40
}
41
42
if
(empty(
$lst_todel
)) {
43
header (
"Location: /ftp_list.php"
);
44
exit
();
45
}
46
47
$fields
= array (
48
"confirm_del"
=> array (
"post"
,
"string"
,
""
),
49
"names"
=> array (
"post"
,
"array"
,
""
),
50
);
51
getFields
(
$fields
);
52
53
54
if
(!empty($confirm_del)) {
55
foreach
(
$lst_todel
as $v) {
56
$r
=$ftp->delete_ftp($v);
57
if
(!
$r
) {
58
$error
.=
$err
->errstr().
"<br />"
;
59
}
else
{
60
$error
.=sprintf(_(
"The ftp account %s has been successfully deleted"
),
$r
).
"<br />"
;
61
}
62
}
63
include(
"ftp_list.php"
);
64
exit
();
65
}
else
{
66
include_once(
'head.php'
);
67
?>
68
<h3><?php
__
(
"Confirm the FTP accounts deletion"
); ?></h3>
69
<hr
id
=
"topbar"
/>
70
<br />
71
<?php
__
(
"Do you really want to delete those accounts?"
);?>
72
<ul>
73
<?php
foreach
(
$lst_todel
as
$t
) {
74
echo
"<li>"
.$names[
$t
].
"</li>\n"
;
75
} ?>
76
</ul>
77
78
<form method=
"post"
action=
"ftp_del.php"
name=
"main"
id
=
"main"
>
79
<?php
foreach
(
$lst_todel
as $t) {
80
echo
"<input type='hidden' name='del_$t' value='$t' >\n"
;
81
} ?>
82
<input type=
"submit"
class
=
"inb"
name=
"confirm_del"
value=
"<?php __("
Delete
")?>"
/>
83
<input type=
"button"
class
=
"inb"
name=
"cancel"
value=
"<?php __("
Cancel
"); ?>"
onclick=
"document.location='ftp_list.php'"
/>
84
</form>
85
86
<?php
87
include_once(
'foot.php'
);
88
exit
();
89
90
}
91
92
?>
code
alternc
bureau
admin
ftp_del.php
Generated on Mon Mar 24 2014 17:14:20 for Alternc by
1.8.1.2