Exemplo n.º 1
0
* GNU General Public License
* Copyright 2002,2003,2004,2005 Elpidio Latorilla
* elpidio@care2x.org, 
*
* See the file "copy_notice.txt" for the licence notice
*/
//define('LANG_FILE','doctors.php');
if ($_SESSION['sess_user_origin'] == 'personell_admin') {
    $local_user = '******';
} else {
    $local_user = '******';
}
require_once $root_path . 'include/inc_front_chain_lang.php';
require_once $root_path . 'include/care_api_classes/class_personell.php';
$pers_obj = new Personell();
$pers_obj->useAssignmentTable();
$data = array();
//$db->debug=true;
if ($mode != 'delete') {
    $data['personell_nr'] = $nr;
    $data['role_nr'] = 16;
    // 16 = nurse (role person)
    $data['location_type_nr'] = 1;
    // 1 = dept (location type)
    $data['location_nr'] = $dept_nr;
    $data['date_start'] = date('Y-m-d');
}
$data['modify_id'] = $_SESSION['sess_user_name'];
switch ($mode) {
    case 'save':
        $data['history'] = "Add: " . date('Y-m-d H:i:s') . " = " . $_SESSION['sess_user_name'] . "\n";