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 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'ftpserver\').focus();"', $header); |
||
6 | |||
7 | if (!isset($vonmodul)) $vonmodul = $modul; |
||
8 | if (!isset($vonseite)) $vonseite = 'main'; |
||
9 | |||
10 | echo '<h1>'.htmlentities($module_information->caption).'</h1>'; |
||
11 | 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>'; |
||
12 | |||
13 | $conn_id = @ftp_connect($configuration[$modul]['ftp-server'], $configuration[$modul]['ftp-port']); |
||
14 | $login_result = @ftp_login ($conn_id, $configuration[$modul]['ftp-username'], $configuration[$modul]['ftp-password']); |
||
15 | |||
16 | $fehler = false; |
||
17 | |||
18 | if ((!$conn_id) || (!$login_result)) |
||
19 | { |
||
20 | echo '<span class="red">Die FTP-Zugangsdaten sind falsch! Bitte korrigieren Sie diese.</span>'; |
||
21 | $fehler = true; |
||
22 | } |
||
23 | |||
24 | if ((!$fehler) && (substr($configuration[$modul]['ftp-verzeichnis'], strlen($configuration[$modul]['ftp-verzeichnis'])-1, 1) != '/')) |
||
25 | { |
||
26 | echo '<span class="red">Das FTP-Verzeichnis muss einen abschließenden Slash (/) erhalten!</span>'; |
||
27 | $fehler = true; |
||
28 | } |
||
29 | |||
30 | if ((!$fehler) && (substr($configuration[$modul]['ftp-verzeichnis'], 0, 1) != '/')) |
||
31 | { |
||
32 | echo '<span class="red">Das FTP-Verzeichnis muss mit einem Slash (/) beginnen!</span>'; |
||
33 | $fehler = true; |
||
34 | } |
||
35 | |||
36 | if ((!$fehler) && (@ftp_size($conn_id, $configuration[$modul]['ftp-verzeichnis'].'modules/moddir.txt') == -1)) |
||
37 | { |
||
38 | echo '<span class="red">Kann modules/moddir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</span>'; |
||
39 | $fehler = true; |
||
40 | } |
||
41 | |||
42 | if ((!$fehler) && (@ftp_size($conn_id, $configuration[$modul]['ftp-verzeichnis'].'designs/desdir.txt') == -1)) |
||
43 | { |
||
44 | echo '<span class="red">Kann designs/desdir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</span>'; |
||
45 | $fehler = true; |
||
46 | } |
||
47 | |||
48 | if (!$fehler) |
||
49 | { |
||
50 | echo 'Es gibt derzeit kein Problem mit den FTP-Zugangsdaten.'; |
||
51 | } |
||
52 | |||
53 | echo '<br><br>'; |
||
54 | |||
55 | @ftp_quit($conn_id); |
||
56 | |||
57 | echo '<script language="JavaScript" type="text/javascript"> |
||
58 | <!-- |
||
59 | |||
60 | function subm_form(act) |
||
61 | { |
||
62 | if (act == 0) |
||
63 | { |
||
64 | document.forms["mainform"].elements["zwischenspeichern"].value = "0"; |
||
65 | } |
||
66 | if (act == 1) |
||
67 | { |
||
68 | document.forms["mainform"].elements["zwischenspeichern"].value = "1"; |
||
69 | } |
||
70 | document.forms.mainform.submit(); |
||
71 | } |
||
72 | |||
73 | // --> |
||
74 | </script> |
||
75 | |||
76 | <form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="mainform" id="mainform"> |
||
77 | <input type="hidden" name="seite" value="operate"> |
||
78 | <input type="hidden" name="aktion" value="change_configuration"> |
||
79 | <input type="hidden" name="modul" value="'.$modul.'"> |
||
80 | <input type="hidden" name="vonseite" value="'.$vonseite.'"> |
||
81 | <input type="hidden" name="vonmodul" value="'.$vonmodul.'"> |
||
82 | <input type="hidden" name="zwischenspeichern" value="0">'; ?> |
||
83 | |||
84 | <table cellpadding="0" cellspacing="0" border="0"> |
||
85 | <tr> |
||
86 | <td>FTP-Server:</td> |
||
87 | <td><img src="designs/spacer.gif" width="15" height="1" alt=""></td> |
||
88 | <td><input type="text" id="ftpserver" name="ftpserver" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $configuration[$modul]['ftp-server']; ?>"> : <input type="text" size="5" name="ftpport" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $configuration[$modul]['ftp-port']; ?>"></td> |
||
89 | </tr> |
||
90 | <tr> |
||
91 | <td>FTP-Benutzername:</td> |
||
92 | <td><img src="designs/spacer.gif" width="15" height="1" alt=""></td> |
||
93 | <td><input type="text" name="ftpuser" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $configuration[$modul]['ftp-username']; ?>"></td> |
||
94 | </tr> |
||
95 | <tr> |
||
96 | <td>FTP-Passwort:</td> |
||
97 | <td><img src="designs/spacer.gif" width="15" height="1" alt=""></td> |
||
98 | <td><input type="text" name="ftppassword" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $configuration[$modul]['ftp-password']; ?>"></td> |
||
99 | </tr> |
||
100 | <tr> |
||
101 | <td>FTP-Verzeichnis:</td> |
||
102 | <td><img src="designs/spacer.gif" width="15" height="1" alt=""></td> |
||
103 | <td><input type="text" name="ftpverzeichnis" class="normal" onmouseover="this.className='highlight';" onmouseout="this.className='normal';" value="<?php echo $configuration[$modul]['ftp-verzeichnis']; ?>"></td> |
||
104 | </tr> |
||
105 | </table><br> |
||
106 | |||
107 | <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"> |
||
108 | |
||
109 | <input onclick="subm_form(1);" type="button" value="Zwischenspeichern" class="button" onmouseover="this.className='button_act';" onmouseout="this.className='button';"> |
||
110 | |
||
111 | <input onclick="subm_form(0);" type="button" value="Speichern" class="button" onmouseover="this.className='button_act';" onmouseout="this.className='button';"> |
||
112 | |||
113 | </form> |
||
114 | |||
115 | <?php |
||
116 | |||
117 | echo $footer; |
||
118 | |||
119 | ?> |