Rev 4 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 8 | ||
---|---|---|---|
Line 3... | Line 3... | ||
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 == 'edit') |
5 | if ($aktion == 'edit') |
6 | { |
6 | { |
7 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."kalender` SET `name` = '".db_escape($name)."', `start_date` = '".$datum3.'-'.$datum2.'-'.$datum1."', `start_time` = '".$zeit1.':'.$zeit2.':00'."', `kommentare` = '".db_escape($kommentare)."' WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
7 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."kalender` SET `name` = '".db_escape($name)."', `start_date` = '".$datum3.'-'.$datum2.'-'.$datum1."', `start_time` = '".$zeit1.':'.$zeit2.':00'."', `kommentare` = '".db_escape($kommentare)."' WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
8 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul); |
8 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul)); |
9 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=auflistung&modul='.$modul); |
9 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=auflistung&modul='.urlencode($modul)); |
10 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&danach='.$danach); |
10 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.urlencode($modul).'&aktion=new&danach='.urlencode($danach)); |
11 | } |
11 | } |
12 | 12 | ||
13 | if ($aktion == 'new') |
13 | if ($aktion == 'new') |
14 | { |
14 | { |
15 | db_query("INSERT INTO `".$mysql_zugangsdaten['praefix']."kalender` (`name`, `start_date`, `start_time`, `kommentare`, `user`) VALUES ('".db_escape($name)."', '".$datum3.'-'.$datum2.'-'.$datum1."', '".$zeit1.':'.$zeit2.':00'."', '".db_escape($kommentare)."', '".$benutzer['id']."')"); |
15 | db_query("INSERT INTO `".$mysql_zugangsdaten['praefix']."kalender` (`name`, `start_date`, `start_time`, `kommentare`, `user`) VALUES ('".db_escape($name)."', '".$datum3.'-'.$datum2.'-'.$datum1."', '".$zeit1.':'.$zeit2.':00'."', '".db_escape($kommentare)."', '".$benutzer['id']."')"); |
16 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul); |
16 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul)); |
17 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=auflistung&modul='.$modul); |
17 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=auflistung&modul='.urlencode($modul)); |
18 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&herkunft='.$herkunft.'&modul='.$modul.'&aktion=new&danach='.$danach); |
18 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&herkunft='.urlencode($herkunft).'&modul='.urlencode($modul).'&aktion=new&danach='.urlencode($danach)); |
19 | } |
19 | } |
20 | 20 | ||
21 | if ($aktion == 'delete') |
21 | if ($aktion == 'delete') |
22 | { |
22 | { |
23 | db_query("DELETE FROM `".$mysql_zugangsdaten['praefix']."kalender` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
23 | db_query("DELETE FROM `".$mysql_zugangsdaten['praefix']."kalender` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
24 | if (db_affected_rows() > 0) |
24 | if (db_affected_rows() > 0) |
25 | db_query("OPTIMIZE TABLE `".$mysql_zugangsdaten['praefix']."kalender`"); |
25 | db_query("OPTIMIZE TABLE `".$mysql_zugangsdaten['praefix']."kalender`"); |
26 | 26 | ||
27 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite='.$zurueck.'&modul='.$modul); |
27 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite='.urlencode($zurueck).'&modul='.urlencode($modul)); |
28 | } |
28 | } |
29 | 29 | ||
30 | ?> |
30 | ?> |