Rev 12 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12 | 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 | if (($aktion == 'new') || ($aktion == 'edit')) |
5 | if (($aktion == 'new') || ($aktion == 'edit')) |
6 | { |
6 | { |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header); |
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header); |
8 | 8 | ||
9 | if ($aktion == 'new') echo '<h1>Neue Tabelle</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neue Tabelle</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Tabelle bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Tabelle bearbeiten</h1>'; |
11 | 11 | ||
12 | if ($aktion == 'edit') |
12 | if ($aktion == 'edit') |
13 | { |
13 | { |
14 | $res = db_query("SELECT name, folder FROM ".$mysql_zugangsdaten['praefix']."tabellen WHERE id = '".db_escape($id)."' AND user = '".$benutzer['id']."'"); |
14 | $res = db_query("SELECT name, folder FROM ".$mysql_zugangsdaten['praefix']."tabellen 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 | $name = (isset($row['name'])) ? $row['name'] : ''; |
19 | $name = (isset($row['name'])) ? $row['name'] : ''; |
20 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
20 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
21 | } |
21 | } |
22 | else |
22 | else |
23 | { |
23 | { |
24 | $name = ''; |
24 | $name = ''; |
25 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
25 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
26 | } |
26 | } |
27 | 27 | ||
28 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
28 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
29 | <input type="hidden" name="seite" value="kraftsetzung"> |
29 | <input type="hidden" name="seite" value="kraftsetzung"> |
30 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
30 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
31 | <input type="hidden" name="modul" value="'.$modul.'">'; |
31 | <input type="hidden" name="modul" value="'.$modul.'">'; |
32 | 32 | ||
33 | if ($_GET['aktion'] == 'edit') |
33 | if ($_GET['aktion'] == 'edit') |
34 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
34 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
35 | 35 | ||
36 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
36 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
37 | <tr> |
37 | <tr> |
38 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
38 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
39 | </tr> |
39 | </tr> |
40 | <tr> |
40 | <tr> |
41 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
41 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
42 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="name" id="name" value="'.$name.'" size="50"></td> |
42 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="name" id="name" value="'.$name.'" size="50"></td> |
43 | </tr> |
43 | </tr> |
44 | <tr> |
44 | <tr> |
45 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
45 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
46 | <td valign="top">'; |
46 | <td valign="top">'; |
47 | 47 | ||
48 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
48 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
49 | 49 | ||
50 | if (!isset($danach)) $danach = 'A'; |
50 | if (!isset($danach)) $danach = 'A'; |
51 | 51 | ||
52 | echo '</td> |
52 | echo '</td> |
53 | </tr> |
53 | </tr> |
54 | <tr> |
54 | <tr> |
55 | <td colspan="2"><br><b>Feldinformationen</b><br><br></td> |
55 | <td colspan="2"><br><b>Feldinformationen</b><br><br></td> |
56 | </tr> |
56 | </tr> |
57 | <tr> |
57 | <tr> |
58 | <td colspan="2">Noch in Bearbeitung...</td> |
58 | <td colspan="2">Noch in Bearbeitung...</td> |
59 | </tr> |
59 | </tr> |
60 | <tr> |
60 | <tr> |
61 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
61 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
62 | </tr> |
62 | </tr> |
63 | <tr> |
63 | <tr> |
64 | <td valign="top">Aktion: </td> |
64 | <td valign="top">Aktion: </td> |
65 | <td><select name="danach"> |
65 | <td><select name="danach"> |
66 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
66 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
67 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
67 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
68 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
68 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
69 | </select></td> |
69 | </select></td> |
70 | </tr> |
70 | </tr> |
71 | </table><br> |
71 | </table><br> |
72 | <a href="javascript:document.mainform.submit();">'; |
72 | <a href="javascript:document.mainform.submit();">'; |
73 | 73 | ||
74 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
74 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
75 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
75 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
76 | 76 | ||
77 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
77 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
78 | 78 | ||
79 | </form>'; |
79 | </form>'; |
80 | 80 | ||
81 | echo $footer; |
81 | echo $footer; |
82 | } |
82 | } |
83 | 83 | ||
84 | ?> |
84 | ?> |
85 | 85 |