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