5effc2bd7685822df276c1372dab480cff321941
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 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) 
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

17) include('ftpusers.php');
18) 
19) require_role(ROLE_SYSTEMUSER);
20) 
bernd Security-enhancements und a...

bernd authored 14 years ago

21) if (isset($_GET['regular_ftp']))
22) {
23)   check_form_token('regular_ftp', $_REQUEST['token']);
Bernd Wurst Sicherheitsabfrage beim Akt...

Bernd Wurst authored 10 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)     {
bernd Security-enhancements und a...

bernd authored 14 years ago

33)     enable_regular_ftp();
Bernd Wurst Sicherheitsabfrage beim Akt...

Bernd Wurst authored 10 years ago

34)     }
35)   }
bernd Security-enhancements und a...

bernd authored 14 years ago

36)   else
37)     disable_regular_ftp();
38)   redirect('accounts'); 
39) }
40) 
41) 
bernd Verwaltung von FTP-Accounts...

bernd authored 14 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) 
bernd Erlaube unverschlüsselte FT...

bernd authored 12 years ago

76) if (isset($_REQUEST['forcessl']))
77)   $ftpuser['forcessl'] = $_REQUEST['forcessl'];
78) else
79)   $ftpuser['forcessl'] = 0;
80)