$p->value->Show(); $p->value->SetColor($color); $p->SetLegend(iconv("UTF-8", "GB2312//IGNORE", $k)); } $graph->Stroke(); exit; } else { if ($_REQUEST['act'] == 'history_rank') { $student_code = empty($_SESSION['student_code']) ? '' : trim($_SESSION['student_code']); //学生学号 $subject = empty($_REQUEST['subject']) ? '' : trim($_REQUEST['subject']); //考试编码 $prjs = get_exam_prjs($class_code); $prj_rank = array(); foreach ($prjs as $k => $e) { $list = get_scores_by_exam($class_code, "", $e["code"], ""); $exam_rank[$e["prj_code"]][$e["subject"]][] = get_rank($student_code, $list); } if (count($exam_rank) < 1) { die("目前没有数据!"); } // print_r($exam_rank);echo '<br>'; $title = $student_code . "-" . $list[0]["student_name"] . "同学历次考试名次走势图"; $X = array(); //横轴 $datas = array(); foreach ($exam_rank as $k => $v) { $X[] = iconv("UTF-8", "GB2312//IGNORE", $k); foreach ($v as $sk => $sv) { $datas[$sk][] = $sv[0]; }
$content .= $score . ","; } $content .= $total; $content .= "\r\n"; } $charset = empty($_REQUEST['charset']) ? 'UTF8' : trim($_REQUEST['charset']); $file = ecs_iconv(EC_CHARSET, $charset, $content); header("Content-Disposition: attachment; filename=" . get_exam_prj_name($prj_id) . ".csv"); header("Content-Type: application/unknown"); die($file); } elseif ($_REQUEST['act'] == 'exportbyquery') { $prj_id = empty($_REQUEST['search_prj_id']) ? '' : trim($_REQUEST['search_prj_id']); //学生学号 $exam_subject = empty($_REQUEST['search_exam_subject']) ? '' : trim($_REQUEST['search_exam_subject']); //学生学号 $list = get_scores_by_exam($class_code, $prj_id, $_SESSION["student_code"], $exam_subject, " s.student_code"); $content = "考试名称,考试科目,学号,姓名,考试分数\r\n"; foreach ($list as $k => $v) { $content .= $v["prj_name"] . "," . $v["subject"] . "," . $v["student_code"] . "," . $v["student_name"] . "," . $v["score"] . "\r\n"; } $charset = empty($_REQUEST['charset']) ? 'UTF8' : trim($_REQUEST['charset']); $file = ecs_iconv(EC_CHARSET, $charset, $content); header("Content-Disposition: attachment; filename=score.csv"); header("Content-Type: application/unknown"); die($file); } /** * 返回班级管理员列表数据 * * @access public * @param