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(\'fserver\').focus();"', $header); |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'fserver\').focus();"', $header); |
8 | 8 | ||
9 | if ($aktion == 'new') echo '<h1>Neuen MySQL-Server</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neuen MySQL-Server</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>MySQL-Server bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>MySQL-Server bearbeiten</h1>'; |
11 | 11 | ||
12 | if ($aktion == 'edit') |
12 | if ($aktion == 'edit') |
13 | { |
13 | { |
14 | $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."phpmyadmin` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
14 | $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."phpmyadmin` 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 | $fonlydb = (isset($row['onlydb'])) ? $row['onlydb'] : ''; |
23 | $fonlydb = (isset($row['onlydb'])) ? $row['onlydb'] : ''; |
24 | } |
24 | } |
25 | else |
25 | else |
26 | { |
26 | { |
27 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
27 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
28 | $fusername = ''; |
28 | $fusername = ''; |
29 | $fpasswort = ''; |
29 | $fpasswort = ''; |
30 | $fserver = ''; |
30 | $fserver = ''; |
31 | $fonlydb = ''; |
31 | $fonlydb = ''; |
32 | } |
32 | } |
33 | 33 | ||
34 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
34 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
35 | <input type="hidden" name="seite" value="kraftsetzung"> |
35 | <input type="hidden" name="seite" value="kraftsetzung"> |
36 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
36 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
37 | <input type="hidden" name="modul" value="'.$modul.'">'; |
37 | <input type="hidden" name="modul" value="'.$modul.'">'; |
38 | 38 | ||
39 | if ($aktion == 'edit') |
39 | if ($aktion == 'edit') |
40 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
40 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
41 | 41 | ||
42 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
42 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
43 | <tr> |
43 | <tr> |
44 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
44 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
45 | </tr> |
45 | </tr> |
46 | <tr> |
46 | <tr> |
47 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
47 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
48 | <td valign="top">'; |
48 | <td valign="top">'; |
49 | 49 | ||
50 | gfx_zeichneordnerbox($modul, 'ORDER BY id', 0, 0, $auszuwaehlen); |
50 | gfx_zeichneordnerbox($modul, 'ORDER BY id', 0, 0, $auszuwaehlen); |
51 | 51 | ||
52 | if (!isset($danach)) $danach = 'A'; |
52 | if (!isset($danach)) $danach = 'A'; |
53 | 53 | ||
54 | echo '</td> |
54 | echo '</td> |
55 | </tr> |
55 | </tr> |
56 | <tr> |
56 | <tr> |
57 | <td colspan="2"><br><b>Zugangsdaten</b><br><br></td> |
57 | <td colspan="2"><br><b>Zugangsdaten</b><br><br></td> |
58 | </tr> |
58 | </tr> |
59 | <tr> |
59 | <tr> |
60 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
60 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
61 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" id="fserver" value="'.$fserver.'" size="50"></td> |
61 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" id="fserver" value="'.$fserver.'" size="50"></td> |
62 | </tr> |
62 | </tr> |
63 | <tr> |
63 | <tr> |
64 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
64 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
65 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fusername" value="'.$fusername.'" size="50"></td> |
65 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fusername" value="'.$fusername.'" size="50"></td> |
66 | </tr> |
66 | </tr> |
67 | <tr> |
67 | <tr> |
68 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
68 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
69 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpasswort" value="'.$fpasswort.'" size="50"></td> |
69 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpasswort" value="'.$fpasswort.'" size="50"></td> |
70 | </tr> |
70 | </tr> |
71 | <tr> |
71 | <tr> |
72 | <td valign="top">Einzelne Datenbank:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
72 | <td valign="top">Einzelne Datenbank:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
73 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fonlydb" value="'.$fonlydb.'" size="50"></td> |
73 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fonlydb" value="'.$fonlydb.'" size="50"></td> |
74 | </tr> |
74 | </tr> |
75 | <tr> |
75 | <tr> |
76 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
76 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
77 | </tr> |
77 | </tr> |
78 | <tr> |
78 | <tr> |
79 | <td valign="top">Aktion: </td> |
79 | <td valign="top">Aktion: </td> |
80 | <td><select name="danach"> |
80 | <td><select name="danach"> |
81 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
81 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
82 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
82 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
83 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
83 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
84 | </select></td> |
84 | </select></td> |
85 | </tr> |
85 | </tr> |
86 | </table><br> |
86 | </table><br> |
87 | <a href="javascript:document.mainform.submit();">'; |
87 | <a href="javascript:document.mainform.submit();">'; |
88 | 88 | ||
89 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
89 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
90 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
90 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
91 | 91 | ||
92 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul.'">Zurück</a> |
92 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
93 | 93 | ||
94 | </form>'; |
94 | </form>'; |
95 | 95 | ||
96 | echo $footer; |
96 | echo $footer; |
97 | } |
97 | } |
98 | 98 | ||
99 | ?> |
99 | ?> |
100 | 100 |