Пример #1
0
//============================================================================================
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
$follow = new FollowUps($dbo);
$profile = new Profile($dbo);
$studentws = new \Ventus\Workshops\StudentWorkshops($dbo);
$courses = new Courses($dbo);
if (isset($_GET['student_num']) && ctype_digit($_GET['student_num'])) {
    $studentProfile = $profile->getProfile($_GET['student_num']);
}
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    $thisPage = 'student-workshops';
    if (!empty($studentProfile)) {
        $attended = $studentws->listWorkshopsAttended($_GET['student_num'], SERVICE_ID_ACCESS);
        $registered = $studentws->listWorkshopsRegisteredTo($_GET['student_num'], SERVICE_ID_ACCESS);
        $future = $studentws->listWorkshopsNotRegisteredTo($_GET['student_num'], SERVICE_ID_ACCESS);
        $poccount = $profile->countUnlockedPOC($_GET['student_num']);
Пример #2
0
//============================================================================================
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
$workshop = new \Ventus\Workshops\Workshops($dbo);
$studentws = new \Ventus\Workshops\StudentWorkshops($dbo);
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    $thisPage = "Workshops";
    $departmentEmail = EMAIL_ALIAS_COUNSELLING_SERVICE . EMAIL_ORG_STAFF_DOMAIN;
    $past = isset($_GET['mode']) && $_GET['mode'] === 'past';
    if ($past) {
        $workshops = $workshop->listPastWorkshops(SERVICE_ID_COUNSELLING);
    } else {
        $workshops = $workshop->listFutureWorkshops(SERVICE_ID_COUNSELLING);
    }
    $l10n->addResource(FS_WORKSHOPS . '/l10n/workshops.json');
    $viewFile = FS_WORKSHOPS . '/views/workshops.php';