/**
*desc 卫生纪律考核
*author 陈晨
*date 2012/12/17
*/
class HeadisAction extends Action {
/*
* 卫生纪律考核首页
*/
public function ru_headis() {
$this->display ();
}
/*
* 个人卫生纪律考核
*/
public function person() {
//查询年级
$grade = M ( 'sy_grade' );
$check = M('sy_headis');
$g_list = $grade->select ();
//查出考核情况
$ch_list = $check->select();
//dump($g_list);
$this->assign ( 'g_list', $g_list );
$this->assign ( 'ch_list', $ch_list );
$this->display ( 'ru_headis_person' );
}
/*
* 根据年级查出班级
*/
public function gra_class() {
$class = M('sy_class');
$c_list = $class->where('c_gId ='.$_GET['grade'])->select();
//dump($c_list);
$string = '';
for($i = 0; $i < count ( $c_list ); $i ++) {
$string = $string. "";
}
echo $string;
}
/*
* 根据班级查出学生
*/
public function cla_stu(){
$student = M('stu_student');
$s_list = $student->where('s_cId ='.$_GET['class'])->select();
$string = '';
for($i = 0; $i < count ( $s_list ); $i ++) {
$string = $string. "";
}
echo $string;
}
/*
* 根据考核查询分数
*/
public function checkscore(){
$score = M('sy_headis');
$check = $score->where('h_Id ='.$_GET['score'])->find();
echo $check['h_Score'];
}
}
标记父ID,然后用ajax实现三级联动
用ajax就是啦