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 | 7 | ||
8 | $zugangsdaten_status[1] = 'Funktioniert'; |
8 | $zugangsdaten_status[1] = 'Funktioniert'; |
9 | $zugangsdaten_status[2] = 'Abgemeldet'; |
9 | $zugangsdaten_status[2] = 'Abgemeldet'; |
10 | $zugangsdaten_status[3] = 'Gesperrt'; |
10 | $zugangsdaten_status[3] = 'Gesperrt'; |
11 | $zugangsdaten_status[4] = 'Unbekannt'; |
11 | $zugangsdaten_status[4] = 'Unbekannt'; |
12 | 12 | ||
13 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header); |
13 | echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header); |
14 | 14 | ||
15 | if ($aktion == 'new') echo '<h1>Neue Zugangsinformation</h1>'; |
15 | if ($aktion == 'new') echo '<h1>Neue Zugangsinformation</h1>'; |
16 | if ($aktion == 'edit') echo '<h1>Zugangsinformation bearbeiten</h1>'; |
16 | if ($aktion == 'edit') echo '<h1>Zugangsinformation bearbeiten</h1>'; |
17 | 17 | ||
18 | if ($aktion == 'edit') |
18 | if ($aktion == 'edit') |
19 | { |
19 | { |
20 | $res = db_query("SELECT name, folder, text, url, status FROM ".$mysql_zugangsdaten['praefix']."zugangsdaten WHERE id = '".db_escape($id)."' AND user = '".$benutzer['id']."'"); |
20 | $res = db_query("SELECT name, folder, text, url, status FROM ".$mysql_zugangsdaten['praefix']."zugangsdaten WHERE id = '".db_escape($id)."' AND user = '".$benutzer['id']."'"); |
21 | if (db_num($res) == 0) |
21 | if (db_num($res) == 0) |
22 | die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verfügbar, oder die Zugriffsberechtigungen sind falsch.'.$footer); |
22 | die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verfügbar, oder die Zugriffsberechtigungen sind falsch.'.$footer); |
23 | $row = db_fetch($res); |
23 | $row = db_fetch($res); |
24 | 24 | ||
25 | $name = (isset($row['name'])) ? $row['name'] : ''; |
25 | $name = (isset($row['name'])) ? $row['name'] : ''; |
26 | $url = (isset($row['url'])) ? $row['url'] : ''; |
26 | $url = (isset($row['url'])) ? $row['url'] : ''; |
27 | $text = (isset($row['text'])) ? $row['text'] : ''; |
27 | $text = (isset($row['text'])) ? $row['text'] : ''; |
28 | $status = (isset($row['status'])) ? $row['status'] : ''; |
28 | $status = (isset($row['status'])) ? $row['status'] : ''; |
29 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
29 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
30 | } |
30 | } |
31 | else |
31 | else |
32 | { |
32 | { |
33 | $name = ''; |
33 | $name = ''; |
34 | $url = ''; |
34 | $url = ''; |
35 | $text = ''; |
35 | $text = ''; |
36 | $status = ''; |
36 | $status = ''; |
37 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
37 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
38 | } |
38 | } |
39 | 39 | ||
40 | ?><script language="JavaScript" type="text/javascript"> |
40 | ?><script language="JavaScript" type="text/javascript"> |
41 | <!-- |
41 | <!-- |
42 | 42 | ||
43 | function subm_form(act) |
43 | function subm_form(act) |
44 | { |
44 | { |
45 | if (act == 0) |
45 | if (act == 0) |
46 | { |
46 | { |
47 | document.forms["mainform"].target = '_self'; |
47 | document.forms["mainform"].target = '_self'; |
48 | document.forms["mainform"].elements["seite"].value = 'kraftsetzung'; |
48 | document.forms["mainform"].elements["seite"].value = 'kraftsetzung'; |
49 | } |
49 | } |
50 | if (act == 1) |
50 | if (act == 1) |
51 | { |
51 | { |
52 | document.forms["mainform"].target = '_blank'; |
52 | document.forms["mainform"].target = '_blank'; |
53 | document.forms["mainform"].elements["seite"].value = 'test_url'; |
53 | document.forms["mainform"].elements["seite"].value = 'test_url'; |
54 | } |
54 | } |
55 | document.forms.mainform.submit(); |
55 | document.forms.mainform.submit(); |
56 | } |
56 | } |
57 | 57 | ||
58 | // --> |
58 | // --> |
59 | </script><?php |
59 | </script><?php |
60 | 60 | ||
61 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
61 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
62 | <input type="hidden" name="seite" value=""> |
62 | <input type="hidden" name="seite" value=""> |
63 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
63 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
64 | <input type="hidden" name="modul" value="'.$modul.'">'; |
64 | <input type="hidden" name="modul" value="'.$modul.'">'; |
65 | 65 | ||
66 | if ($aktion == 'edit') |
66 | if ($aktion == 'edit') |
67 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
67 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
68 | 68 | ||
69 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
69 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
70 | <tr> |
70 | <tr> |
71 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
71 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
72 | </tr> |
72 | </tr> |
73 | <tr> |
73 | <tr> |
74 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
74 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
75 | <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> |
75 | <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> |
76 | </tr> |
76 | </tr> |
77 | <tr> |
77 | <tr> |
78 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
78 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
79 | <td valign="top">'; |
79 | <td valign="top">'; |
80 | 80 | ||
81 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
81 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
82 | 82 | ||
83 | if (!isset($danach)) $danach = 'A'; |
83 | if (!isset($danach)) $danach = 'A'; |
84 | 84 | ||
85 | echo '</td> |
85 | echo '</td> |
86 | </tr> |
86 | </tr> |
87 | <tr> |
87 | <tr> |
88 | <td colspan="2"><br><b>Detailierte Informationen</b><br><br></td> |
88 | <td colspan="2"><br><b>Detailierte Informationen</b><br><br></td> |
89 | </tr> |
89 | </tr> |
90 | <tr> |
90 | <tr> |
91 | <td valign="top">Status:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
91 | <td valign="top">Status:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
92 | <td valign="top"><select name="status">'; |
92 | <td valign="top"><select name="status">'; |
93 | 93 | ||
94 | for ($i=1; $zugangsdaten_status[$i] != ''; $i++) |
94 | for ($i=1; $zugangsdaten_status[$i] != ''; $i++) |
95 | { |
95 | { |
96 | if ($status == $i) |
96 | if ($status == $i) |
97 | $x = 'selected'; |
97 | $x = 'selected'; |
98 | else |
98 | else |
99 | $x = ''; |
99 | $x = ''; |
100 | echo '<option value="'.$i.'"'.$x.'>'.$zugangsdaten_status[$i].'</option>'; |
100 | echo '<option value="'.$i.'"'.$x.'>'.$zugangsdaten_status[$i].'</option>'; |
101 | } |
101 | } |
102 | 102 | ||
103 | echo '</select></td> |
103 | echo '</select></td> |
104 | </tr> |
104 | </tr> |
105 | <tr> |
105 | <tr> |
106 | <td valign="top">Webseite:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
106 | <td valign="top">Webseite:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
107 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="url" value="'.$url.'" size="50"> [<a href="javascript:subm_form(1);">Besuchen</a>]</td> |
107 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="url" value="'.$url.'" size="50"> [<a href="javascript:subm_form(1);">Besuchen</a>]</td> |
108 | </tr> |
108 | </tr> |
109 | <tr> |
109 | <tr> |
110 | <td colspan="2"><br><b>Inhalt der Zugangsinformation</b><br><br></td> |
110 | <td colspan="2"><br><b>Inhalt der Zugangsinformation</b><br><br></td> |
111 | </tr> |
111 | </tr> |
112 | <tr> |
112 | <tr> |
113 | <td valign="top">Text:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
113 | <td valign="top">Text:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
114 | <td valign="top"><textarea name="text" cols="40" rows="8">'.$text.'</textarea></td> |
114 | <td valign="top"><textarea name="text" cols="40" rows="8">'.$text.'</textarea></td> |
115 | </tr> |
115 | </tr> |
116 | <tr> |
116 | <tr> |
117 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
117 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
118 | </tr> |
118 | </tr> |
119 | <tr> |
119 | <tr> |
120 | <td valign="top">Aktion: </td> |
120 | <td valign="top">Aktion: </td> |
121 | <td><select name="danach"> |
121 | <td><select name="danach"> |
122 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
122 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
123 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
123 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
124 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
124 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
125 | </select></td> |
125 | </select></td> |
126 | </tr> |
126 | </tr> |
127 | </table><br> |
127 | </table><br> |
128 | <a href="javascript:subm_form(0);">'; |
128 | <a href="javascript:subm_form(0);">'; |
129 | 129 | ||
130 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
130 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
131 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
131 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
132 | 132 | ||
133 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul.'">Zurück</a> |
133 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
134 | 134 | ||
135 | </form>'; |
135 | </form>'; |
136 | 136 | ||
137 | echo $footer; |
137 | echo $footer; |
138 | } |
138 | } |
139 | 139 | ||
140 | ?> |
140 | ?> |
141 | 141 |