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 Termin</h1>'; |
9 | if ($aktion == 'new') echo '<h1>Neuer Termin</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Termin bearbeiten</h1>'; |
10 | if ($aktion == 'edit') echo '<h1>Termin bearbeiten</h1>'; |
11 | 11 | ||
12 | if ($aktion == 'edit') |
12 | if ($aktion == 'edit') |
13 | { |
13 | { |
14 | $res = db_query("SELECT * FROM ".$mysql_zugangsdaten['praefix']."kalender WHERE id = '".db_escape($id)."' AND user = '".$benutzer['id']."'"); |
14 | $res = db_query("SELECT * FROM ".$mysql_zugangsdaten['praefix']."kalender 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 | $start_date = (isset($row['start_date'])) ? $row['start_date'] : '0000-00-00'; |
20 | $start_date = (isset($row['start_date'])) ? $row['start_date'] : '0000-00-00'; |
21 | $ary1 = explode('-', $start_date); |
21 | $ary1 = explode('-', $start_date); |
22 | $datum1 = $ary1[2]; |
22 | $datum1 = $ary1[2]; |
23 | $datum2 = $ary1[1]; |
23 | $datum2 = $ary1[1]; |
24 | $datum3 = $ary1[0]; |
24 | $datum3 = $ary1[0]; |
25 | $start_time = (isset($row['start_time'])) ? $row['start_time'] : '00:00:00'; |
25 | $start_time = (isset($row['start_time'])) ? $row['start_time'] : '00:00:00'; |
26 | $ary2 = explode(':', $start_time); |
26 | $ary2 = explode(':', $start_time); |
27 | $zeit1 = $ary2[0]; |
27 | $zeit1 = $ary2[0]; |
28 | $zeit2 = $ary2[1]; |
28 | $zeit2 = $ary2[1]; |
29 | $kommentare = (isset($row['kommentare'])) ? $row['kommentare'] : ''; |
29 | $kommentare = (isset($row['kommentare'])) ? $row['kommentare'] : ''; |
30 | } |
30 | } |
31 | else |
31 | else |
32 | { |
32 | { |
33 | $name = ''; |
33 | $name = ''; |
34 | $timestamp = ''; |
34 | $timestamp = ''; |
35 | $kommentare = ''; |
35 | $kommentare = ''; |
36 | $zeit1 = ''; |
36 | $zeit1 = ''; |
37 | $zeit2 = ''; |
37 | $zeit2 = ''; |
38 | $datum1 = ''; |
38 | $datum1 = ''; |
39 | $datum2 = date("m"); |
39 | $datum2 = date("m"); |
40 | $datum3 = date("Y"); |
40 | $datum3 = date("Y"); |
41 | } |
41 | } |
42 | 42 | ||
43 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
43 | echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'"> |
44 | <input type="hidden" name="seite" value="kraftsetzung"> |
44 | <input type="hidden" name="seite" value="kraftsetzung"> |
45 | <input type="hidden" name="herkunft" value="'.$herkunft.'"> |
45 | <input type="hidden" name="herkunft" value="'.$herkunft.'"> |
46 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
46 | <input type="hidden" name="aktion" value="'.$aktion.'"> |
47 | <input type="hidden" name="modul" value="'.$modul.'">'; |
47 | <input type="hidden" name="modul" value="'.$modul.'">'; |
48 | 48 | ||
49 | if ($aktion == 'edit') |
49 | if ($aktion == 'edit') |
50 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
50 | echo '<input type="hidden" name="id" value="'.$id.'">'; |
51 | 51 | ||
52 | if (!isset($danach)) $danach = 'A'; |
52 | if (!isset($danach)) $danach = 'A'; |
53 | 53 | ||
54 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
54 | echo '<table cellspacing="0" cellpadding="0" border="0"> |
55 | <tr> |
55 | <tr> |
56 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
56 | <td colspan="2"><b>Allgemeine Informationen</b><br><br></td> |
57 | </tr> |
57 | </tr> |
58 | <tr> |
58 | <tr> |
59 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
59 | <td valign="top">Name:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
60 | <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> |
60 | <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> |
61 | </tr> |
61 | </tr> |
62 | <tr> |
62 | <tr> |
63 | <td colspan="2"><br><b>Detailierte Informationen</b><br><br></td> |
63 | <td colspan="2"><br><b>Detailierte Informationen</b><br><br></td> |
64 | </tr> |
64 | </tr> |
65 | <tr> |
65 | <tr> |
66 | <td valign="top">Datum:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
66 | <td valign="top">Datum:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
67 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum1" value="'.$datum1.'" size="3"> . <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum2" value="'.$datum2.'" size="3"> . <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum3" value="'.$datum3.'" size="6"></td> |
67 | <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum1" value="'.$datum1.'" size="3"> . <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum2" value="'.$datum2.'" size="3"> . <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="datum3" value="'.$datum3.'" size="6"></td> |
68 | </tr> |
68 | </tr> |
69 | <tr> |
69 | <tr> |
70 | <td valign="top"><br>Uhrzeit:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
70 | <td valign="top"><br>Uhrzeit:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
71 | <td valign="top"><br><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="zeit1" value="'.$zeit1.'" size="3"> : <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="zeit2" value="'.$zeit2.'" size="3"></td> |
71 | <td valign="top"><br><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="zeit1" value="'.$zeit1.'" size="3"> : <input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="zeit2" value="'.$zeit2.'" size="3"></td> |
72 | </tr> |
72 | </tr> |
73 | <tr> |
73 | <tr> |
74 | <td colspan="2"><br></td> |
74 | <td colspan="2"><br></td> |
75 | </tr> |
75 | </tr> |
76 | <tr> |
76 | <tr> |
77 | <td valign="top">Kommentare:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
77 | <td valign="top">Kommentare:<img src="design/spacer.gif" height="1" width="35" alt=""></td> |
78 | <td valign="top"><textarea name="kommentare" cols="40" rows="8">'.$kommentare.'</textarea></td> |
78 | <td valign="top"><textarea name="kommentare" cols="40" rows="8">'.$kommentare.'</textarea></td> |
79 | </tr> |
79 | </tr> |
80 | <tr> |
80 | <tr> |
81 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
81 | <td colspan="2"><br><b>Nach Speicherung</b><br><br></td> |
82 | </tr> |
82 | </tr> |
83 | <tr> |
83 | <tr> |
84 | <td valign="top">Aktion: </td> |
84 | <td valign="top">Aktion: </td> |
85 | <td><select name="danach"> |
85 | <td><select name="danach"> |
86 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zur Wochenauflistung</option> |
86 | <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zurück zur Wochenauflistung</option> |
87 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Zurück zur Terminauflistung</option> |
87 | <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Zurück zur Terminauflistung</option> |
88 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag</option> |
88 | <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag</option> |
89 | </select></td> |
89 | </select></td> |
90 | </tr> |
90 | </tr> |
91 | </table><br> |
91 | </table><br> |
92 | <a href="javascript:document.mainform.submit();">'; |
92 | <a href="javascript:document.mainform.submit();">'; |
93 | 93 | ||
94 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
94 | if ($aktion == 'new') echo 'Eintragung hinzufügen'; |
95 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
95 | if ($aktion == 'edit') echo 'Eintragung aktualisieren'; |
96 | 96 | ||
97 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite='.$herkunft.'&modul='.$modul.'">Zurück</a> |
97 | echo '</a> | <a href="'.$_SERVER['PHP_SELF'].'?seite='.urlencode($herkunft).'&modul='.urlencode($modul).'">Zurück</a> |
98 | 98 | ||
99 | </form>'; |
99 | </form>'; |
100 | 100 | ||
101 | echo $footer; |
101 | echo $footer; |
102 | } |
102 | } |
103 | 103 | ||
104 | ?> |
104 | ?> |
105 | 105 |