Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | <?php |
2 | |||
3 | if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
||
4 | |||
5 | $meldung = ''; |
||
6 | |||
7 | $fehler = false; |
||
8 | |||
9 | $conn_id = @ftp_connect($configuration[$m2]['ftp-server'], $configuration[$m2]['ftp-port']); |
||
10 | $login_result = @ftp_login ($conn_id, $configuration[$m2]['ftp-username'], $configuration[$m2]['ftp-password']); |
||
11 | |||
12 | if ((!$conn_id) || (!$login_result)) |
||
13 | { |
||
14 | $meldung .= '<span class="red">Die FTP-Zugangsdaten sind falsch! Bitte korrigieren Sie diese.</span>'; |
||
15 | $fehler = true; |
||
16 | } |
||
17 | |||
18 | if ((!$fehler) && (substr($configuration[$m2]['ftp-verzeichnis'], strlen($configuration[$m2]['ftp-verzeichnis'])-1, 1) != '/')) |
||
19 | { |
||
20 | $meldung .= '<span class="red">Das FTP-Verzeichnis muss einen abschließenden Slash (/) erhalten!</span>'; |
||
21 | $fehler = true; |
||
22 | } |
||
23 | |||
24 | if ((!$fehler) && (substr($configuration[$m2]['ftp-verzeichnis'], 0, 1) != '/')) |
||
25 | { |
||
26 | $meldung .= '<span class="red">Das FTP-Verzeichnis muss mit einem Slash (/) beginnen!</span>'; |
||
27 | $fehler = true; |
||
28 | } |
||
29 | |||
30 | if ((!$fehler) && (@ftp_size($conn_id, $configuration[$m2]['ftp-verzeichnis'].'modules/moddir.txt') == -1)) |
||
31 | { |
||
32 | $meldung .= '<span class="red">Kann modules/moddir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</span>'; |
||
33 | $fehler = true; |
||
34 | } |
||
35 | |||
36 | if ((!$fehler) && (@ftp_size($conn_id, $configuration[$m2]['ftp-verzeichnis'].'designs/desdir.txt') == -1)) |
||
37 | { |
||
38 | $meldung .= '<span class="red">Kann designs/desdir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</span>'; |
||
39 | $fehler = true; |
||
40 | } |
||
41 | |||
42 | if ($fehler) |
||
43 | { |
||
44 | $meldung .= '<br><a href="'.oop_link_to_modul($m2, 'config', 'admin_configuration').'">Konfigurationswerte bearbeiten</a>.'; |
||
45 | } |
||
46 | else |
||
47 | { |
||
48 | $meldung .= '<span class="green">Es gibt derzeit kein Problem mit den FTP-Zugangsdaten.</span>'; |
||
49 | } |
||
50 | |||
51 | @ftp_quit($conn_id); |
||
52 | |||
53 | ?> |