<?php
require_once '../service/TeacherService.class.php';
require_once '../phpbean/Teacher.class.php';
$teacherNumber = $_GET['teacherNumber'];
$teacherService = new TeacherService();
$teacher = $teacherService->GetTeacher($teacherNumber);

/*使用 JSON数据格式返回*/
header('Content-type: text/json;charset=utf-8');
echo "{teacherNumber:\"".$teacher->getTeacherNumber()."\"";
echo ",teacherName:\"".$teacher->getTeacherName()."\"";
echo ",teacherPassword:\"".$teacher->getTeacherPassword()."\"";
echo ",teacherSex:\"".$teacher->getTeacherSex()."\"";
echo ",teacherBirthday:\"".date("Y-m-d",strtotime($teacher->getTeacherBirthday()))."\"";
echo ",teacherArriveDate:\"".date("Y-m-d",strtotime($teacher->getTeacherArriveDate()))."\"";
echo ",teacherCardNumber:\"".$teacher->getTeacherCardNumber()."\"";
echo ",teacherPhone:\"".$teacher->getTeacherPhone()."\"";
echo ",teacherPhoto:\"".$teacher->getTeacherPhoto()."\"";
echo ",teacherAddress:\"".$teacher->getTeacherAddress()."\"";
echo ",teacherMemo:\"".$teacher->getTeacherMemo()."\"";
echo "}"; 
?>
