![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: do_sysval_aed.php 102 2008-03-18 19:52:59Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/system/syskeys/do_sysval_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('system', 'edit')) { 9 $AppUI->redirect('m=public&a=access_denied'); 10 } 11 12 $obj = new CSysVal(); 13 $post = array('sysval_title' => w2PgetParam($_POST, 'sysval_title'), 'sysval_key_id' => w2PgetParam($_POST, 'sysval_key_id'), 'sysval_value' => w2PgetParam($_POST, 'sysval_value'), ); 14 $svid = array('sysval_title' => w2PgetParam($_POST, 'sysval_id')); 15 16 if (isset($_POST['del']) && $del = $_POST['del']) { 17 if (!$obj->bind($svid)) { 18 $AppUI->setMsg($obj->getError(), UI_MSG_ERROR); 19 $AppUI->redirect(); 20 } 21 } else { 22 $del = 0; 23 if (!$obj->bind($post)) { 24 $AppUI->setMsg($obj->getError(), UI_MSG_ERROR); 25 $AppUI->redirect(); 26 } 27 } 28 29 $AppUI->setMsg('System Lookup Values', UI_MSG_ALERT); 30 if ($del) { 31 if (($msg = $obj->delete())) { 32 $AppUI->setMsg($msg, UI_MSG_ERROR); 33 } else { 34 $AppUI->setMsg('deleted', UI_MSG_ALERT, true); 35 } 36 } else { 37 if (($msg = $obj->store())) { 38 $AppUI->setMsg($msg, UI_MSG_ERROR); 39 } else { 40 $AppUI->setMsg($_POST['sysval_id'] ? 'updated' : 'inserted', UI_MSG_OK, true); 41 } 42 } 43 $AppUI->redirect('m=system&u=syskeys'); 44 ?>
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 |