/** * 上传的图像列表. * * @access public * @return void * @author Liuping <*****@*****.**> */ public function filesList($id) { // 学生 id $studentId = intval($id); // 没有 学生 id if (empty($studentId)) { $this->error('Invalid parameters'); } // 实例化模型 $model = new MemberStuModel(); // 学生基本信息 $stuInfo = $model->fetchStuInfo($studentId); if (empty($stuInfo)) { $this->error('Invalid parameters'); } // 对学生做权限验证 $res = AgentAuth::checkStu($studentId, [AgentAuth::READ]); if (9 !== $res['status']) { $this->error('No permission'); } // 上传信息 $uploadInfo = $model->fetchUploadInfo($stuInfo['id'], ''); if (empty($uploadInfo)) { $this->error('Invalid parameters'); } $this->assign('uploadInfo', $uploadInfo); $this->display(); }
/** * 提交申请第 2 步. * * @access public * @return void * @author Liuping <*****@*****.**> */ public function appSubmit2() { // 校验一级中介是否有权限添加申请 if (!AgentAuth::checkTopAgentOfApply()) { $this->error('No permission'); } // 申请 id $applyStatusId = intval(I('post.' . $this->jumpInfo, '')); if (empty($applyStatusId)) { $this->error('Parameters error', U('Student/noApplyStudentList')); } $modelAppStatus = new ApplyStatusModel(); $appStatusInfo = $modelAppStatus->find($applyStatusId); if (NULL === $appStatusInfo || FALSE === $appStatusInfo) { $appStatusInfo = []; } if (empty($appStatusInfo)) { $this->error('Parameters error', U('Student/noApplyStudentList')); } // 操作类型 1 : 添加, 2 : 编辑 $operFlag = intval(I('post.oper', 1)); // 根据操作类型, 设置不同的权限 $authRule = []; if (1 === $operFlag) { $authRule[] = AgentAuth::ADD; } else { $authRule[] = AgentAuth::WRITE; } $modelStu = new MemberStuModel(); // 验证权限 $res = AgentAuth::checkStu($appStatusInfo['s_no'], $authRule); if ($res['status'] !== 9) { $this->error('No permission'); } $uid = $appStatusInfo['uid']; // 学生 6 项基本信息, 根据学生信息查看它的其它 109 项信息. $stuInfo = $modelStu->fetchStuInfo($appStatusInfo['s_no']); // 学生个人详细信息 $perInfo = $modelStu->fetchPerInfo($stuInfo['id'], ''); // 学生个人其它信息 $perOtherInfo = $modelStu->fetchPerOtherInfo($stuInfo['id'], ''); // 中介的联系信息 $agentLinkInfo = $modelAppStatus->fetchAgentInfo($uid); // 学生教育背景信息 $eduBackInfo = $modelStu->fetchEduBackInfo($stuInfo['id'], ''); // 语言证书信息 $engCertInfo = $modelStu->fetchEngCertInfo($stuInfo['id'], ''); // 工作经验 $workExpInfo = $modelStu->fetchWorkExpInfo($stuInfo['id'], ''); // 推荐人信息 $refereeInfo = $modelStu->fetchRefereesInfo($stuInfo['id'], ''); $ref1 = isset($refereeInfo[0]) ? $refereeInfo[0] : []; $ref2 = isset($refereeInfo[1]) ? $refereeInfo[1] : []; unset($refereeInfo); // 上传信息 $uploadInfo = $modelStu->fetchUploadInfo($stuInfo['id'], ''); $this->assign('operFlag', $operFlag); $this->assign('uploadInfo', $uploadInfo); $this->assign('ref2', $ref2); $this->assign('ref1', $ref1); $this->assign('workExpInfo', $workExpInfo); $this->assign('engCertInfo', $engCertInfo); $this->assign('eduBackInfo', $eduBackInfo); $this->assign('agentLinkInfo', $agentLinkInfo); $this->assign('perOtherInfo', $perOtherInfo); $this->assign('perInfo', $perInfo); $this->assign('stuInfo', $stuInfo); $this->assign('appStatusInfo', $appStatusInfo); $this->display(); }