![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: do_billingcode_aed.php 40 2008-02-11 12:11:44Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/system/do_billingcode_aed.php $ */ 2 if (!defined('W2P_BASE_DIR')) { 3 die('You should not access this file directly.'); 4 } 5 6 $del = isset($_POST['del']) ? $_POST['del'] : 0; 7 $edit = isset($_POST['edit']) ? $_POST['edit'] : 0; 8 9 $perms = &$AppUI->acl(); 10 if (!$perms->checkModule('system', 'edit')) { 11 $AppUI->redirect('m=public&a=access_denied'); 12 } 13 14 $obj = new bcode(); 15 $obj->_billingcode_id = isset($_POST['billingcode_id']) ? $_POST['billingcode_id'] : 0; 16 17 // prepare (and translate) the module name ready for the suffix 18 $AppUI->setMsg('Billing Codes'); 19 if ($del) { 20 if (($msg = $obj->delete())) { 21 $AppUI->setMsg($msg, UI_MSG_ERROR); 22 } else { 23 $AppUI->setMsg('deleted', UI_MSG_ALERT, true); 24 } 25 } else { 26 if ($edit) { 27 $obj->_billingcode_id = $edit; 28 } 29 30 $obj->billingcode_value = $_REQUEST['billingcode_value']; 31 $obj->billingcode_name = $_REQUEST['billingcode_name']; 32 $obj->billingcode_desc = $_REQUEST['billingcode_desc']; 33 $obj->company_id = w2PgetParam($_REQUEST, 'company_id', null); 34 35 if (($msg = $obj->store())) { 36 $AppUI->setMsg($msg, UI_MSG_ERROR); 37 } else { 38 $AppUI->setMsg('updated', UI_MSG_OK, true); 39 } 40 } 41 42 $AppUI->redirect('m=system&a=billingcode&company_id=' . w2PgetParam($_REQUEST, 'company_id', null)); 43 ?>
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 |