public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->template = new Template();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->department_model = new Department_Model();
         $this->template->setPageName('Signatorial List for Graduate');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->assign('Dept_name', Session::get_DepartmentName());
         $this->template->assign('Dept_desc', $this->department_model->getDescription(Session::get_DepartmentName()));
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('signatorialList.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         $this->displayTable('', 1, "default");
     } else {
         header('Location: ' . HOST);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->administrator_model = new User_Model();
         $this->registered_student_model = new Registered_Student();
         $this->signatoriallist_model = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->template = new Template();
         $this->template->setPageName('User Accounts Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('dashboard.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         //var_dump($_GET['account_types']);
         if (isset($_GET['user_type'])) {
             $this->displayTable('', 1, trim($_GET['user_type']), "default");
         } else {
             // echo "wwwwwwwwww";
             $this->displayTable('', 1, 'Student', "default");
         }
     } else {
         header('Location: ' . HOST);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->signatory_model = new Signatory_Model();
         $this->template = new Template();
         $this->template->setPageName('Signatories Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('signatory_list_manager.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $this->displayTable('', 1, "default");
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         if (isset($_GET['successEdit'])) {
             if ($_GET['successEdit'] == 'true') {
                 $this->template->setAlert("Updating Signatory was Successful", Template::ALERT_SUCCESS, 'alert');
             }
         }
         if (isset($_GET['successAdd'])) {
             if ($_GET['successAdd'] == 'true') {
                 $this->template->setAlert("Adding Signatory was Successful", Template::ALERT_SUCCESS, 'alert');
             }
         }
     } else {
         header('Location: ' . HOST);
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->user_model = new User_Model();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->student_model = new Student_Model();
         $this->clearanceStatus_model = new ClearanceStatus();
         $this->requirementbyStudent_model = new Requirementbystudent_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->bulletin_model = new Bulletin_Model();
         $this->department_model = new Department_Model();
         $this->template = new Template();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Signatory Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->setContent('Signatorydashboard.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->template->set_photo(Session::get_photo());
         $this->displayTable('', 1, "default", "");
     } else {
         header('Location: /SOCS/');
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->template = new Template();
     $this->schoolYearSem_model = new SchoolYearSem_Model();
     $this->requirement_model = new Requirements_Model();
     $this->signatorialList_model = new SignatorialList_Model();
     $this->signatory_model = new Signatory_Model();
     $this->course_model = new Course_Model();
     $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
     $currentSemester = $this->schoolYearSem_model->getCurSemester();
     $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
     $this->template->setPageName('Requirements Page');
     $this->template->set_username(Session::get_user());
     $this->template->set_surname(Session::get_Surname());
     $this->template->set_firstname(Session::get_Firstname());
     $this->template->set_middlename(Session::get_Middlename());
     $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
     $this->template->setContent('RequirementsPage.tpl');
     $this->template->setCalendar('Calendar.tpl');
     $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
     $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
     $this->template->assign('mySchool_Year', $listOfSchoolYear);
     $this->template->assign('currentSemester', $currentSemester);
     $this->template->assign('currentSchool_Year', $currentSchool_Year);
     $this->template->set_photo(Session::get_photo());
     $this->displayTable('', 1, "default");
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist()) {
         $this->admin = new User_Model();
         $this->signatory_model = new Signatory_Model();
         $this->signatoriallist_model = new SignatorialList_Model();
         $this->template = new Template();
         $this->template->setPageName('Settings');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->assign('email_add', Session::get_emailAdd());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->assign('user_type', Session::get_Account_type());
         if (Session::get_Account_type() == "Signatory") {
             $this->template->set_account_type(Session::get_Account_type() . " in Charge");
             $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
             $ug_listOfsignatory = $this->signatory_model->getListofSignatoryName();
             $g_listOfsignatory = $this->signatory_model->getListofSignatoryName();
             //$listOfKeysFromSignatories = $this->signatoriallist_model->getKeyListofSignatory();
             $this->template->assign('ug_signatories', $ug_listOfsignatory);
             $this->template->assign('g_signatories', $g_listOfsignatory);
             $this->template->assign('current_assignSign', Session::get_AssignSignatory());
             //$this->template->assign('sign_status', Session::get_signatory_usability());
         } else {
             if (Session::get_Account_type() == "Student") {
                 $this->student_model = new Student_Model();
                 $this->student_model->queryStudent_Info(Session::get_user());
                 $stud_deptName = $this->student_model->getStud_DeptName();
                 $stud_course = $this->student_model->getStud_Course();
                 $this->template->set_account_type($stud_course);
                 $this->template->assign('assign_sign', ", " . $stud_deptName);
             } else {
                 $this->template->assign('assign_sign', '');
             }
         }
         $this->template->setContent('settings.tpl');
     } else {
         header('Location: ' . HOST);
         exit;
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->template = new Template();
         $this->user_model = new User_Model();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->bulletin_model = new Bulletin_Model();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Bulletin Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('UploadSignaturePage.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->signatoryID = $this->user_model->getAssignSignatory_SigIDOnly(Session::get_user());
         $sigIm = $this->signatory_model->getSignature($this->signatoryID);
         if (is_null($sigIm)) {
             $this->template->assign('signatureImage', HOST . "/photos/default_signature.jpg");
             $this->template->assign('hasImageSet', '0');
         } else {
             $this->template->assign('signatureImage', $sigIm);
             $this->template->assign('hasImageSet', '1');
         }
     } else {
         header('Location: /SOCS/');
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->template = new Template();
         $this->user_model = new User_Model();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->bulletin_model = new Bulletin_Model();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Bulletin Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('BulletinPage.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->displayTable('', 1, "default");
         if (isset($_GET['successAdd'])) {
             if ($_GET['successAdd'] == 'true') {
                 $this->template->setAlert("An announcement has been posted in the bulletin.", Template::ALERT_SUCCESS, 'alert');
             }
         }
     } else {
         header('Location: /SOCS/');
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->user_model = new User_Model();
         $this->template = new Template();
         $this->template->setPageName('User Accounts Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('unconfirmed_signatory.tpl');
         $this->template->assign('assign_sign', '');
         $this->displayTable('', 1, "default");
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
     } else {
         header('Location: ' . HOST);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Student") {
         $this->template = new Template();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->student_model = new Student_Model();
         $this->signatoialList = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->bulletin_model = new Bulletin_Model();
         $this->clearanceStatus_model = new ClearanceStatus();
         $this->department_model = new Department_Model();
         $this->courses_model = new Course_Model();
         $this->student_model->queryStudent_Info(Session::get_user());
         $stud_sy_sem = $this->student_model->get_last_attended_sy_sem();
         $currentSchool_Year = $this->schoolYearSem_model->getSchool_Year_by_id($stud_sy_sem);
         $currentSemester = $this->schoolYearSem_model->getSem_by_id($stud_sy_sem);
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         //            $currentSemester = $this->schoolYearSem_model->getCurSemester();
         //            $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $currentSemester2 = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year2 = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->assign('most_current_sem', $currentSemester2);
         $this->template->assign('most_current_sy', $currentSchool_Year2);
         $sy_attended = $this->schoolYearSem_model->getSchool_Year_by_id($stud_sy_sem);
         $sem_attended = $this->schoolYearSem_model->getSem_by_id($stud_sy_sem);
         //
         $this->template->assign('sy_attended', $sy_attended);
         $this->template->assign('sem_attended', $sem_attended);
         $sy_id2 = $this->schoolYearSem_model->getSy_ID($currentSchool_Year2, $currentSemester2);
         Session::setSY_SEM_ID($sy_id2);
         Session::setSchoolYear($currentSchool_Year);
         Session::setSemester($currentSemester);
         if (isset($_POST['GO'])) {
             $arr_sem = array("First", "Second", "Summer");
             if (array_search($_POST['semester'], $arr_sem) <= array_search($sem_attended, $arr_sem)) {
                 $sy_id = $this->schoolYearSem_model->getSy_ID(trim($_POST['school_year']), trim($_POST['semester']));
                 $this->template->assign('currentSemester', trim($_POST['semester']));
             } else {
                 $sy_id = $this->schoolYearSem_model->getSy_ID(trim($_POST['school_year']), $sem_attended);
                 $this->template->assign('currentSemester', $sem_attended);
             }
             $this->template->assign('currentSchool_Year', trim($_POST['school_year']));
         } else {
             $sy_id = $this->schoolYearSem_model->getSy_ID($currentSchool_Year, $currentSemester);
             $this->template->assign('currentSemester', $currentSemester);
             $this->template->assign('currentSchool_Year', $currentSchool_Year);
         }
         //            $this->student_model->queryStudent_Info(Session::get_user());
         $stud_course = $this->student_model->getStud_Course();
         $stud_deptName = $this->student_model->getStud_DeptName();
         $stud_deptID = $this->student_model->getStud_DeptID();
         $stud_status = $this->student_model->getStud_Status();
         //            $stud_sy_sem = $this->student_model->get_last_attended_sy_sem();
         $this->signatoialList->getListofSignatoryByDept($stud_deptID, $stud_status);
         $listOfSign_underDeptName = $this->signatoialList->getSign_Name();
         $listOfSignID_underDeptName = $this->signatoialList->getSign_ID();
         $listOfClearanceStatus = $this->getListofClearanceStatus($listOfSignID_underDeptName, $sy_id, Session::get_user());
         $this->template->setPageName('Student Clearance Page');
         $this->template->setContent('StudentDashboard.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type($stud_course);
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('assign_sign', ", " . $stud_deptName);
         $this->template->assign('myListOfSign_underDeptName', $listOfSign_underDeptName);
         $this->template->assign('myKey_signID', $listOfSignID_underDeptName);
         $this->template->assign('myStudent_ClearanceStatus', $listOfClearanceStatus);
         $this->template->assign('sy_sem_id', $sy_id);
         $stud_status = $stud_status == "Graduate" ? "Grad" : "U_Grad";
         $this->template->assign('status', $stud_status);
         $this->template->set_photo(Session::get_photo());
         if (isset($_GET['editSuccess'])) {
             $this->template->setAlert("Account has successfully updated!!... ", Template::ALERT_SUCCESS);
         }
     } else {
         header('Location: /SOCS/index.php');
     }
 }