コード例 #1
0
ファイル: functions.php プロジェクト: juslee/e27
function redirectfromlogin()
{
    $userACL = new ACL($_SESSION['userID']);
    if ($userACL->hasPermission('access_admin') === true) {
        echo "user has admin access";
        header("Location: ../admin/index.php");
    } else {
        if ($userACL->hasPermission('login_staff') === true) {
            echo "must be staff so send to staff webpage";
            header("Location: http://www.10dd.co/admin/_staff.php");
        } else {
            if ($userACL->hasPermission('login_client') === true) {
                echo "must be client so send to client webpage";
                header("Location: http://www.10dd.co/admin/_client.php");
            } else {
                if ($userACL->hasPermission('login_vendor') === true) {
                    echo "must be vendor so send to vendor webpage";
                    header("Location: http://www.10dd.co/admin/_vendor.php");
                } else {
                    if ($userACL->hasPermission('basic_user') === true) {
                        echo "must be vendor so send to vendor webpage";
                        header("Location: http://www.10dd.co/admin/_vendor.php");
                    } else {
                        echo "must not have access";
                        header("Location: http://www.10dd.co/admin/insufficientrights.php");
                    }
                }
            }
        }
    }
}
コード例 #2
0
ファイル: Encounter.php プロジェクト: igez/gaiaehr
 /**
  * @param stdClass $params
  * @return array
  */
 public function signEncounter(stdClass $params)
 {
     $this->setEid($params->eid);
     /** verify permissions (sign encounter and supervisor) */
     if (!ACL::hasPermission('sign_enc') || $params->isSupervisor && !ACL::hasPermission('sign_enc_supervisor')) {
         return ['success' => false, 'error' => 'access_denied'];
     }
     $user = new User();
     if ($params->isSupervisor) {
         if ($params->supervisor_uid != $_SESSION['user']['id']) {
             unset($user);
             return ['success' => false, 'error' => 'supervisor_does_not_match_user'];
         }
         if (!$user->verifyUserPass($params->signature, $params->supervisor_uid)) {
             unset($user);
             return ['success' => false, 'error' => 'incorrect_password'];
         }
     } else {
         if (!$user->verifyUserPass($params->signature)) {
             unset($user);
             return ['success' => false, 'error' => 'incorrect_password'];
         }
     }
     unset($user);
     if ($params->isSupervisor) {
         $params->close_date = date('Y-m-d H:i:s');
     } else {
         $params->provider_uid = $_SESSION['user']['id'];
         if (!ACL::hasPermission('require_enc_supervisor')) {
             $params->close_date = date('Y-m-d H:i:s');
         }
     }
     $data = $this->updateEncounter($params);
     return ['success' => true, 'data' => $data];
 }
