Exemplo n.º 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
//============================================================================================
$profile = new Profile($dbo);
$poc = new PointOfContact($dbo);
$ir = new \Ventus\Exams\IncidentReport($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 = 'poc';
        $followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']);
        $poccount = $profile->countUnlockedPOC($_GET['student_num']);
Exemplo n.º 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
//============================================================================================
$profile = new Profile($dbo);
$poc = new PointOfContact($dbo);
$emp_profile = new \Ventus\Profile\MyProfile($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 = 'poc';
        $emp_signature = nl2br($emp_profile->getEmpSignature($SESSION->user_name));
        $point_of_contact = $poc->listPointOfContact($_GET['student_num']);
        foreach ($point_of_contact as &$p) {
            $p["files"] = $poc->fetchAllPointOfContactFiles($p["point_of_contact_id"]);