home *** CD-ROM | disk | FTP | other *** search
- <?php /* ADMIN $Id: do_perms_aed.php,v 1.3 2003/05/08 06:47:24 eddieajau Exp $ */
- $del = isset($_POST['del']) ? $_POST['del'] : 0;
-
- $obj = new CPermission();
-
- if (!$obj->bind( $_POST )) {
- $AppUI->setMsg( $obj->getError(), UI_MSG_ERROR );
- $AppUI->redirect();
- }
-
- $AppUI->setMsg( 'Permission' );
- if ($del) {
- if (($msg = $obj->delete())) {
- $AppUI->setMsg( $msg, UI_MSG_ERROR );
- $AppUI->redirect();
- } else {
- $AppUI->setMsg( "deleted", UI_MSG_ALERT, true );
- $AppUI->redirect();
- }
- } else {
- $isNotNew = @$_POST['permission_id'];
- if (($msg = $obj->store())) {
- $AppUI->setMsg( $msg, UI_MSG_ERROR );
- } else {
- $AppUI->setMsg( $isNotNew ? 'updated' : 'added', UI_MSG_OK, true );
- }
- $AppUI->redirect();
- }
- ?>