![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: do_role_aed.php 102 2008-03-18 19:52:59Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/system/roles/do_role_aed.php $ */ 2 if (!defined('W2P_BASE_DIR')) { 3 die('You should not access this file directly.'); 4 } 5 6 // check permissions 7 $perms = &$AppUI->acl(); 8 if (!$perms->checkModule('roles', 'edit')) { 9 $AppUI->redirect('m=public&a=access_denied'); 10 } 11 12 $del = isset($_POST['del']) ? $_POST['del'] : 0; 13 14 $role = &new CRole(); 15 16 if (($msg = $role->bind($_POST))) { 17 $AppUI->setMsg($msg, UI_MSG_ERROR); 18 $AppUI->redirect(); 19 } 20 21 if ($del) { 22 if (($msg = $role->delete())) { 23 $AppUI->setMsg($msg, UI_MSG_ERROR); 24 } else { 25 $AppUI->setMsg('Role deleted', UI_MSG_ALERT); 26 } 27 } else { 28 if (($msg = $role->store())) { 29 $AppUI->setMsg($msg, UI_MSG_ERROR); 30 } else { 31 $isNotNew = $_POST['role_id']; 32 $AppUI->setMsg('Role ' . ($isNotNew ? 'updated' : 'inserted'), UI_MSG_OK); 33 } 34 } 35 $AppUI->redirect('m=system&u=roles'); 36 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jan 8 03:00:03 2009 | Cross-referenced by PHPXref 0.7 |