phpems导出成绩增加自定义字段

梦里梦外; 2022-09-23 15:59 300阅读 0赞

导出成绩url:http://localhost/phpems/index.php?exam-teach-users-outscore&basicid=7

调用的文件:index.php 中 require “lib/init.cls.php”;
然后
include $modulefile;

app/exam/teach.php

中的这行:
switch($subaction)
{
case ‘outscore’: //导出成绩
//增加导出成绩字段:
$rs = $this->favor->getAllExamHistoryByArgs($args,array(‘ehuserid’,’ehexam’,’ehusername’,’ehscore’));
$r = array();
foreach($rs as $p)
{
$sql=”select useremail from x2_user where userid=’$p[ehuserid]‘“;
$row = $this->db->fetch($sql);
if($row){
$r[] = array(‘ehusername’ => iconv(“UTF-8”,”GBK”,$p[‘ehusername’]),’useremail’ => iconv(“UTF-8”,”GBK”,$row[‘useremail’]),’ehexam’ => iconv(“UTF-8”,”GBK”,$p[‘ehexam’]),’ehscore’ => $p[‘ehscore’]);
}else{
$r[] = array(‘ehusername’ => iconv(“UTF-8”,”GBK”,$p[‘ehusername’]),’ehexam’ => iconv(“UTF-8”,”GBK”,$p[‘ehexam’]),’ehscore’ => $p[‘ehscore’]);
}
}

发表评论

表情:
评论列表 (有 0 条评论,300人围观)

还没有评论,来说两句吧...

相关阅读