コード例 #3
0
 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = array(array('text' => $this->t['dashboard'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_dashboard') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'panelDashboard'), array('text' => $this->t['calendar'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_calendar') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoCalendar', 'id' => 'panelCalendar'), array('text' => $this->t['messages'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_messages') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'mail', 'id' => 'panelMessages'), array('text' => $this->t['patient_Search'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_search') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'searchUsers', 'id' => 'panelPatientSearch'));
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Patient', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => $this->t['new_patient'][$this->lang], 'disabled' => $this->ACL->hasPermission('add_patient') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelNewPatient'), array('text' => $this->t['patient_summary'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_summary') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelSummary'), array('text' => $this->t['visist_history'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_visits') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisits'), array('text' => $this->t['encounter'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_encounters') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelEncounter'))));
     // *************************************************************************************
     // Fees Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Fees', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => $this->t['billing'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelBilling'), array('text' => $this->t['checkout'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelCheckout'), array('text' => $this->t['fees_sheet'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFeesSheet'), array('text' => $this->t['payment'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPayments'))));
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     if ($this->ACL->hasPermission('access_gloabal_settings') || $this->ACL->hasPermission('access_facilities') || $this->ACL->hasPermission('access_users') || $this->ACL->hasPermission('access_practice') || $this->ACL->hasPermission('access_services') || $this->ACL->hasPermission('access_roles') || $this->ACL->hasPermission('access_layouts') || $this->ACL->hasPermission('access_lists') || $this->ACL->hasPermission('access_event_log')) {
         array_push($nav, array('text' => 'Administration', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => 'Global Settings', 'disabled' => $this->ACL->hasPermission('access_gloabal_settings') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelGlobals'), array('text' => 'Facilities', 'disabled' => $this->ACL->hasPermission('access_facilities') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelFacilities'), array('text' => 'Users', 'disabled' => $this->ACL->hasPermission('access_users') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelUsers'), array('text' => 'Practice', 'disabled' => $this->ACL->hasPermission('access_practice') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelPractice'), array('text' => 'Services', 'disabled' => $this->ACL->hasPermission('access_services') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelServices'), array('text' => 'Roles', 'disabled' => $this->ACL->hasPermission('access_roles') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelRoles'), array('text' => 'Layouts', 'disabled' => $this->ACL->hasPermission('access_layouts') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLayout'), array('text' => 'Lists', 'disabled' => $this->ACL->hasPermission('access_lists') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLists'), array('text' => 'Event Log', 'disabled' => $this->ACL->hasPermission('access_event_log') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLog'))));
     }
     // *************************************************************************************
     // Miscellaneous Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Miscellaneous', 'cls' => 'folder', 'expanded' => true, 'children' => array(array('text' => 'Web Search', 'leaf' => true, 'cls' => 'file', 'id' => 'panelWebsearch'), array('text' => 'Address Book', 'leaf' => true, 'cls' => 'file', 'id' => 'panelAddressbook'), array('text' => 'Office Notes', 'leaf' => true, 'cls' => 'file', 'id' => 'panelOfficeNotes'), array('text' => 'My Settings', 'leaf' => true, 'cls' => 'file', 'id' => 'panelMySettings'), array('text' => 'My Account', 'leaf' => true, 'cls' => 'file', 'id' => 'panelMyAccount'))));
     return $nav;
 }
コード例 #4
0
 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = array(array('text' => $this->i18n['dashboard'], 'disabled' => $this->ACL->hasPermission('access_dashboard') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'panelDashboard'), array('text' => $this->i18n['calendar'], 'disabled' => $this->ACL->hasPermission('access_calendar') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoCalendar', 'id' => 'panelCalendar'), array('text' => $this->i18n['messages'], 'disabled' => $this->ACL->hasPermission('access_messages') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'mail', 'id' => 'panelMessages'), array('text' => $this->i18n['area_floor_plan'], 'disabled' => false, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoZoneAreas', 'id' => 'panelAreaFloorPlan'), array('text' => $this->i18n['patient_pool_areas'], 'disabled' => false, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoPoolArea16', 'id' => 'panelPoolArea'));
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     $patient = array('text' => $this->i18n['patient'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationPatient');
     if ($this->ACL->hasPermission('add_patient')) {
         $patient['children'][] = array('text' => $this->i18n['new_patient'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelNewPatient');
     }
     if ($this->ACL->hasPermission('access_patient_summary')) {
         $patient['children'][] = array('text' => $this->i18n['patient_summary'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelSummary');
     }
     if ($this->ACL->hasPermission('access_patient_visits')) {
         $patient['children'][] = array('text' => $this->i18n['visits_history'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisits');
     }
     if ($this->ACL->hasPermission('access_encounters')) {
         $patient['children'][] = array('text' => $this->i18n['encounter'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelEncounter');
     }
     if ($this->ACL->hasPermission('access_visit_checkout')) {
         $patient['children'][] = array('text' => $this->i18n['visit_checkout'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisitCheckout');
     }
     array_push($nav, $patient);
     // *************************************************************************************
     // Billing Manager Folder
     // *************************************************************************************
     array_push($nav, array('text' => $this->i18n['billing_manager'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationBilling', 'children' => array(array('text' => $this->i18n['payment'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPayments'), array('text' => $this->i18n['billing'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelBilling'))));
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     $admin = array('text' => $this->i18n['administration'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationAdministration');
     if ($this->ACL->hasPermission('access_gloabal_settings')) {
         $admin['children'][] = array('text' => $this->i18n['global_settings'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelGlobals');
     }
     if ($this->ACL->hasPermission('access_facilities')) {
         $admin['children'][] = array('text' => $this->i18n['facilities'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFacilities');
     }
     if ($this->ACL->hasPermission('access_users')) {
         $admin['children'][] = array('text' => $this->i18n['users'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelUsers');
     }
     if ($this->ACL->hasPermission('access_practice')) {
         $admin['children'][] = array('text' => $this->i18n['practice'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPractice');
     }
     if ($this->ACL->hasPermission('access_data_manager')) {
         $admin['children'][] = array('text' => $this->i18n['data_manager'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelDataManager');
     }
     if ($this->ACL->hasPermission('access_preventive_care')) {
         $admin['children'][] = array('text' => $this->i18n['preventive_care'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPreventiveCare');
     }
     //		if($this->ACL->hasPermission('access_medications')){
     //			$admin['children'][] = array(
     //				'text' => $this->i18n['medications'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMedications'
     //			);
     //		}
     if ($this->ACL->hasPermission('access_floor_plans')) {
         $admin['children'][] = array('text' => $this->i18n['floor_areas'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFloorPlans');
     }
     if ($this->ACL->hasPermission('access_roles')) {
         $admin['children'][] = array('text' => $this->i18n['roles'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelRoles');
     }
     if ($this->ACL->hasPermission('access_layouts')) {
         $admin['children'][] = array('text' => $this->i18n['layouts'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLayout');
     }
     if ($this->ACL->hasPermission('access_lists')) {
         $admin['children'][] = array('text' => $this->i18n['lists'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLists');
     }
     if ($this->ACL->hasPermission('access_event_log')) {
         $admin['children'][] = array('text' => $this->i18n['event_log'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLog');
     }
     if ($this->ACL->hasPermission('access_documents')) {
         $admin['children'][] = array('text' => $this->i18n['documents'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelDocuments');
     }
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['external_data_loads'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelExternalDataLoads');
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['applications'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelApplications');
     //}
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['modules'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelModules');
     //}
     if ($this->ACL->hasPermission('access_gloabal_settings') || $this->ACL->hasPermission('access_facilities') || $this->ACL->hasPermission('access_users') || $this->ACL->hasPermission('access_practice') || $this->ACL->hasPermission('access_services') || $this->ACL->hasPermission('access_medications') || $this->ACL->hasPermission('access_floor_plans') || $this->ACL->hasPermission('access_roles') || $this->ACL->hasPermission('access_layouts') || $this->ACL->hasPermission('access_lists') || $this->ACL->hasPermission('access_event_log')) {
         array_push($nav, $admin);
     }
     // *************************************************************************************
     // Miscellaneous Folder
     // *************************************************************************************
     array_push($nav, array('text' => $this->i18n['miscellaneous'], 'cls' => 'folder', 'expanded' => false, 'id' => 'navigationMiscellaneous', 'children' => array(array('text' => $this->i18n['web_search'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelWebsearch'), array('text' => $this->i18n['address_book'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelAddressbook'), array('text' => $this->i18n['office_notes'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelOfficeNotes'), array('text' => $this->i18n['my_settings'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMySettings'), array('text' => $this->i18n['my_account'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMyAccount'))));
     return $nav;
 }
コード例 #5
0
ファイル: Navigation.php プロジェクト: igez/gaiaehr
 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = [];
     $nav[] = ['text' => $this->i18n('dashboard'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'App.view.dashboard.Dashboard'];
     //		if($this->ACL->hasPermission('access_calendar')){
     //			$nav[] = array(
     //				'text' => $this->i18n('calendar'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'iconCls' => 'icoCalendar',
     //				'id' => 'App.view.calendar.Calendar'
     //			);
     //		}
     //		if($this->ACL->hasPermission('access_messages')){
     //			$nav[] = array(
     //				'text' => $this->i18n('messages'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'iconCls' => 'mail',
     //				'id' => 'App.view.messages.Messages'
     //			);
     //		}
     //		$nav[] = array(
     //			'text' => $this->i18n('patient_search'),
     //			'disabled' => !$this->ACL->hasPermission('access_patient_search'),
     //			'leaf' => true,
     //			'cls' => 'file',
     //			'iconCls' => 'searchUsers',
     //			'id' => 'panelPatientSearch'
     //		);
     if ($this->ACL->hasPermission('access_floor_plan_panel')) {
         $nav[] = ['text' => $this->i18n('area_floor_plan'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoZoneAreas', 'id' => 'App.view.areas.FloorPlan'];
     }
     if ($this->ACL->hasPermission('access_pool_areas_panel')) {
         $nav[] = ['text' => $this->i18n('patient_pool_areas'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoPoolArea16', 'id' => 'App.view.areas.PatientPoolAreas'];
     }
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     $patient = ['text' => $this->i18n('patient'), 'cls' => 'folder', 'expanded' => true, 'iconCls' => 'icoLogo', 'id' => 'patient'];
     if ($this->ACL->hasPermission('add_patient')) {
         $patient['children'][] = ['text' => $this->i18n('new_patient'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.NewPatient'];
     }
     if ($this->ACL->hasPermission('access_patient_summary')) {
         $patient['children'][] = ['text' => $this->i18n('patient_summary'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Summary'];
     }
     if ($this->ACL->hasPermission('access_patient_visits')) {
         $patient['children'][] = ['text' => $this->i18n('visits_history'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Visits'];
     }
     if ($this->ACL->hasPermission('access_encounters')) {
         $patient['children'][] = ['text' => $this->i18n('encounter'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Encounter'];
     }
     if ($this->ACL->hasPermission('access_visit_checkout')) {
         $patient['children'][] = ['text' => $this->i18n('visit_checkout'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.VisitCheckout'];
     }
     array_push($nav, $patient);
     // *************************************************************************************
     // Billing Manager Folder
     // *************************************************************************************
     array_push($nav, ['text' => $this->i18n('billing_manager'), 'cls' => 'folder', 'expanded' => true, 'id' => 'billing', 'iconCls' => 'icoLogo', 'children' => [['text' => $this->i18n('payment'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.fees.Payments'], ['text' => $this->i18n('billing'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.fees.Billing']]]);
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     $admin = ['text' => $this->i18n('administration'), 'cls' => 'folder', 'expanded' => true, 'iconCls' => 'icoLogo', 'id' => 'administration'];
     if ($this->ACL->hasPermission('access_gloabal_settings')) {
         $admin['children'][] = ['text' => $this->i18n('global_settings'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Globals'];
     }
     //		if($this->ACL->hasPermission('access_facilities')){
     //			$admin['children'][] = array(
     //				'text' => $this->i18n('facilities'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'id' => 'App.view.administration.Facilities'
     //			);
     //		}
     if ($this->ACL->hasPermission('access_users')) {
         $admin['children'][] = ['text' => $this->i18n('users'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Users'];
     }
     if ($this->ACL->hasPermission('access_practice')) {
         $admin['children'][] = ['text' => $this->i18n('practice'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.practice.Practice'];
     }
     if ($this->ACL->hasPermission('access_data_manager')) {
         $admin['children'][] = ['text' => $this->i18n('data_manager'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.DataManager'];
     }
     if ($this->ACL->hasPermission('access_preventive_care')) {
         $admin['children'][] = ['text' => $this->i18n('decision_support'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.DecisionSupport'];
     }
     if ($this->ACL->hasPermission('access_floor_plans')) {
         $admin['children'][] = ['text' => $this->i18n('floor_areas'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.FloorPlans'];
     }
     if ($this->ACL->hasPermission('access_roles')) {
         $admin['children'][] = ['text' => $this->i18n('roles'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Roles'];
     }
     if ($this->ACL->hasPermission('access_layouts')) {
         $admin['children'][] = ['text' => $this->i18n('layouts'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Layout'];
     }
     if ($this->ACL->hasPermission('access_lists')) {
         $admin['children'][] = ['text' => $this->i18n('lists'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Lists'];
     }
     if ($this->ACL->hasPermission('access_admin_audit_log')) {
         $admin['children'][] = ['text' => $this->i18n('audit_log'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.AuditLog'];
     }
     if ($this->ACL->hasPermission('access_documents')) {
         $admin['children'][] = ['text' => $this->i18n('documents'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Documents'];
     }
     if ($this->ACL->hasPermission('access_admin_hl7')) {
         $admin['children'][] = ['text' => $this->i18n('hl7'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.HL7'];
     }
     if ($this->ACL->hasPermission('access_admin_external_data')) {
         $admin['children'][] = ['text' => $this->i18n('external_data_loads'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.ExternalDataLoads'];
     }
     if ($this->ACL->hasPermission('access_admin_applications')) {
         $admin['children'][] = ['text' => $this->i18n('applications'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Applications'];
     }
     if ($this->ACL->hasPermission('access_admin_modules')) {
         $admin['children'][] = ['text' => $this->i18n('modules'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Modules'];
     }
     if ($this->ACL->hasPermission('access_admin_encryption')) {
         $admin['children'][] = ['text' => $this->i18n('encryption'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Encryption'];
     }
     if ($this->ACL->hasPermission('access_admin_patients_export')) {
         $admin['children'][] = ['text' => $this->i18n('patients_export'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.DataPortability'];
     }
     if (isset($admin['children']) && count($admin['children']) > 0) {
         array_push($nav, $admin);
     }
     // *************************************************************************************
     // Miscellaneous Folder
     // *************************************************************************************
     $misc = ['text' => $this->i18n('miscellaneous'), 'cls' => 'folder', 'expanded' => true, 'iconCls' => 'icoLogo', 'id' => 'miscellaneous'];
     if ($this->ACL->hasPermission('amendments_access')) {
         $misc['children'][] = ['text' => $this->i18n('amendments'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.miscellaneous.Amendments'];
     }
     if ($this->ACL->hasPermission('access_web_search')) {
         $misc['children'][] = ['text' => $this->i18n('web_search'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.miscellaneous.Websearch'];
     }
     if ($this->ACL->hasPermission('access_address_book')) {
         $misc['children'][] = ['text' => $this->i18n('address_book'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.miscellaneous.AddressBook'];
     }
     if ($this->ACL->hasPermission('access_office_notes')) {
         $misc['children'][] = ['text' => $this->i18n('office_notes'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.miscellaneous.OfficeNotes'];
     }
     $misc['children'][] = ['text' => $this->i18n('my_account'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.miscellaneous.MyAccount'];
     if (isset($misc['children']) && count($misc['children']) > 0) {
         array_push($nav, $misc);
     }
     return $nav;
 }
コード例 #6
0
 * revision: N/A
 * author: Ernesto J Rodriguez
 *
 */
if (!isset($_SESSION)) {
    session_name("MitosEHR");
    session_start();
    session_cache_limiter('private');
}
include_once $_SESSION['site']['root'] . "/classes/ACL.php";
$ACL = new ACL();
?>

perm = {
    access_dashboard    : <?php 
print $ACL->hasPermission('access_dashboard') ? 'true' : 'false';
?>
,
    access_calendar     : <?php 
print $ACL->hasPermission('access_calendar') ? 'true' : 'false';
?>
,
    access_messages     : <?php 
print $ACL->hasPermission('access_messages') ? 'true' : 'false';
?>
,
    search_patient      : <?php 
print $ACL->hasPermission('search_patient') ? 'true' : 'false';
?>
,
コード例 #7
0
ファイル: users.php プロジェクト: juslee/e27
    ?>
)</h2>
							<form action="users.php" method="post">
								<table border="0" cellpadding="5" cellspacing="0">
									<tr>
										<th></th><th></th>
									</tr>
									<?php 
    $userACL = new ACL($_GET['userID']);
    $rPerms = $userACL->perms;
    $aPerms = $userACL->getAllPerms('full');
    foreach ($aPerms as $k => $v) {
        echo "\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>" . $v['Name'] . "</td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<select name=\"perm_" . $v['ID'] . "\">";
        echo "<option value=\"1\"";
        if ($userACL->hasPermission($v['Key']) && $rPerms[$v['Key']]['inheritted'] != true) {
            echo " selected=\"selected\"";
        }
        echo ">Allow</option>";
        echo "<option value=\"0\"";
        if ($rPerms[$v['Key']]['value'] === false && $rPerms[$v['Key']]['inheritted'] != true) {
            echo " selected=\"selected\"";
        }
        echo ">Deny</option>";
        echo "<option value=\"x\"";
        if ($rPerms[$v['Key']]['inheritted'] == true || !array_key_exists($v['Key'], $rPerms)) {
            echo " selected=\"selected\"";
            if ($rPerms[$v['Key']]['value'] === true) {
                $iVal = '(Allow)';
            } else {
                $iVal = '(Deny)';
コード例 #8
0
ファイル: login_index.php プロジェクト: juslee/e27
								<a href="admin/admin_index.php" class="user_admin">User Admin</a>
							</li>
						</ul>
					</div>

					<div class="clear"></div>
					<div id="table-content">
						<div id="page" style="text-align:left;">
							<h2>Permissions for </h2>
							<?php 
$userACL = new ACL($userID);
$aPerms = $userACL->getAllPerms('full');
foreach ($aPerms as $k => $v) {
    echo "<strong>" . $v['Name'] . ": </strong>";
    echo "<img src=\"../img/";
    if ($userACL->hasPermission($v['Key']) === true) {
        echo "allow.png";
        $pVal = "Allow";
    } else {
        echo "deny.png";
        $pVal = "Deny";
    }
    echo "\" width=\"16\" height=\"16\" alt=\"{$pVal}\" />\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t";
}
?>
							<h3>Change User:</h3>
							<?php 
$strSQL = "SELECT * FROM `users` ORDER BY `users_username` ASC";
$data = mysql_query($strSQL);
while ($row = mysql_fetch_assoc($data)) {
    echo "<a href=\"?userID=" . $row['users_id'] . "\">" . $row['users_username'] . "</a><br />";