Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12 | daniel-mar | 1 | <?php |
2 | |||
3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
||
4 | |||
5 | if (($aktion == 'new') || ($aktion == 'edit')) |
||
6 | { |
||
7 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header); |
||
8 | |||
9 | if ($aktion == 'new') echo '<h1>Neue Tabelle</h1>'; |
||
10 | if ($aktion == 'edit') echo '<h1>Tabelle bearbeiten</h1>'; |
||
11 | |||
12 | if ($aktion == 'edit') |
||
13 | { |
||
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) |
||
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); |
||
18 | |||
19 | $name = (isset($row['name'])) ? $row['name'] : ''; |
||
20 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
||
21 | } |
||
22 | else |
||
23 | { |
||
24 | $name = ''; |
||
25 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
||
26 | } |
||
27 | |||
28 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
||
29 | <input type="hidden" name="seite" value="kraftsetzung"> |
||
30 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
||
31 | <input type="hidden" name="modul" value="'.$modul.'">'; |
||
32 | |||
33 | if ($_GET['aktion'] == 'edit') |
||
34 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
||
35 | |||
36 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
||
37 | <tr> |
||
38 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
||
39 | </tr> |
||
40 | <tr> |
||
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> |
||
43 | </tr> |
||
44 | <tr> |
||
45 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
46 | <td valign="top">'; |
||
47 | |||
48 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
||
49 | |||
50 | if (!isset($danach)) $danach = 'A'; |
||
51 | |||
52 | echo '</td> |
||
53 | </tr> |
||
54 | <tr> |
||
55 | <td colspan="2"><br><b>Feldinformationen</b><br><br></td> |
||
56 | </tr> |
||
57 | <tr> |
||
58 | <td colspan="2">Noch in Bearbeitung...</td> |
||
59 | </tr> |
||
60 | <tr> |
||
61 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
||
62 | </tr> |
||
63 | <tr> |
||
64 | <td valign="top">Aktion: </td> |
||
65 | <td><select name="danach"> |
||
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> |
||
68 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
||
69 | </select></td> |
||
70 | </tr> |
||
71 | </table><br> |
||
72 | <a href="javascript:document.mainform.submit();">'; |
||
73 | |||
74 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
||
75 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
||
76 | |||
77 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
||
78 | |||
79 | </form>'; |
||
80 | |||
81 | echo $footer; |
||
82 | } |
||
83 | |||
84 | ?> |