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>Neues Postfach</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neues Postfach</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Postfach bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Postfach bearbeiten</h1>'; |
11 | 11 | ||
12 | if ($aktion == 'edit') |
12 | if ($aktion == 'edit') |
13 | { |
13 | { |
14 | $res = db_query("SELECT `name`, `folder`, `server`, `username`, `passwort`, `personenname`, `replyaddr` FROM `".$mysql_zugangsdaten['praefix']."popper_konten` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
14 | $res = db_query("SELECT `name`, `folder`, `server`, `username`, `passwort`, `personenname`, `replyaddr` FROM `".$mysql_zugangsdaten['praefix']."popper_konten` 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 | $mserver = (isset($row['server'])) ? $row['server'] : ''; |
21 | $mserver = (isset($row['server'])) ? $row['server'] : ''; |
22 | $musername = (isset($row['username'])) ? $row['username'] : ''; |
22 | $musername = (isset($row['username'])) ? $row['username'] : ''; |
23 | $mpasswort = (isset($row['passwort'])) ? $row['passwort'] : ''; |
23 | $mpasswort = (isset($row['passwort'])) ? $row['passwort'] : ''; |
24 | $personenname = (isset($row['personenname'])) ? $row['personenname'] : ''; |
24 | $personenname = (isset($row['personenname'])) ? $row['personenname'] : ''; |
25 | $replyaddr = (isset($row['replyaddr'])) ? $row['replyaddr'] : ''; |
25 | $replyaddr = (isset($row['replyaddr'])) ? $row['replyaddr'] : ''; |
26 | } |
26 | } |
27 | else |
27 | else |
28 | { |
28 | { |
29 | $name = ''; |
29 | $name = ''; |
30 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
30 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
31 | $mserver = ''; |
31 | $mserver = ''; |
32 | $musername = ''; |
32 | $musername = ''; |
33 | $mpasswort = ''; |
33 | $mpasswort = ''; |
34 | $personenname = ''; |
34 | $personenname = ''; |
35 | $replyaddr = ''; |
35 | $replyaddr = ''; |
36 | } |
36 | } |
37 | 37 | ||
38 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
38 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
39 | <input type="hidden" name="seite" value="kraftsetzung"> |
39 | <input type="hidden" name="seite" value="kraftsetzung"> |
40 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
40 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
41 | <input type="hidden" name="modul" value="'.$modul.'">'; |
41 | <input type="hidden" name="modul" value="'.$modul.'">'; |
42 | 42 | ||
43 | if ($aktion == 'edit') |
43 | if ($aktion == 'edit') |
44 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
44 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
45 | 45 | ||
46 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
46 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
47 | <tr> |
47 | <tr> |
48 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
48 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
49 | </tr> |
49 | </tr> |
50 | <tr> |
50 | <tr> |
51 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
51 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
52 | <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> |
52 | <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> |
53 | </tr> |
53 | </tr> |
54 | <tr> |
54 | <tr> |
55 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
55 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
56 | <td valign="top">'; |
56 | <td valign="top">'; |
57 | 57 | ||
58 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
58 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
59 | 59 | ||
60 | if (!isset($danach)) $danach = 'A'; |
60 | if (!isset($danach)) $danach = 'A'; |
61 | 61 | ||
62 | echo '</td> |
62 | echo '</td> |
63 | </tr> |
63 | </tr> |
64 | <tr> |
64 | <tr> |
65 | <td colspan="2"><br><b>POP3-Informationen</b><br><br></td> |
65 | <td colspan="2"><br><b>POP3-Informationen</b><br><br></td> |
66 | </tr> |
66 | </tr> |
67 | <tr> |
67 | <tr> |
68 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
68 | <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
69 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mserver" value="'.$mserver.'" size="50"></td> |
69 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mserver" value="'.$mserver.'" size="50"></td> |
70 | </tr> |
70 | </tr> |
71 | <tr> |
71 | <tr> |
72 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
72 | <td valign="top">Benutzername:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
73 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="musername" value="'.$musername.'" size="50"></td> |
73 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="musername" value="'.$musername.'" size="50"></td> |
74 | </tr> |
74 | </tr> |
75 | <tr> |
75 | <tr> |
76 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
76 | <td valign="top">Passwort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
77 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mpasswort" value="'.$mpasswort.'" size="50"></td> |
77 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mpasswort" value="'.$mpasswort.'" size="50"></td> |
78 | </tr> |
78 | </tr> |
79 | <tr> |
79 | <tr> |
80 | <td colspan="2"><br><b>Weitere Informationen</b><br><br></td> |
80 | <td colspan="2"><br><b>Weitere Informationen</b><br><br></td> |
81 | </tr> |
81 | </tr> |
82 | <tr> |
82 | <tr> |
83 | <td valign="top">Name der Person:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
83 | <td valign="top">Name der Person:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
84 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="personenname" value="'.$personenname.'" size="50"></td> |
84 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="personenname" value="'.$personenname.'" size="50"></td> |
85 | </tr> |
85 | </tr> |
86 | <tr> |
86 | <tr> |
87 | <td valign="top">Antwortadresse:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
87 | <td valign="top">Antwortadresse:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
88 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="replyaddr" value="'.$replyaddr.'" size="50"></td> |
88 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="replyaddr" value="'.$replyaddr.'" size="50"></td> |
89 | </tr> |
89 | </tr> |
90 | <tr> |
90 | <tr> |
91 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
91 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
92 | </tr> |
92 | </tr> |
93 | <tr> |
93 | <tr> |
94 | <td valign="top">Aktion: </td> |
94 | <td valign="top">Aktion: </td> |
95 | <td><select name="danach"> |
95 | <td><select name="danach"> |
96 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
96 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
97 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
97 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
98 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
98 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
99 | </select></td> |
99 | </select></td> |
100 | </tr> |
100 | </tr> |
101 | </table><br> |
101 | </table><br> |
102 | <a href="javascript:document.mainform.submit();">'; |
102 | <a href="javascript:document.mainform.submit();">'; |
103 | 103 | ||
104 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
104 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
105 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
105 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
106 | 106 | ||
107 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul.'">Zurück</a> |
107 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
108 | 108 | ||
109 | </form>'; |
109 | </form>'; |
110 | 110 | ||
111 | echo $footer; |
111 | echo $footer; |
112 | } |
112 | } |
113 | 113 | ||
114 | ?> |
114 | ?> |
115 | 115 |