Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
1) <?php
|
Added license tags for CC0,...
Bernd Wurst authored 13 years ago
|
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4)
|
Lizenzinfos in eigenes Modu...
Bernd Wurst authored 11 years ago
|
5) Written 2008-2014 by schokokeks.org Hosting, namely
|
Added license tags for CC0,...
Bernd Wurst authored 13 years ago
|
6) Bernd Wurst <bernd@schokokeks.org>
7) Hanno Böck <hanno@schokokeks.org>
8)
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10)
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12) http://creativecommons.org/publicdomain/zero/1.0/
13)
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
16)
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
17) include('ftpusers.php');
18)
19) require_role(ROLE_SYSTEMUSER);
20)
|
Security-enhancements und a...
bernd authored 15 years ago
|
21) if (isset($_GET['regular_ftp']))
22) {
23) check_form_token('regular_ftp', $_REQUEST['token']);
|
Sicherheitsabfrage beim Akt...
Bernd Wurst authored 11 years ago
|
24) if ($_GET['regular_ftp'] == 'yes') {
25) $sure = user_is_sure();
26) if ($sure === NULL)
27) {
28) are_you_sure("regular_ftp=yes&token=".$_REQUEST['token'], "Benötigen Sie wirklich klassischen FTP-Zugriff für Ihren Benutzeraccount? Lesen Sie die Hinweise in unserem Wiki falls Sie sich nicht sicher sind.");
29) return;
30) }
31) elseif ($sure === true)
32) {
|
Security-enhancements und a...
bernd authored 15 years ago
|
33) enable_regular_ftp();
|
Sicherheitsabfrage beim Akt...
Bernd Wurst authored 11 years ago
|
34) }
35) }
|
Security-enhancements und a...
bernd authored 15 years ago
|
36) else
37) disable_regular_ftp();
38) redirect('accounts');
39) }
40)
41)
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
42) if (isset($_GET['delete']))
43) {
44) $ftpuser = load_ftpuser($_GET['delete']);
45)
46) $sure = user_is_sure();
47) if ($sure === NULL)
48) {
49) are_you_sure("delete={$ftpuser['id']}", "Möchten Sie den FTP-Zugang »{$ftpuser['username']}« wirklich löschen?");
50) return;
51) }
52) elseif ($sure === true)
53) {
54) delete_ftpuser($ftpuser['id']);
55) }
56) redirect('accounts');
57) }
58)
59) $ftpuser = empty_ftpuser();
60)
61) if (isset($_GET['id']))
62) {
63) check_form_token('ftpusers_edit');
64) $ftpuser = load_ftpuser($_GET['id']);
65) }
66)
67)
68) $ftpuser['username'] = $_REQUEST['ftpusername'];
69) $ftpuser['password'] = $_REQUEST['password'];
70) $ftpuser['homedir'] = $_REQUEST['homedir'];
71) if (isset($_REQUEST['active']))
72) $ftpuser['active'] = $_REQUEST['active'];
73) else
74) $ftpuser['active'] = 0;
75)
|
Erlaube unverschlüsselte FT...
bernd authored 13 years ago
|
76) if (isset($_REQUEST['forcessl']))
77) $ftpuser['forcessl'] = $_REQUEST['forcessl'];
78) else
79) $ftpuser['forcessl'] = 0;
80)
|