<?php
require_once '../service/StudentService.class.php';
require_once '../phpbean/Student.class.php';
require_once '../service/ClassInfoService.class.php';
$classInfoService = new ClassInfoService();
$studentNumber = $_GET['studentNumber'];
$studentService = new StudentService();
$student = $studentService->GetStudent($studentNumber);

/*使用 JSON数据格式返回*/
header('Content-type: text/json;charset=utf-8');
echo "{studentNumber:\"".$student->getStudentNumber()."\"";
echo ",studentName:\"".$student->getStudentName()."\"";
echo ",studentPassword:\"".$student->getStudentPassword()."\"";
echo ",studentSex:\"".$student->getStudentSex()."\"";
echo ",studentClassNumber:\"".$classInfoService->GetClassInfo($student->getStudentClassNumber())->getClassName()."\"";
echo ",studentBirthday:\"".date("Y-m-d",strtotime($student->getStudentBirthday()))."\"";
echo ",studentState:\"".$student->getStudentState()."\"";
echo ",studentPhoto:\"".$student->getStudentPhoto()."\"";
echo ",studentTelephone:\"".$student->getStudentTelephone()."\"";
echo ",studentEmail:\"".$student->getStudentEmail()."\"";
echo ",studentQQ:\"".$student->getStudentQQ()."\"";
echo ",studentAddress:\"".$student->getStudentAddress()."\"";
echo ",studentMemo:\"".$student->getStudentMemo()."\"";
echo "}"; 
?>
