home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / modules / system / syskeys / do_syskey_aed.php next >
Encoding:
PHP Script  |  2003-04-25  |  719 b   |  26 lines

  1. <?php /* SYSKEYS $Id: do_syskey_aed.php,v 1.4 2003/04/24 19:08:28 eddieajau Exp $ */
  2. $del = isset($_POST['del']) ? $_POST['del'] : 0;
  3.  
  4. $obj = new CSysKey();
  5.  
  6. if (!$obj->bind( $_POST )) {
  7.     $AppUI->setMsg( $obj->getError(), UI_MSG_ERROR );
  8.     $AppUI->redirect();
  9. }
  10.  
  11. $AppUI->setMsg( "System Lookup Keys", UI_MSG_ALERT );
  12. if ($del) {
  13.     if (($msg = $obj->delete())) {
  14.         $AppUI->setMsg( $msg, UI_MSG_ERROR );
  15.     } else {
  16.         $AppUI->setMsg( "deleted", UI_MSG_ALERT, true );
  17.     }
  18. } else {
  19.     if (($msg = $obj->store())) {
  20.         $AppUI->setMsg( $msg, UI_MSG_ERROR );
  21.     } else {
  22.         $AppUI->setMsg( @$_POST['syskey_id'] ? 'updated' : 'inserted', UI_MSG_OK, true );
  23.     }
  24. }
  25. $AppUI->redirect( "m=system&u=syskeys&a=keys" );
  26. ?>