//============================================================================================ // 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 //============================================================================================ $profile = new Profile($dbo); $model = new IntakeForm($dbo); $follow = new FollowUps($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; if (!empty($studentProfile)) { $thisPage = 'intake'; $followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']); $poccount = $profile->countUnlockedPOC($_GET['student_num']); $semester = \Ventus\Utilities\Functions::fetchSemester();
<?php namespace Ventus\Student; //============================================================================================ // Session, config //============================================================================================ require '../includes/php/bootstrap.php'; $SESSION = new \Zend_Session_Namespace('student', true); //============================================================================================ // Load the Model and L10N //============================================================================================ $model = new StudentProfile($dbo); $intake_form = new IntakeForm($dbo); 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'); //============================================================================================ // Direct the course of what the user will see //============================================================================================ if (!isset($_GET['page'])) { //If the user already has a session take them to the dashboard if (isset($SESSION->logged_in)) { header('location:dashboard.php'); die; } else { $l10n->addResource(__DIR__ . '/l10n/login.json'); require_once FS_PHP . '/header-external.php'; require_once 'views/login.php';
namespace Ventus\Student; //============================================================================================ // Session, config //============================================================================================ require '../includes/php/bootstrap.php'; $SESSION = new \Zend_Session_Namespace('student', true); if (!isset($SESSION->logged_in)) { header('location: index.php?next=' . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']); die; } //============================================================================================ // Load the Model and L10N //============================================================================================ $model = new IntakeForm($dbo); 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 = "intake"; if (!isset($_GET['page'])) { $intake_form_details = $model->fetchIntakeForm($SESSION->student_num); $is_complete = $model->checkIntakeFormCompletionStatus($SESSION->student_num); $l10n->addResource(__DIR__ . '/l10n/header.json'); $l10n->addResource(__DIR__ . '/l10n/intake-form.json'); require_once FS_PHP . '/header-external.php';