<?php
require_once '../service/CourseInfoService.class.php';
require_once '../phpbean/CourseInfo.class.php';
require_once '../service/TeacherService.class.php';
$teacherService = new TeacherService();
$courseNumber = $_GET['courseNumber'];
$courseInfoService = new CourseInfoService();
$courseInfo = $courseInfoService->GetCourseInfo($courseNumber);

/*使用 JSON数据格式返回*/
header('Content-type: text/json;charset=utf-8');
echo "{courseNumber:\"".$courseInfo->getCourseNumber()."\"";
echo ",courseName:\"".$courseInfo->getCourseName()."\"";
echo ",courseTeacher:\"".$teacherService->GetTeacher($courseInfo->getCourseTeacher())->getTeacherName()."\"";
echo ",courseTime:\"".$courseInfo->getCourseTime()."\"";
echo ",coursePlace:\"".$courseInfo->getCoursePlace()."\"";
echo ",courseScore:".$courseInfo->getCourseScore();
echo ",courseMemo:\"".$courseInfo->getCourseMemo()."\"";
echo "}"; 
?>
