Example #1
0
//$db->debug=true;
if ($user->getConfig($_COOKIE['ck_config'])) {
    $config =& $user->getConfigData();
} else {
    $config = array();
}
/* Load the dept object */
require_once $root_path . 'include/care_api_classes/class_department.php';
$dept = new Department();
$depts =& $dept->getAllActive();
// Load the ward object and wards info
require_once $root_path . 'include/care_api_classes/class_ward.php';
$ward_obj = new Ward();
$items = 'nr,ward_id,name';
// set the items to be fetched
$ward_info =& $ward_obj->getAllWardsItemsArray($items);
if (isset($mode) && $mode == 'save') {
    $config['thispc_dept_nr'] = $_POST['thispc_dept_nr'];
    $config['thispc_ward_nr'] = $_POST['thispc_ward_nr'];
    $config['thispc_room_nr'] = $_POST['thispc_room_nr'];
    $config['thispc_phone'] = $_POST['thispc_phone'];
    $config['thispc_intercom'] = $_POST['thispc_intercom'];
    $user->saveConfig($_COOKIE['ck_config'], $config);
    header("location: login-pc-config.php?sid={$sid}&lang={$lang}&saved=1");
    exit;
}
# Start Smarty templating here
/**
 * LOAD Smarty
 */
# Note: it is advisable to load this after the inc_front_chain_lang.php so