<?php
require_once '../service/ClassInfoService.class.php';
require_once '../phpbean/ClassInfo.class.php';
require_once '../service/SpecialFieldInfoService.class.php';
$specialFieldInfoService = new SpecialFieldInfoService();
$classNumber = $_GET['classNumber'];
$classInfoService = new ClassInfoService();
$classInfo = $classInfoService->GetClassInfo($classNumber);

/*使用 JSON数据格式返回*/
header('Content-type: text/json;charset=utf-8');
echo "{classNumber:\"".$classInfo->getClassNumber()."\"";
echo ",className:\"".$classInfo->getClassName()."\"";
echo ",classSpecialFieldNumber:\"".$specialFieldInfoService->GetSpecialFieldInfo($classInfo->getClassSpecialFieldNumber())->getSpecialFieldName()."\"";
echo ",classBirthDate:\"".date("Y-m-d",strtotime($classInfo->getClassBirthDate()))."\"";
echo ",classTeacherCharge:\"".$classInfo->getClassTeacherCharge()."\"";
echo ",classTelephone:\"".$classInfo->getClassTelephone()."\"";
echo ",classMemo:\"".$classInfo->getClassMemo()."\"";
echo "}"; 
?>
