Esempio n. 1
0
$dashboard = new Dashboard($dbo);
$letters = new \Ventus\Specialist\EmailLetterGenerator();
if (\Ventus\Utilities\I18n\Translate::isAllowedLanguage($SESSION->corr_lang)) {
    $l10n->setLanguage($SESSION->corr_lang);
    \Locale::setDefault($SESSION->corr_lang);
}
$l10n->addResource(FS_L10N . '/header-external.json');
//============================================================================================
// Load the page requested by the user
//============================================================================================
$this_page = "profile";
if (!isset($_GET['page'])) {
    $count_pending_follow_ups = $dashboard->fetchCountPendingFollowUps($SESSION->student_num);
    $all_student_info = $model->fetchStudentInfo($SESSION->student_num);
    $all_student_disabilities = $model->fetchAllStudentDisabilities($SESSION->student_num);
    $all_student_accommodations = $model->fetchAllStudentAccommodations($SESSION->student_num);
    foreach ($all_student_disabilities as &$asd) {
        $asd['files'] = $model->fetchAllStudentDisabilityFiles($asd["student_disability_id"]);
    }
    unset($asd);
    $l10n->addResource(__DIR__ . '/l10n/header.json');
    $l10n->addResource(__DIR__ . '/l10n/profile.json');
    $l10n->localizeArray($all_student_accommodations, 'name');
    $l10n->localizeArray($all_student_disabilities, 'disability');
    $l10n->localizeArray($all_student_info, 'pi-data-program');
    $l10n->localizeArray($all_student_info, 'pi-data-faculty');
    require_once FS_PHP . '/header-external.php';
    require_once 'views/profile.php';
    require_once FS_PHP . '/footer-external.php';
} else {
    if ($_GET['page'] === "new-disability") {