Subversion Repositories personal-webbase

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
  4.  
  5. if ($aktion == 'edit')
  6. {
  7.         db_query("UPDATE `".$WBConfig->getMySQLPrefix()."calendar` 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_cnid` = '".$benutzer['id']."'");
  8.         if ($danach == 'A') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=main&modul='.$modul);
  9.         if ($danach == 'B') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=auflistung&modul='.$modul);
  10.         if ($danach == 'C') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=edit&modul='.$modul.'&aktion=new&danach='.$danach);
  11. }
  12.  
  13. if ($aktion == 'new')
  14. {
  15.         db_query("INSERT INTO `".$WBConfig->getMySQLPrefix()."calendar` (`name`, `start_date`, `start_time`, `kommentare`, `user_cnid`) VALUES ('".db_escape($name)."', '".$datum3.'-'.$datum2.'-'.$datum1."', '".$zeit1.':'.$zeit2.':00'."', '".db_escape($kommentare)."', '".$benutzer['id']."')");
  16.         if ($danach == 'A') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=main&modul='.$modul);
  17.         if ($danach == 'B') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=auflistung&modul='.$modul);
  18.         if ($danach == 'C') wb_redirect_now($_SERVER['PHP_SELF'].'?seite=edit&herkunft='.$herkunft.'&modul='.$modul.'&aktion=new&danach='.$danach);
  19. }
  20.  
  21. if ($aktion == 'delete')
  22. {
  23.         db_query("DELETE FROM `".$WBConfig->getMySQLPrefix()."calendar` WHERE `id` = '".db_escape($id)."' AND `user_cnid` = '".$benutzer['id']."'");
  24.         if (db_affected_rows() > 0)
  25.                 db_query("OPTIMIZE TABLE `".$WBConfig->getMySQLPrefix()."calendar`");
  26.  
  27.         wb_redirect_now($_SERVER['PHP_SELF'].'?seite='.$zurueck.'&modul='.$modul);
  28. }
  29.  
  30. ?>