Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | <?php |
2 | |||
3 | if (!defined('WBLEGAL')) 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>Neues Postfach</h1>'; |
||
10 | if ($aktion == 'edit') echo '<h1>Postfach bearbeiten</h1>'; |
||
11 | |||
12 | if ($aktion == 'edit') |
||
13 | { |
||
14 | $res = db_query("SELECT `name`, `folder_cnid`, `server`, `username`, `password`, `personal_name`, `replyaddr` FROM `".$WBConfig->getMySQLPrefix()."popper_konten` WHERE `id` = '".db_escape($id)."' AND `user_cnid` = '".$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_cnid'])) ? $row['folder_cnid'] : ''; |
||
21 | $mserver = (isset($row['server'])) ? $row['server'] : ''; |
||
22 | $musername = (isset($row['username'])) ? $row['username'] : ''; |
||
23 | $mpassword = (isset($row['password'])) ? $row['password'] : ''; |
||
24 | $personal_name = (isset($row['personal_name'])) ? $row['personal_name'] : ''; |
||
25 | $replyaddr = (isset($row['replyaddr'])) ? $row['replyaddr'] : ''; |
||
26 | } |
||
27 | else |
||
28 | { |
||
29 | $name = ''; |
||
30 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
||
31 | $mserver = ''; |
||
32 | $musername = ''; |
||
33 | $mpassword = ''; |
||
34 | $personal_name = ''; |
||
35 | $replyaddr = ''; |
||
36 | } |
||
37 | |||
38 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
||
39 | <input type="hidden" name="seite" value="operate"> |
||
40 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
||
41 | <input type="hidden" name="modul" value="'.$modul.'">'; |
||
42 | |||
43 | if ($aktion == 'edit') |
||
44 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
||
45 | |||
46 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
||
47 | <tr> |
||
48 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
||
49 | </tr> |
||
50 | <tr> |
||
51 | <td valign="top">Name:<img src="designs/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> |
||
53 | </tr> |
||
54 | <tr> |
||
55 | <td valign="top">In Ordner:<img src="designs/spacer.gif" height="1" width="35" alt=""></td> |
||
56 | <td valign="top">'; |
||
57 | |||
58 | gfx_zeichneordnerbox($modul, 0, 0, $auszuwaehlen); |
||
59 | |||
60 | if (!isset($danach)) $danach = 'A'; |
||
61 | |||
62 | echo '</td> |
||
63 | </tr> |
||
64 | <tr> |
||
65 | <td colspan="2"><br><b>POP3-Informationen</b><br><br></td> |
||
66 | </tr> |
||
67 | <tr> |
||
68 | <td valign="top">Server:<img src="designs/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> |
||
70 | </tr> |
||
71 | <tr> |
||
72 | <td valign="top">Benutzername:<img src="designs/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> |
||
74 | </tr> |
||
75 | <tr> |
||
76 | <td valign="top">Passwort:<img src="designs/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="mpassword" value="'.$mpassword.'" size="50"></td> |
||
78 | </tr> |
||
79 | <tr> |
||
80 | <td colspan="2"><br><b>Weitere Informationen</b><br><br></td> |
||
81 | </tr> |
||
82 | <tr> |
||
83 | <td valign="top">Name der Person:<img src="designs/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="personal_name" value="'.$personal_name.'" size="50"></td> |
||
85 | </tr> |
||
86 | <tr> |
||
87 | <td valign="top">Antwortadresse:<img src="designs/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> |
||
89 | </tr> |
||
90 | <tr> |
||
91 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
||
92 | </tr> |
||
93 | <tr> |
||
94 | <td valign="top">Aktion: </td> |
||
95 | <td><select name="danach"> |
||
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> |
||
98 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
||
99 | </select></td> |
||
100 | </tr> |
||
101 | </table><br> |
||
102 | <a href="javascript:document.mainform.submit();">'; |
||
103 | |||
104 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
||
105 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
||
106 | |||
107 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=main&modul='.$modul.'">Zurück</a> |
||
108 | |||
109 | </form>'; |
||
110 | |||
111 | echo $footer; |
||
112 | } |
||
113 | |||
114 | ?> |