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(\'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>Neuer Ordner</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neuer Ordner</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Ordner bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Ordner 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']."ordner` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
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) |
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 action="'.$_SERVER['PHP_SELF'].'" method="POST" name="mainform"> |
28 | echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="mainform"> |
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 | <input type="hidden" name="kategorie" value="'.$kategorie.'">'; |
32 | <input type="hidden" name="kategorie" value="'.$kategorie.'">'; |
33 | 33 | ||
34 | if ($aktion == 'edit') |
34 | if ($aktion == 'edit') |
35 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
35 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
36 | 36 | ||
37 | $modulueberschrift = 'Unbekannt'; |
37 | $modulueberschrift = 'Unbekannt'; |
38 | $modulsekpos = ''; |
38 | $modulsekpos = ''; |
39 | $modulpos = ''; |
39 | $modulpos = ''; |
40 | $modulrechte = ''; |
40 | $modulrechte = ''; |
41 | $autor = ''; |
41 | $autor = ''; |
42 | $version = ''; |
42 | $version = ''; |
43 | $menuevisible = ''; |
43 | $menuevisible = ''; |
44 | $license = ''; |
44 | $license = ''; |
45 | $deaktiviere_zugangspruefung = 0; |
45 | $deaktiviere_zugangspruefung = 0; |
46 | 46 | ||
47 | if (file_exists('modules/'.$kategorie.'/var.inc.php')) |
47 | if (file_exists('modules/'.wb_dir_escape($kategorie).'/var.inc.php')) |
48 | include 'modules/'.$kategorie.'/var.inc.php'; |
48 | include 'modules/'.wb_dir_escape($kategorie).'/var.inc.php'; |
49 | 49 | ||
50 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
50 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
51 | <tr> |
51 | <tr> |
52 | <td valign="top">Kategorie:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
52 | <td valign="top">Kategorie:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
53 | <td valign="top">'.$modulueberschrift.'</td> |
53 | <td valign="top">'.$modulueberschrift.'</td> |
54 | </tr> |
54 | </tr> |
55 | <tr> |
55 | <tr> |
56 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
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> |
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> |
58 | </tr> |
59 | <tr> |
59 | <tr> |
60 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
60 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
61 | <td valign="top">'; |
61 | <td valign="top">'; |
62 | 62 | ||
63 | if (!isset($id)) $id = 0; |
63 | if (!isset($id)) $id = 0; |
64 | gfx_zeichneordnerbox($kategorie, 'ORDER BY `name`', 0, 0, $auszuwaehlen, $id); |
64 | gfx_zeichneordnerbox($kategorie, 'ORDER BY `name`', 0, 0, $auszuwaehlen, $id); |
65 | 65 | ||
66 | if (!isset($danach)) $danach = 'A'; |
66 | if (!isset($danach)) $danach = 'A'; |
67 | 67 | ||
68 | echo '</td> |
68 | echo '</td> |
69 | </tr> |
69 | </tr> |
70 | <tr> |
70 | <tr> |
71 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
71 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
72 | </tr> |
72 | </tr> |
73 | <tr> |
73 | <tr> |
74 | <td valign="top">Aktion: </td> |
74 | <td valign="top">Aktion: </td> |
75 | <td><select name="danach"> |
75 | <td><select name="danach"> |
76 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
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> |
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> |
78 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
79 | </select></td> |
79 | </select></td> |
80 | </tr> |
80 | </tr> |
81 | </table><br> |
81 | </table><br> |
82 | <a href="javascript:document.mainform.submit();">'; |
82 | <a href="javascript:document.mainform.submit();">'; |
83 | 83 | ||
84 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
84 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
85 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
85 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
86 | 86 | ||
87 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$kategorie.'">Zurück</a> |
87 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($kategorie).'">Zurück</a> |
88 | 88 | ||
89 | </form>'; |
89 | </form>'; |
90 | 90 | ||
91 | echo $footer; |
91 | echo $footer; |
92 | } |
92 | } |
93 | 93 | ||
94 | ?> |
94 | ?> |
95 | 95 |