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 | // Länderliste von Lexas abrufen |
||
10 | $std_land = 'deutschland'; |
||
11 | |||
12 | $k = my_get_contents('http://www.lexas.net/laender/a-z.htm'); |
||
13 | if ($k != '') |
||
14 | { |
||
15 | preg_match_all('/<select(.+?)<\/select>/is', $k, $m); |
||
16 | |||
17 | preg_match_all('/<option value="http:\/\/www.lexas.net\/laender\/(.+?)\/(.+?)\/(.+?)" >(.+?)<\/option>/im', $m[0][0], $n); |
||
18 | $laenderliste = '<select name="land">'; |
||
19 | for ($i = 0; isset($n[1][$i]); $i++) |
||
20 | { |
||
21 | if ($n[2][$i] == 'deutschland') $s = ' selected'; else $s = ''; |
||
3 | daniel-mar | 22 | $laenderliste .= '<option value="'.$n[2][$i].'"'.$s.'>'.my_htmlentities($n[4][$i]).'</option>'; |
2 | daniel-mar | 23 | } |
24 | $laenderliste .= '</select>'; |
||
25 | } |
||
26 | else |
||
27 | { |
||
28 | echo 'Fehler'; |
||
29 | } |
||
30 | // Beendet |
||
31 | |||
32 | if ($aktion == 'new') echo '<h1>Neuer Kontakt</h1>'; |
||
33 | if ($aktion == 'edit') echo '<h1>Kontakt bearbeiten</h1>'; |
||
34 | |||
35 | if ($aktion == 'edit') |
||
36 | { |
||
37 | $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."kontakte` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
||
38 | if (db_num($res) == 0) |
||
39 | die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verfügbar, oder die Zugriffsberechtigungen sind falsch.'.$footer); |
||
40 | $row = db_fetch($res); |
||
41 | |||
42 | $name = (isset($row['name'])) ? $row['name'] : ''; |
||
43 | $strasse = (isset($row['strasse'])) ? $row['strasse'] : ''; |
||
44 | $plz = (isset($row['plz'])) ? $row['plz'] : ''; |
||
45 | $ort = (isset($row['ort'])) ? $row['ort'] : ''; |
||
46 | $land = (isset($row['land'])) ? $row['land'] : ''; |
||
47 | $telefon = (isset($row['telefon'])) ? $row['telefon'] : ''; |
||
48 | $art = explode('-', $telefon); |
||
49 | $telefon1 = $art[0]; |
||
50 | $telefon2 = $art[1]; |
||
51 | $mobil = (isset($row['mobil'])) ? $row['mobil'] : ''; |
||
52 | $art = explode('-', $mobil); |
||
53 | $mobil1 = $art[0]; |
||
54 | $mobil2 = $art[1]; |
||
55 | $fax = (isset($row['fax'])) ? $row['fax'] : ''; |
||
56 | $art = explode('-', $fax); |
||
57 | $fax1 = $art[0]; |
||
58 | $fax2 = $art[1]; |
||
59 | $email = (isset($row['email'])) ? $row['email'] : ''; |
||
60 | $icq = (isset($row['icq'])) ? $row['icq'] : ''; |
||
61 | $yahoo = (isset($row['yahoo'])) ? $row['yahoo'] : ''; |
||
62 | $msn = (isset($row['msn'])) ? $row['msn'] : ''; |
||
63 | $aim = (isset($row['aim'])) ? $row['aim'] : ''; |
||
64 | $skype = (isset($row['skype'])) ? $row['skype'] : ''; |
||
65 | $kommentare = (isset($row['kommentare'])) ? $row['kommentare'] : ''; |
||
66 | $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : ''; |
||
67 | } |
||
68 | else |
||
69 | { |
||
70 | $name = ''; |
||
71 | $strasse = ''; |
||
72 | $plz = ''; |
||
73 | $ort = ''; |
||
74 | $land = ''; |
||
75 | $telefon1 = ''; |
||
76 | $telefon2 = ''; |
||
77 | $fax1 = ''; |
||
78 | $fax2 = ''; |
||
79 | $mobil1 = ''; |
||
80 | $mobil2 = ''; |
||
81 | $email = ''; |
||
82 | $icq = ''; |
||
83 | $yahoo = ''; |
||
84 | $msn = ''; |
||
85 | $aim = ''; |
||
86 | $skype = ''; |
||
87 | $kommentare = ''; |
||
88 | $auszuwaehlen = (isset($folder)) ? $folder : 0; |
||
89 | } |
||
90 | |||
91 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
||
92 | <input type="hidden" name="seite" value="kraftsetzung"> |
||
93 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
||
94 | <input type="hidden" name="modul" value="'.$modul.'">'; |
||
95 | |||
96 | if ($aktion == 'edit') |
||
97 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
||
98 | |||
99 | if (!isset($danach)) $danach = 'A'; |
||
100 | |||
101 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
||
102 | <tr> |
||
103 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
||
104 | </tr> |
||
105 | <tr> |
||
106 | <td valign="top">Name:<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="name" id="name" value="'.$name.'" size="50"></td> |
||
108 | </tr> |
||
109 | <tr> |
||
110 | <td valign="top">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
111 | <td valign="top">'; |
||
112 | |||
113 | gfx_zeichneordnerbox($modul, 'ORDER BY `name`', 0, 0, $auszuwaehlen); |
||
114 | |||
115 | echo '</td> |
||
116 | </tr> |
||
117 | <tr> |
||
118 | <td colspan="2"><br><b>Detailierte Informationen</b><br><br></td> |
||
119 | </tr> |
||
120 | <tr> |
||
121 | <td valign="top">Straße:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
122 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="strasse" value="'.$strasse.'" size="54"></td> |
||
123 | </tr> |
||
124 | <tr> |
||
125 | <td valign="top">Wohnort:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
126 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="plz" value="'.$plz.'" size="15"> <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="ort" value="'.$ort.'" size="35"></td> |
||
127 | </tr> |
||
128 | <tr> |
||
129 | <td valign="top">Land:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
130 | <td valign="top">'.$laenderliste.'</td> |
||
131 | </tr> |
||
132 | <tr> |
||
133 | <td colspan="2"><br></td> |
||
134 | </tr> |
||
135 | <tr> |
||
136 | <td valign="top">Telefon:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
137 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="telefon1" value="'.$telefon1.'" size="25"> / <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="telefon2" value="'.$telefon2.'" size="25"></td> |
||
138 | </tr> |
||
139 | <tr> |
||
140 | <td valign="top">Telefax:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
141 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fax1" value="'.$fax1.'" size="25"> / <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fax2" value="'.$fax2.'" size="25"></td> |
||
142 | </tr> |
||
143 | <tr> |
||
144 | <td valign="top">Mobil:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
145 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mobil1" value="'.$mobil1.'" size="20"> / <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="mobil2" value="'.$mobil2.'" size="30"></td> |
||
146 | </tr> |
||
147 | <tr> |
||
148 | <td colspan="2"><br></td> |
||
149 | </tr> |
||
150 | <tr> |
||
151 | <td valign="top">E-Mail-Adresse:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
152 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="email" value="'.$email.'" size="50"></td> |
||
153 | </tr> |
||
154 | <tr> |
||
155 | <td valign="top">ICQ-Nummer:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
156 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="icq" value="'.$icq.'" size="50"></td> |
||
157 | </tr> |
||
158 | <tr> |
||
159 | <td valign="top">MSN-Messenger:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
160 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="msn" value="'.$msn.'" size="50"></td> |
||
161 | </tr> |
||
162 | <tr> |
||
163 | <td valign="top">AIM-Messenger:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
164 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="aim" value="'.$aim.'" size="50"></td> |
||
165 | </tr> |
||
166 | <tr> |
||
167 | <td valign="top">Yahoo-Messenger:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
168 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="yahoo" value="'.$yahoo.'" size="50"></td> |
||
169 | </tr> |
||
170 | <tr> |
||
171 | <td valign="top">Skype:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
172 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="skype" value="'.$skype.'" size="50"></td> |
||
173 | </tr> |
||
174 | <tr> |
||
175 | <td colspan="2"><br></td> |
||
176 | </tr> |
||
177 | <tr> |
||
178 | <td valign="top">Kommentare:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
||
179 | <td valign="top"><textarea name="kommentare" cols="40" rows="8">'.$kommentare.'</textarea></td> |
||
180 | </tr> |
||
181 | <tr> |
||
182 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
||
183 | </tr> |
||
184 | <tr> |
||
185 | <td valign="top">Aktion: </td> |
||
186 | <td><select name="danach"> |
||
187 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zum Hauptmenü</option> |
||
188 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option> |
||
189 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option> |
||
190 | </select></td> |
||
191 | </tr> |
||
192 | </table><br> |
||
193 | <a href="javascript:document.mainform.submit();">'; |
||
194 | |||
195 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
||
196 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
||
197 | |||
8 | daniel-mar | 198 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a> |
2 | daniel-mar | 199 | |
200 | </form>'; |
||
201 | |||
202 | echo $footer; |
||
203 | |||
204 | } |
||
205 | |||
3 | daniel-mar | 206 | ?> |