示例#1
0
文件: calendar.php 项目: hughnguy/php
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
$cal = new Calendar($dbo);
$follow = new \Ventus\Specialist\FollowUps($dbo);
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    $thisPage = 'Calendar';
    $emps = \Ventus\Utilities\Functions::listEmployees(SERVICE_ID_ACCESS);
    $appointment_types = \Ventus\Utilities\Functions::listAppointmentTypes(SERVICE_ID_ACCESS);
    $render = true;
    $l10n->addResource(__DIR__ . '/l10n/calendar.json');
    $l10n->localizeArray($appointment_types, 'label');
    $viewFile = 'views/calendar.php';
} elseif ($_GET['page'] === "fetchevents") {
    $events = $cal->listEvents($_POST['emp_id'], $_POST['start'], $_POST['end']);
    $l10n->addResource(__DIR__ . '/l10n/calendar.json');
    $l10n->localizeArray($events, 'label');
    foreach ($events as $e) {
        $category = "";
        //Determine whether this appointment was a cancellation or no show or if the student has arrived
        if ($e['appointment_status'] === "cancelled") {
            $category = "cancelled";
        } elseif ($e['appointment_status'] === "no_show") {
            $category = "noshow";
示例#2
0
文件: calendar.php 项目: hughnguy/php
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
$cal = new Calendar($dbo);
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    $emps = \Ventus\Utilities\Functions::listEmployees(SERVICE_ID_COUNSELLING);
    $appointment_types = \Ventus\Utilities\Functions::listAppointmentTypes(SERVICE_ID_COUNSELLING);
    $thisPage = 'Calendar';
    $l10n->addResource(__DIR__ . '/l10n/calendar.json');
    $l10n->localizeArray($appointment_types, 'label');
    $viewFile = 'views/calendar.php';
} elseif ($_GET['page'] === "fetchevents") {
    $events = $cal->listEvents($_POST['emp_id'], $_POST['start'], $_POST['end']);
    $l10n->addResource(__DIR__ . '/l10n/calendar.json');
    $l10n->localizeArray($events, 'label');
    foreach ($events as $e) {
        $category = "";
        //Determine whether this appointment was a cancellation or no show or if the student has arrived
        if ($e['appointment_status'] === "cancelled") {
            $category = "cancelled";
        } elseif ($e['appointment_status'] === "no_show") {
            $category = "noshow";
示例#3
0
    $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') {
    $pro->updateSignature($SESSION->user_id, $_POST['signature']);
    $loggers['audit']->info("Signature updated");