Exemplo n.º 1
0
 /**
  *
  * @author  wangtao
  * @param   $_GET
  * @access  public
  * @return  void
  */
 public function index()
 {
     //        $_GET['a_no']='201508281309313852';
     if ($_GET) {
         $data = self::getParam($_GET);
         $a_no = $data['a_no'];
         self::validateAuth($a_no);
         $lang = LANG_SET;
         $fields = "CONCAT(a.first_name,' ',a.family_name)student,b.`name` school,c.`name` xueke,d.`name` zuanye,a.type,\nFROM_UNIXTIME(a.complate_time,'%d/%m/%Y')complate_time,a.`year` year,a.month,a.reference,a.uid,a.remark,a.invalid,a.applyImg,a.isofferaccept,\n\na.a_status,CASE WHEN a.a_status=0 THEN '已保存未提交'\nWHEN a.a_status=1 THEN '审核中'\nWHEN a.a_status=2 THEN '个人材料出错'\nWHEN a.a_status=3 THEN '额外材料'\nWHEN a.a_status=4 THEN '审核失败'\nWHEN a.a_status=5 THEN '学校评估中'\nWHEN a.a_status=6 THEN '学校评估未通过'\nELSE '已获得C/O' END a_status_,\n\na.o_status,CASE WHEN a.o_status=0 THEN '未获得Offer'\nWHEN a.o_status=1 THEN '已获得C/O'\nWHEN a.o_status=2 THEN '补充Offer材料'\nWHEN a.o_status=3 THEN '正在换Uncon'\nWHEN a.o_status=4 THEN '已获得U/O'\nWHEN a.o_status=5 THEN '正在换CAS'\nELSE '已获得到CAS' END o_status_,\n\na.c_status,DATE_FORMAT(a.entranceDate,'%d/%m/%Y')entranceDate,DATE_FORMAT(a.payDate,'%d/%m/%Y')payDate,a.marginStatus,a.margin,a.needMargin,a.reference,a.a_no,a.fuid,a.s_no,\nCASE WHEN a.openDate IS NULL THEN CONCAT('30/09/',a.year)\nELSE DATE_FORMAT(a.openDate,'%d/%m/%Y') END openDate,\nCASE WHEN a.fee=0 THEN e.tuition\nELSE a.fee END xuefee,\nCASE WHEN a.applyFee=0 THEN e.a_tuition\nELSE a.applyFee END shenqingfee,f.offer_file,f.co_expire,f.co_desc,f.uo_expire,g.cas_file,g.cas_expire,g.is_valid,a.other_flag,a.us_id";
         $where = "a.a_no='{$a_no}'";
         $join = "LEFT JOIN (SELECT * FROM app_universitylang WHERE lang='{$lang}') b ON a.us_id=b.fid\nLEFT JOIN (SELECT * FROM app_subject WHERE lang='{$lang}') c ON a.main_sub_id=c.su_id\nLEFT JOIN (SELECT * FROM app_university_majorlang WHERE lang='{$lang}') d ON a.mj_id=d.fid\nLEFT JOIN __UNIVERSITY_MAJOR__ e ON a.mj_id=e.id\nLEFT JOIN __APPLY_OFFER__ f ON a.a_no=f.a_no\nLEFT JOIN __APPLY_CAS__ g ON a.a_no=g.a_no";
         $statusModel = M('apply_status');
         $data = $statusModel->alias('a')->field($fields)->join($join)->where($where)->find();
         $data['month'] = switch_month($data['month'], true);
         //申请单明细
         $this->assign('data', $data);
         //额外材料
         $uploadInfoData = self::extraInfo($a_no);
         $this->assign('uploadInfoData', $uploadInfoData);
         //日志
         $logData = self::logData($a_no, $txt = '', $begin = '', $end = '');
         $this->assign('logData', $logData);
         $replayTemplateModel = M('replay_template');
         $applyTem = $replayTemplateModel->where('type=1')->select();
         $offerTem = $replayTemplateModel->where('type=2')->select();
         $this->assign('applyTem', $applyTem);
         $this->assign('offerTem', $offerTem);
         $replayModel = M('apply_replay');
         $list = $replayModel->where("a_no='{$a_no}'")->order('time desc')->select();
         $this->assign('list', $list);
         $this->display();
     }
 }
Exemplo n.º 2
0
function month_map($month, $full = false)
{
    if (preg_match("/[,]/", $month)) {
        $temp = explode(',', $month);
    } else {
        $temp = (array) $month;
    }
    $res = '';
    foreach ($temp as $k => $v) {
        $res .= switch_month($v, $full) . '/';
    }
    $res = trim($res, '/');
    return $res;
}