Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | daniel-mar | 3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
2 | daniel-mar | 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>Neuer Ordner</h1>'; |
||
10 | if ($aktion == 'edit') echo '<h1>Ordner bearbeiten</h1>'; |
||
11 | |||
12 | if ($aktion == 'edit') |
||
13 | { |
||
14 | $res = db_query("SELECT `name`, `folder` FROM `".$mysql_zugangsdaten['praefix']."ordner` 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 action="'.$_SERVER['PHP_SELF'].'" method="POST" name="mainform"> |
||
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 | <input type="hidden" name="kategorie" value="'.$kategorie.'">'; |
||
33 | |||
34 | if ($aktion == 'edit') |
||
35 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
||
36 | |||
37 | $modulueberschrift = 'Unbekannt'; |
||
38 | $modulsekpos = ''; |
||
39 | $modulpos = ''; |
||
40 | $modulrechte = ''; |
||
41 | $autor = ''; |
||
42 | $version = ''; |
||
43 | $menuevisible = ''; |
||
44 | $license = ''; |
||
45 | $deaktiviere_zugangspruefung = 0; |
||
46 | |||
8 | daniel-mar | 47 | if (file_exists('modules/'.wb_dir_escape($kategorie).'/var.inc.php')) |
48 | include 'modules/'.wb_dir_escape($kategorie).'/var.inc.php'; |
||
2 | daniel-mar | 49 | |
50 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
||
51 | <tr> |
||
52 | <td valign="top">Kategorie:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
53 | <td valign="top">'.$modulueberschrift.'</td> |
||
54 | </tr> |
||
55 | <tr> |
||
56 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
57 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="name" id="name" value="'.$name.'"></td> |
||
58 | </tr> |
||
59 | <tr> |
||
60 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
61 | <td valign="top">'; |
||
62 | |||
63 | if (!isset($id)) $id = 0; |
||
64 | gfx_zeichneordnerbox($kategorie, 'ORDER BY `name`', 0, 0, $auszuwaehlen, $id); |
||
65 | |||
66 | if (!isset($danach)) $danach = 'A'; |
||
67 | |||
68 | echo '</td> |
||
69 | </tr> |
||
70 | <tr> |
||
71 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
||
72 | </tr> |
||
73 | <tr> |
||
74 | <td valign="top">Aktion: </td> |
||
75 | <td><select name="danach"> |
||
76 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
||
77 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
||
78 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
||
79 | </select></td> |
||
80 | </tr> |
||
81 | </table><br> |
||
82 | <a href="javascript:document.mainform.submit();">'; |
||
83 | |||
84 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
||
85 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
||
86 | |||
8 | daniel-mar | 87 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($kategorie).'">Zurück</a> |
2 | daniel-mar | 88 | |
89 | </form>'; |
||
90 | |||
91 | echo $footer; |
||
92 | } |
||
93 | |||
3 | daniel-mar | 94 | ?> |