Rev 12 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12 | daniel-mar | 1 | <?php |
2 | |||
14 | daniel-mar | 3 | if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
12 | daniel-mar | 4 | |
14 | daniel-mar | 5 | if ($wb_user_type < 2) die('Keine Zugriffsberechtigung'); |
12 | daniel-mar | 6 | |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'ftpserver\').focus();"', $header); |
||
8 | |||
9 | if (!isset($vonmodul)) $vonmodul = $modul; |
||
10 | if (!isset($vonseite)) $vonseite = 'inhalt'; |
||
11 | |||
12 | if ($modulueberschrift == '') $modulueberschrift = $modul; |
||
13 | echo '<h1>'.my_htmlentities($modulueberschrift).'</h1>'; |
||
14 | echo 'Damit einige Module korrekt funktionieren können, wird ein gültiger FTP-Zugang mit Schreibzugriff auf das Personal WebBase-Verzeichnis benötigt. Das Verzeichnis muss mit abschließendem Slash angegeben werden (z.B. /html/webbase/ bei Confixx-Systemen oder /webbase/ bei Nicht-Confixx-Systemen).<br><br>'; |
||
15 | |||
16 | if ($konfiguration[$modul]['ftp-server'] == '') { |
||
17 | $conn_id = null; |
||
18 | $login_result = false; |
||
19 | } else { |
||
20 | $conn_id = @ftp_connect($konfiguration[$modul]['ftp-server'], $konfiguration[$modul]['ftp-port']); |
||
21 | $login_result = @ftp_login ($conn_id, $konfiguration[$modul]['ftp-username'], $konfiguration[$modul]['ftp-passwort']); |
||
22 | } |
||
23 | |||
24 | $fehler = false; |
||
25 | |||
26 | if ((!$conn_id) || (!$login_result)) |
||
27 | { |
||
28 | echo '<font color="#FF0000">Die FTP-Zugangsdaten sind falsch! Bitte korrigieren Sie diese.</font>'; |
||
29 | $fehler = true; |
||
30 | } |
||
31 | |||
32 | if ((!$fehler) && (substr($konfiguration[$modul]['ftp-verzeichnis'], strlen($konfiguration[$modul]['ftp-verzeichnis'])-1, 1) != '/')) |
||
33 | { |
||
34 | echo '<font color="#FF0000">Das FTP-Verzeichnis muss einen abschließenden Slash (/) erhalten!</font>'; |
||
35 | $fehler = true; |
||
36 | } |
||
37 | |||
38 | if ((!$fehler) && (substr($konfiguration[$modul]['ftp-verzeichnis'], 0, 1) != '/')) |
||
39 | { |
||
40 | echo '<font color="#FF0000">Das FTP-Verzeichnis muss mit einem Slash (/) beginnen!</font>'; |
||
41 | $fehler = true; |
||
42 | } |
||
43 | |||
44 | if ((!$fehler) && (@ftp_size($conn_id, $konfiguration[$modul]['ftp-verzeichnis'].'modules/moddir.txt') == -1)) |
||
45 | { |
||
46 | echo '<font color="#FF0000">Kann modules/moddir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</font>'; |
||
47 | $fehler = true; |
||
48 | } |
||
49 | |||
50 | if ((!$fehler) && (@ftp_size($conn_id, $konfiguration[$modul]['ftp-verzeichnis'].'design/desdir.txt') == -1)) |
||
51 | { |
||
52 | echo '<font color="#FF0000">Kann design/desdir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</font>'; |
||
53 | $fehler = true; |
||
54 | } |
||
55 | |||
56 | if (!$fehler) |
||
57 | { |
||
58 | echo 'Es gibt derzeit kein Problem mit den FTP-Zugangsdaten.'; |
||
59 | } |
||
60 | |||
61 | echo '<br><br>'; |
||
62 | |||
63 | if ($conn_id) @ftp_quit($conn_id); |
||
64 | |||
65 | echo '<script language="JavaScript" type="text/javascript"> |
||
66 | <!-- |
||
67 | |||
68 | function subm_form(act) |
||
69 | { |
||
70 | if (act == 0) |
||
71 | { |
||
72 | document.forms["mainform"].elements["zwischenspeichern"].value = "0"; |
||
73 | } |
||
74 | if (act == 1) |
||
75 | { |
||
76 | document.forms["mainform"].elements["zwischenspeichern"].value = "1"; |
||
77 | } |
||
78 | document.forms.mainform.submit(); |
||
79 | } |
||
80 | |||
81 | // --> |
||
82 | </script> |
||
83 | |||
84 | <form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="mainform" id="mainform"> |
||
85 | <input type="hidden" name="seite" value="kraftsetzung"> |
||
86 | <input type="hidden" name="aktion" value="changekonfig"> |
||
87 | <input type="hidden" name="modul" value="'.$modul.'"> |
||
88 | <input type="hidden" name="vonseite" value="'.$vonseite.'"> |
||
89 | <input type="hidden" name="vonmodul" value="'.$vonmodul.'"> |
||
90 | <input type="hidden" name="zwischenspeichern" value="0">'; ?> |
||
91 | |||
92 | <table cellpadding="0" cellspacing="0" border="0"> |
||
93 | <tr> |
||
94 | <td>FTP-Server:</td> |
||
95 | <td><img src="design/spacer.gif" width="15" height="1" alt=""></td> |
||
96 | <td><input type="text" id="ftpserver" name="ftpserver" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $konfiguration[$modul]['ftp-server']; ?>"> : <input type="text" size="5" name="ftpport" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $konfiguration[$modul]['ftp-port']; ?>"></td> |
||
97 | </tr> |
||
98 | <tr> |
||
99 | <td>FTP-Benutzername:</td> |
||
100 | <td><img src="design/spacer.gif" width="15" height="1" alt=""></td> |
||
101 | <td><input type="text" name="ftpuser" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $konfiguration[$modul]['ftp-username']; ?>"></td> |
||
102 | </tr> |
||
103 | <tr> |
||
104 | <td>FTP-Passwort:</td> |
||
105 | <td><img src="design/spacer.gif" width="15" height="1" alt=""></td> |
||
106 | <td><input type="text" name="ftppassword" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $konfiguration[$modul]['ftp-passwort']; ?>"></td> |
||
107 | </tr> |
||
108 | <tr> |
||
109 | <td>FTP-Verzeichnis:</td> |
||
110 | <td><img src="design/spacer.gif" width="15" height="1" alt=""></td> |
||
111 | <td><input type="text" name="ftpverzeichnis" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $konfiguration[$modul]['ftp-verzeichnis']; ?>"></td> |
||
112 | </tr> |
||
113 | </table><br> |
||
114 | |||
115 | <input type="button" onclick="document.location.href='<?php echo $_SERVER['PHP_SELF']; ?>?modul=<?php echo $vonmodul; ?>&seite=<?php echo $vonseite; ?>';" class="button" onmouseover="this.className='button_act';" onmouseout="this.className='button';" value="Zurück"> |
||
116 | |
||
117 | <input onclick="subm_form(1);" type="button" value="Zwischenspeichern" class="button" onmouseover="this.className='button_act';" onmouseout="this.className='button';"> |
||
118 | |
||
119 | <input onclick="subm_form(0);" type="button" value="Speichern" class="button" onmouseover="this.className='button_act';" onmouseout="this.className='button';"> |
||
120 | |||
121 | </form> |
||
122 | |||
123 | <?php |
||
124 | |||
125 | echo $footer; |
||
126 | |||
127 | ?> |