Rev 3 | 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 == 'edit') |
||
6 | { |
||
7 | $res = db_query("SELECT `user` FROM `".$mysql_zugangsdaten['praefix']."ordner` WHERE `id` = '".db_escape($folder)."'"); |
||
8 | $row = db_fetch($res); |
||
9 | if ($row['user'] != $benutzer['id']) |
||
10 | $folder = 0; |
||
11 | |||
12 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."kontakte` SET `name` = '".db_escape($name)."', `strasse` = '".db_escape($strasse)."', `plz` = '".db_escape($plz)."', `ort` = '".db_escape($ort)."', `land` = '".db_escape($land)."', `telefon` = '".$telefon1.'-'.$telefon2."', `mobil` = '".$mobil1.'-'.$mobil2."', `fax` = '".$fax1.'-'.$fax2."', `email` = '".db_escape($email)."', `icq` = '".db_escape($icq)."', `msn` = '".db_escape($msn)."', `aim` = '".db_escape($aim)."', `yahoo` = '".db_escape($yahoo)."', `kommentare` = '".db_escape($kommentare)."', `folder` = '".db_escape($folder)."', `skype` = '".db_escape($skype)."' WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
||
13 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul); |
||
14 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&danach='.$danach); |
||
15 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&folder='.$folder.'&danach='.$danach); |
||
16 | } |
||
17 | |||
18 | if ($aktion == 'new') |
||
19 | { |
||
20 | $res = db_query("SELECT `user` FROM `".$mysql_zugangsdaten['praefix']."ordner` WHERE `id` = '".db_escape($folder)."'"); |
||
21 | $row = db_fetch($res); |
||
22 | if ($row['user'] != $benutzer['id']) |
||
23 | $folder = 0; |
||
24 | |||
25 | db_query("INSERT INTO `".$mysql_zugangsdaten['praefix']."kontakte` (`name`, `strasse`, `plz`, `ort`, `land`, `telefon`, `mobil`, `fax`, `email`, `icq`, `msn`, `aim`, `yahoo`, `kommentare`, `skype`, `user`, `folder`) VALUES ('".db_escape($name)."', '".db_escape($strasse)."', '".db_escape($plz)."', '".db_escape($ort)."', '".db_escape($land)."', '".$telefon1.'-'.$telefon2."', '".$mobil1.'-'.$mobil2."', '".$fax1.'-'.$fax2."', '".db_escape($email)."', '".db_escape($icq)."', '".db_escape($msn)."', '".db_escape($aim)."', '".db_escape($yahoo)."', '".db_escape($kommentare)."', '".db_escape($skype)."', '".$benutzer['id']."', '".db_escape($folder)."')"); |
||
26 | if ($danach == 'A') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul); |
||
27 | if ($danach == 'B') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&danach='.$danach); |
||
28 | if ($danach == 'C') if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&folder='.$folder.'&danach='.$danach); |
||
29 | } |
||
30 | |||
31 | if ($aktion == 'delete') |
||
32 | { |
||
33 | db_query("DELETE FROM `".$mysql_zugangsdaten['praefix']."kontakte` WHERE `id` = '".db_escape($id)."' AND `user` = '".$benutzer['id']."'"); |
||
34 | if (db_affected_rows() > 0) |
||
35 | db_query("OPTIMIZE TABLE `".$mysql_zugangsdaten['praefix']."kontakte`"); |
||
36 | |||
37 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.$modul); |
||
38 | } |
||
39 | |||
3 | daniel-mar | 40 | ?> |