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) */
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
16)
17) include('ftpusers.php');
18)
19) require_once('inc/base.php');
|
Nur eingeloggten user sollt...
bernd authored 15 years ago
|
20) require_role(ROLE_SYSTEMUSER);
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
21)
22) $section='ftpusers_accounts';
23)
24) $ftpuser = empty_ftpuser();
25)
26) if (isset($_GET['id']))
27) $ftpuser = load_ftpuser($_GET['id']);
28)
29) if ($ftpuser['username'])
|
Benutze überall title() sta...
bernd authored 14 years ago
|
30) title('Ändern des FTP-Benutzers');
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
31) else
|
big fat warning zur Sicherh...
bernd authored 15 years ago
|
32) {
|
Benutze überall title() sta...
bernd authored 14 years ago
|
33) title('Neuer FTP-Zugang');
|
big fat warning zur Sicherh...
bernd authored 15 years ago
|
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>');
35) }
|
Verwaltung von FTP-Accounts...
bernd authored 15 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)
|
Erlaube unverschlüsselte FT...
bernd authored 13 years ago
|
43) $active = ($ftpuser['active'] == 1 ? 'checked="checked" ' : '');
44) $forcessl = ($ftpuser['forcessl'] == 1 ? 'checked="checked" ' : '');
|
Verwaltung von FTP-Accounts...
bernd authored 15 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>';
50) if (count($available_servers) > 1)
51) {
52) $serverselect = array();
53) foreach ($available_servers AS $s)
54) $serverselect[$s] = $servers[$s];
55) $whichserver = html_select('server', $serverselect, $ftpuser['server']);
56) }
57)
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>
|
Erlaube unverschlüsselte FT...
bernd authored 13 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.'/> <label for="forcessl">SSL-Verschlüsselung erforderlich<sup>*</sup></label></td>
|
Verwaltung von FTP-Accounts...
bernd authored 15 years ago
|
77) </tr>
78) </table>
79) <p><input type="submit" name="save" value="Speichern" /></p>
|
Erlaube unverschlüsselte FT...
bernd authored 13 years ago
|
80)
|
Typo
bernd authored 13 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>
|
Erlaube unverschlüsselte FT...
bernd authored 13 years ago
|
82) '));
|