<?php include_once "../php/model/Student.php"; include_once "../php/controller/StudentController.php"; use Controllers\StudentController; use Model\Student; $studentController = new StudentController(); $result = $studentController->getStudentList($_SESSION['school_id']); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>School View | Dashboard</title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <!-- Bootstrap 3.3.5 --> <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <!-- Theme style --> <link rel="stylesheet" href="../dist/css/AdminLTE.min.css"> <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. --> <link rel="stylesheet" href="../dist/css/skins/skin-blue-light.css"> <link rel="stylesheet" href="../plugins/datepicker/datepicker3.css"> <link rel="stylesheet" href="../plugins/select2/select2.min.css">
<?php /** * Created by PhpStorm. * User: Buddhi * Date: 1/19/2016 * Time: 12:56 PM */ include_once "../php/Connection.php"; include_once '../php/controller/StudentController.php'; use Controllers\StudentController; $studentController = new StudentController(); if (isset($_GET['school_id'])) { if ($_GET['school_id'] != "") { $students = $studentController->getLeavedStudentsBySchool($_GET['school_id']); echo '<option></option>'; foreach ($students as $student) { echo '<option value=' . $student['student_id'] . '>' . $student['registration_number'] . " - " . $student['name_in_full'] . '</option>'; } } }
<?php /** * Created by PhpStorm. * User: Buddhi * Date: 1/19/2016 * Time: 12:56 PM */ include_once "../php/Connection.php"; include_once '../php/controller/StudentController.php'; use Controllers\StudentController; $studentController = new StudentController(); if (isset($_GET['school_id'])) { if ($_GET['school_id'] != "") { $pastpupils = $studentController->getPastPupilsBySchool($_GET['school_id']); echo '<option></option>'; foreach ($pastpupils as $pupil) { echo '<option value="' . $pupil['student_id'] . '">' . $pupil['name_in_full'] . '</option>'; } } }
$date = $_POST["date"]; $case = $_POST["case"]; $place = $_POST["place"]; $school_id = $_SESSION['school_id']; $achievement = new Achievement($student_id, $school_id, "Non_Academic"); $achievement->setDate($date); $achievement->setCase($case); $achievement->setPlace($place); $achievement_controller = new AchievementController(); $achievement_controller->addNonAcademicAchievement($achievement); include "add_non_acadamic_achievement.php"; } elseif (isset($_POST['add_leaving_record'])) { $school_id = $_SESSION["school_id"]; $student_id = $_POST["student_id"]; $date = $_POST["date"]; $studentController = new StudentController(); $studentController->addLeavingRecord($school_id, $student_id, $date); include "./leaving_record.php"; } else { include "school_index.php"; } } else { if (isset($_POST['login'])) { $schoolController = new SchoolController(); $school_id = $_POST['schoolsfordistrict']; $password = $_POST['password']; $result = $schoolController->checkForLogIn($school_id, $password); if ($result == 1) { include "./index.php"; } else { include "./login.php";
<?php /** * Created by PhpStorm. * User: Buddhi * Date: 1/19/2016 * Time: 12:56 PM */ include_once "../php/Connection.php"; include_once '../php/controller/StudentController.php'; use Controllers\StudentController; $studentController = new StudentController(); if (isset($_GET['school_id'])) { if ($_GET['school_id'] != "") { $presentpupils = $studentController->getPresentPupilsBySchool($_GET['school_id']); echo '<option></option>'; foreach ($presentpupils as $pupil) { echo '<option value="' . $pupil['student_id'] . '">' . $pupil['name_in_full'] . '</option>'; } } }