2626dd47daad110c63a82c0560b134e2364eeac3
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) require_once('inc/base.php');
18) require_once('inc/icons.php');
bernd Nur eingeloggten user sollt...

bernd authored 14 years ago

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

bernd authored 14 years ago

20) 
21) include("ftpusers.php");
22) 
23) $ftpusers = list_ftpusers();
24) $regular_ftp = have_regular_ftp();
25) 
26) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

27) title("Zusätzliche FTP-Benutzer");
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

28) output('
29) <p>Als Zusatzleistung bieten wir Ihnen die Möglichkeit, weitere FTP-Benutzerzugänge anzulegen. Diese Zugänge sind auf das angegebene Verzeichnis beschränkt und es kann nur mit dem FTP-Protokoll verwendet werden. Ein Login mittels SSH ist für diese Benutzerkonten nicht möglich.</p>');
30) 
31) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

32) if (count($ftpusers) > 0) {
33)     output('
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

34) <table><tr><th>Benutzername</th><th>Verzeichnis</th><th>aktiv</th><th>&#160;</th></tr>
35) ');
36) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

37)     foreach ($ftpusers as $f) {
38)         $sslwarning = ($f['forcessl'] == 0 ? icon_warning('Unverschlüsselte Verbindungen werden erlaubt') : '');
39)         $active = ($f['active'] == 1 ? icon_enabled('Ja') : '-');
40)         output("<tr><td>".internal_link("edit?id={$f['id']}", $f['username'])."</td><td>{$f['homedir']}</td><td style=\"text-align: center;\">{$active} {$sslwarning}</td><td>".internal_link("save?delete={$f['id']}", icon_delete("{$f['username']} löschen"))."</td></tr>");
41)     }
42)     output('</table>');
43) } else {
44)     output('<p><em>Sie haben bisher keine zusätzlichen FTP-Benutzer angelegt</em></p>');
bernd Verwaltung von FTP-Accounts...

bernd authored 14 years ago

45) }
46) 
47) addnew('edit', 'Neuen FTP-Benutzer anlegen');
48) 
bernd Security-enhancements und a...

bernd authored 14 years ago

49) 
50) output('<h3>Haupt-Account mittels FTP nutzen</h3>
Bernd Wurst Sicherheitsabfrage beim Akt...

Bernd Wurst authored 10 years ago

51) <p>Wenn Sie aus einem bestimmten Grund nicht mit den bei uns üblichen Datei-Übertragungsverfahren arbeiten können, besteht hier die Möglichkeit zusätzlich auch FTP-Zugriff für Ihren Benutzeraccount einzurichten.</p>
52) <p>Normalerweise laden Sie Ihre Dateien per SFTP bzw. SCP auf den Server. Nur wenn dies in Ihrem Fall nicht möglich ist, benötigen Sie FTP.</p>
bernd Security-enhancements und a...

bernd authored 14 years ago

53) ');
54) 
55) $token = generate_form_token('regular_ftp');
56) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

57) if ($regular_ftp) {
58)     output('<p>'.icon_enabled().' Momentan ist der Zugriff über FTP <strong>aktiviert</strong>. Wenn Sie diesen nicht benötigen sollten Sie ihn aus Sicherheitsgründen ausschalten.<br />'.internal_link('save', 'FTP-Zugriff für Haupt-Account sperren', 'regular_ftp=no&token='.$token).'</p>');
59) } else {
60)     output('<p>Der Zugriff Ihres Haupt-Accounts über FTP ist momentan abgeschaltet. Aktivieren Sie diesen nur wenn Sie ihn auch nutzen möchten.<br />'.internal_link("save", 'FTP-Zugriff für Haupt-Account freischalten', 'regular_ftp=yes&token='.$token).'</p>');