Example #1
0
if (!isset($_GET['page'])) {
    $render = true;
    $emp = $pro->getEmpByUserName($SESSION->user_name);
    $modules = $pro->getEmpModules($SESSION->user_name);
    $all_emps = $pro->getAllEmps();
    foreach ($all_emps as $key => $a) {
        if (file_exists(FS_IMAGES . "/users/" . $a['user_name'] . ".jpg")) {
            $all_emps[$key]['emp_image'] = "https://" . URL_IMAGES . "/users/" . $a['user_name'] . ".jpg";
        } else {
            $all_emps[$key]['emp_image'] = "https://" . URL_IMAGES . "/users/default.jpg";
        }
    }
    $all_depts = $pro->getAllDepts();
    $all_modules = $pro->getAllModules();
    $distinctModules = $pro->getDistinctModules();
    $all_user_modules = $pro->getAllUserModules();
    if (!empty($SESSION->department)) {
        $appointment_types = \Ventus\Utilities\Functions::listAppointmentTypes($SESSION->department);
    }
    $l10n->addResource(__DIR__ . '/l10n/profile.json');
    $l10n->localizeArray($appointment_types, 'label');
    $l10n->localizeArray($all_modules, 'name');
    $l10n->localizeArray($all_modules, 'description');
    $l10n->localizeArray($all_modules, 'service_name');
    $l10n->localizeArray($modules, 'name');
    $l10n->localizeArray($distinctModules, 'name');
    $l10n->localizeArray($all_emps, 'service_name');
    $l10n->localizeArray($all_depts, 'service_name');
    $l10n->localizeArray($emp[0], 'service_name');
    $viewFile = 'views/profile.php';
} elseif ($_GET['page'] === 'update-signature') {