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