<?php /** * Created by PhpStorm. * User: Buddhi * Date: 1/19/2016 * Time: 12:56 PM */ include_once "../php/Connection.php"; include_once '../php/controller/TeacherController.php'; use Controllers\TeacherController; $teacherController = new TeacherController(); if (isset($_GET['school_id'])) { if ($_GET['school_id'] != "") { $teachers = $teacherController->getLeavedTeachersBySchool($_GET['school_id']); echo '<option></option>'; foreach ($teachers as $teacher) { echo '<option value="' . $teacher['teacher_id'] . '">' . $teacher['name_in_full'] . '</option>'; } } }
$contact_number = $_POST['contact_number']; $teacher = new Teacher($address, $distance, $name, $contact_number, $registered_date, $subject); $teacherController = new TeacherController(); $teacherController->addTeacher($teacher); include "add_transferred_student.php"; } elseif (isset($_POST['add_transferred_teacher'])) { $teacher_id = $_POST['teachersforschool']; $name = ""; $registered_date = $_POST['date']; $subject = ""; $address = ""; $contact_number = ""; $distance = $_POST['distance']; $teacher = new Teacher($address, $distance, $name, $contact_number, $registered_date, $subject); $teacher->setTeacherId($teacher_id); $teacherController = new TeacherController(); $teacherController->addTransferredTeacher($teacher); include "add_transferred_teacher.php"; } elseif (isset($_POST['addAcademicAchievement'])) { $student_id = $_POST["student_id"]; $ol = $_POST["ol"]; $al = $_POST["al"]; $school_id = $_SESSION['school_id']; $achievement = new Achievement($student_id, $school_id, "Academic"); $achievement->setOl($ol); $achievement->setAl($al); $achievement_controller = new AchievementController(); $achievement_controller->addAcademicAchievement($achievement); include "add_acadamic_achievement.php"; } elseif (isset($_POST['add_non_academic_achievement'])) { $student_id = $_POST["student_id"];