9086c9ad77db90633e0629e9e86a88366265ded0
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 Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) */
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

16) 
17) include('ftpusers.php');
18) 
19) require_once('inc/base.php');
bernd Nur eingeloggten user sollt...

bernd authored 14 years ago

20) require_role(ROLE_SYSTEMUSER);
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

21) 
22) $section='ftpusers_accounts';
23) 
24) $ftpuser = empty_ftpuser();
25) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

26) if (isset($_GET['id'])) {
27)     $ftpuser = load_ftpuser($_GET['id']);
28) }
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

29) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

30) if ($ftpuser['username']) {
31)     title('Ändern des FTP-Benutzers');
32) } else {
33)     title('Neuer FTP-Zugang');
34)     output('<p style="border: 2px solid red; padding: 1em; padding-left: 4em;"><img src="'.$prefix.'images/warning.png" style="margin-left: -3em; float: left;" /><strong>Bitte beachten Sie:</strong> Ein FTP-Benutzer kann nur im hier angegebenen Verzeichnis (und dallen darin enthaltenen Verzeichnissen) Dateien erstellen oder ändern. Sofern der Benutzer allerdings die Möglichkeit hat, PHP- oder CGI-Programme zu installieren und über den Webserver aufzurufen, kann er damit auch außerhalb dieses Verzeichnisses agieren. Schalten Sie bitte ggf. die PHP- und CGI-Unterstützung für die betreffende Website aus.</p>');
bernd big fat warning zur Sicherh...

bernd authored 14 years ago

35) }
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

36) 
37) $username = substr($ftpuser['username'], strlen($_SESSION['userinfo']['username'])+1);
38) 
39) $user_home = $_SESSION['userinfo']['homedir'];
40) $homedir = substr($ftpuser['homedir'], strlen($user_home)+1);
41) DEBUG($user_home.' / '.$homedir.' / '.$ftpuser['homedir']);
42) 
bernd Erlaube unverschlüsselte FT...

bernd authored 12 years ago

43) $active = ($ftpuser['active'] == 1 ? 'checked="checked" ' : '');
44) $forcessl = ($ftpuser['forcessl'] == 1 ? 'checked="checked" ' : '');
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

45) 
46) $servers = server_names();
47) $available_servers = array_merge(array(my_server_id()), additional_servers());
48) 
49) $whichserver = '<strong>'.$servers[my_server_id()].'</strong>';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

50) if (count($available_servers) > 1) {
51)     $serverselect = array();
52)     foreach ($available_servers as $s) {
53)         $serverselect[$s] = $servers[$s];
54)     }
55)     $whichserver = html_select('server', $serverselect, $ftpuser['server']);
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

56) }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

57) 
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

58) 
59) 
60) output(html_form('ftpusers_edit', 'save', 'id='.$ftpuser['id'], '
61)   <table style="margin-bottom: 1em;">
62)   <tr>
63)     <td>Benutzername:</td>
64)     <td><strong>'.$_SESSION['userinfo']['username'].'-</strong><input type="text" name="ftpusername" id="ftpusername" value="'.$username.'" /></td>
65)   </tr>
66)   <tr>
67)     <td>Verzeichnis:</td>
68)     <td><strong>'.$user_home.'/</strong><input type="text" id="homedir" name="homedir" value="'.$homedir.'" /></td>
69)   </tr>
70)   <tr>
71)     <td>Passwort:</td>
72)     <td><input type="password" id="password" name="password" value="" /></td>
73)   </tr>
74)   <tr>
75)     <td>Zugang aktivieren:</td>
bernd Erlaube unverschlüsselte FT...

bernd authored 12 years ago

76)     <td><input type="checkbox" id="active" name="active" value="1" '.$active.'/> auf Server '.$whichserver.'<br/><input type="checkbox" id="forcessl" name="forcessl" value="1" '.$forcessl.'/>&#160;<label for="forcessl">SSL-Verschlüsselung erforderlich<sup>*</sup></label></td>
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

77)   </tr>
78)   </table>
79)   <p><input type="submit" name="save" value="Speichern" /></p>
bernd Erlaube unverschlüsselte FT...

bernd authored 12 years ago

80)   
bernd Typo

bernd authored 12 years ago

81)   <p><sup>*</sup>) Wenn die Verschlüsselung nicht erforderlich ist, können Sie mit diesen Zugangsdaten eine ungesicherte Verbindung auf TCP-Port 1021 aufbauen. Auf dem Standard-Port 21 wird grundsätzlich eine Verschlüsselung benötigt.</p>