Rev 4 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 8 | ||
---|---|---|---|
1 | <?php |
1 | <?php |
2 | 2 | ||
3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
4 | 4 | ||
5 | if (($aktion == 'new') || ($aktion == 'edit')) |
5 | if (($aktion == 'new') || ($aktion == 'edit')) |
6 | { |
6 | { |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'fusername\').focus();"', $header); |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'fusername\').focus();"', $header); |
8 | 8 | ||
9 | if ($aktion == 'new') echo '<h1>Neues FTP-Konto</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neues FTP-Konto</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>FTP-Konto bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>FTP-Konto bearbeiten</h1>'; |
11 | 11 | ||
12 | if ($aktion == 'edit') |
12 | if ($aktion == 'edit') |
13 | { |
13 | { |
14 | $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."net2ftp` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
14 | $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."net2ftp` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
15 | if (db_num($res) == 0) |
15 | if (db_num($res) == 0) |
16 | die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verfügbar, oder die Zugriffsberechtigungen sind falsch.'.$footer); |
16 | die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verfügbar, oder die Zugriffsberechtigungen sind falsch.'.$footer); |
17 | $row = db_fetch($res); |
17 | $row = db_fetch($res); |
18 | 18 | ||
19 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
19 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
20 | $fusername = (isset($row['username'])) ? $row['username'] : ''; |
20 | $fusername = (isset($row['username'])) ? $row['username'] : ''; |
21 | $fpasswort = (isset($row['passwort'])) ? $row['passwort'] : ''; |
21 | $fpasswort = (isset($row['passwort'])) ? $row['passwort'] : ''; |
22 | $fserver = (isset($row['server'])) ? $row['server'] : ''; |
22 | $fserver = (isset($row['server'])) ? $row['server'] : ''; |
23 | $fstart = (isset($row['startverzeichnis'])) ? $row['startverzeichnis'] : ''; |
23 | $fstart = (isset($row['startverzeichnis'])) ? $row['startverzeichnis'] : ''; |
24 | $fport = (isset($row['port'])) ? $row['port'] : '21'; |
24 | $fport = (isset($row['port'])) ? $row['port'] : '21'; |
25 | } |
25 | } |
26 | else |
26 | else |
27 | { |
27 | { |
28 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
28 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
29 | $fusername = ''; |
29 | $fusername = ''; |
30 | $fpasswort = ''; |
30 | $fpasswort = ''; |
31 | $fserver = ''; |
31 | $fserver = ''; |
32 | $fstart = ''; |
32 | $fstart = ''; |
33 | $fport = '21'; |
33 | $fport = '21'; |
34 | } |
34 | } |
35 | 35 | ||
36 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
36 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
37 | <input type="hidden" name="seite" value="kraftsetzung"> |
37 | <input type="hidden" name="seite" value="kraftsetzung"> |
38 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
38 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
39 | <input type="hidden" name="modul" value="'.$modul.'">'; |
39 | <input type="hidden" name="modul" value="'.$modul.'">'; |
40 | 40 | ||
41 | if ($aktion == 'edit') |
41 | if ($aktion == 'edit') |
42 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
42 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
43 | 43 | ||
44 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
44 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
45 | <tr> |
45 | <tr> |
46 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
46 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
47 | </tr> |
47 | </tr> |
48 | <tr> |
48 | <tr> |
49 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
49 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
50 | <td valign="top">'; |
50 | <td valign="top">'; |
51 | 51 | ||
52 | gfx_zeichneordnerbox($modul, 'ORDER BY id', 0, 0, $auszuwaehlen); |
52 | gfx_zeichneordnerbox($modul, 'ORDER BY id', 0, 0, $auszuwaehlen); |
53 | 53 | ||
54 | if (!isset($danach)) $danach = 'A'; |
54 | if (!isset($danach)) $danach = 'A'; |
55 | 55 | ||
56 | echo '</td> |
56 | echo '</td> |
57 | </tr> |
57 | </tr> |
58 | <tr> |
58 | <tr> |
59 | <td colspan="2"><br><b>Zugangsdaten</b><br><br></td> |
59 | <td colspan="2"><br><b>Zugangsdaten</b><br><br></td> |
60 | </tr> |
60 | </tr> |
61 | <tr> |
61 | <tr> |
62 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
62 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
63 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fusername" id="fusername" value="'.$fusername.'" size="50"></td> |
63 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fusername" id="fusername" value="'.$fusername.'" size="50"></td> |
64 | </tr> |
64 | </tr> |
65 | <tr> |
65 | <tr> |
66 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
66 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
67 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpasswort" value="'.$fpasswort.'" size="50"></td> |
67 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpasswort" value="'.$fpasswort.'" size="50"></td> |
68 | </tr> |
68 | </tr> |
69 | <tr> |
69 | <tr> |
70 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
70 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
71 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" value="'.$fserver.'" size="40"> : <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fport" value="'.$fport.'" size="5"></td> |
71 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" value="'.$fserver.'" size="40"> : <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fport" value="'.$fport.'" size="5"></td> |
72 | </tr> |
72 | </tr> |
73 | <tr> |
73 | <tr> |
74 | <td valign="top">Startverzeichnis:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
74 | <td valign="top">Startverzeichnis:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
75 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fstart" value="'.$fstart.'" size="50"></td> |
75 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fstart" value="'.$fstart.'" size="50"></td> |
76 | </tr> |
76 | </tr> |
77 | <tr> |
77 | <tr> |
78 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
78 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
79 | </tr> |
79 | </tr> |
80 | <tr> |
80 | <tr> |
81 | <td valign="top">Aktion: </td> |
81 | <td valign="top">Aktion: </td> |
82 | <td><select name="danach"> |
82 | <td><select name="danach"> |
83 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
83 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
84 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
84 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
85 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
85 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
86 | </select></td> |
86 | </select></td> |
87 | </tr> |
87 | </tr> |
88 | </table><br> |
88 | </table><br> |
89 | <a href="javascript:document.mainform.submit();">'; |
89 | <a href="javascript:document.mainform.submit();">'; |
90 | 90 | ||
91 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
91 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
92 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
92 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
93 | 93 | ||
94 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul.'">Zurück</a> |
94 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
95 | 95 | ||
96 | </form>'; |
96 | </form>'; |
97 | 97 | ||
98 | echo $footer; |
98 | echo $footer; |
99 | } |
99 | } |
100 | 100 | ||
101 | ?> |
101 | ?> |
102 | 102 |