Exemplo n.º 1
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $stt = M('stt');
     $fldint = '-sttid-sttnm-sttcprt-sttads-sttrspnm-sttrsptlp-sttrspcp-sttactvt-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-sttid ASC-';
     $lmtint = 20;
     $jn = '';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($stt, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['sttactvt'] == 1) {
             $v['sttactvt'] = '是';
         } else {
             $v['sttactvt'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $this->assign('title', '浏览站点列表');
     $this->assign('theme', '站点管理');
     $this->display('query');
 }
Exemplo n.º 2
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Lbmd'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $lbmd = M('lbmd');
     $fldint = '-lbmdid-lbnm-mdnm-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '';
     $lmtint = 20;
     $jn = 'tb_lb ON f_lbmd_lbid=lbid-jn-tb_md ON f_lbmd_mdid=mdid';
     //$jn='tb_lb ON f_lbmd_lbid=lbid-jn-tb_atc ON f_lbmd_lbid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($lbmd, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $lb = M('lb');
     $lbls = $lb->select();
     $this->assign('lbls', $lbls);
     //q特殊
     $md = M('md');
     $mdls = $md->select();
     $this->assign('mdls', $mdls);
     //q特殊
     $this->assign('title', '浏览类别-模块列表');
     $this->assign('theme', '类别-模块管理');
     $this->display('query');
 }
Exemplo n.º 3
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cstmcmt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cstmcmt = M('cstmcmt');
     $fldint = '-cstmcmtid-cstmusrnn-atctpc-cstmcmttm-cstmcmtctt-cstmcmtzn-cstmcmttc-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-cstmcmttm DESC-';
     $lmtint = 20;
     $jn = 'tb_cstmusr ON f_cstmcmt_cstmusrid=cstmusrid-jn-tb_atc ON f_cstmcmt_atcid=atcid';
     //$jn='tb_cstmusr ON f_cstmcmt_cstmusrid=cstmusrid-jn-tb_atc ON f_cstmcmt_cstmusrid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cstmcmt, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $cstmusr = M('cstmusr');
     $cstmusrls = $cstmusr->select();
     $this->assign('cstmusrls', $cstmusrls);
     $atc = M('atc');
     $atcls = $atc->select();
     $this->assign('atcls', $atcls);
     //q特殊
     $this->assign('title', '浏览权限列表');
     $this->assign('theme', '权限管理');
     $this->display('query');
 }
Exemplo n.º 4
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Jq'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $jq = M('jq');
     $fldint = '-jqid-sttnm-xqnm-jqqs-jqjs-jqljc-';
     $spccdtint = '-sp-';
     ////
     $odrint = '-xqnm DESC-';
     $lmtint = 20;
     $jn = 'tb_stt ON f_jq_sttid=sttid-jn-tb_xq ON f_jq_xqid=xqid';
     //$jn='tb_ath ON f_jq_athid=athid-jn-tb_atc ON f_jq_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($jq, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($jq,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     $stt = M('stt');
     $sttls = $stt->where('sttactvt=1')->select();
     $this->assign('sttls', $sttls);
     $xq = M('xq');
     $xqls = $xq->order('xqnm DESC')->select();
     $this->assign('xqls', $xqls);
     //q特殊
     $this->assign('title', '浏览假期列表');
     $this->assign('theme', '假期管理');
     $this->display('query');
 }
Exemplo n.º 5
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Zzmm'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $zzmm = M('zzmm');
     $fldint = '-zzmmid-zzmmnm-';
     $cdtint = "-sp-";
     $spzzmmdtint = '-sp-';
     ////
     $odrint = '-zzmmid ASC-';
     $lmtint = 20;
     $jn = '';
     //$jn='tb_zzmm ON f_zzmmid=zzmmid-jn-tb_atc ON f_zzmmid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($zzmm, $fldint, $cdtint, $spzzmmdtint, $odrint, $lmtint, $jn);
     ////
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spzzmmdt', $arr['spzzmmdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $this->assign('title', '浏览微信列表');
     $this->assign('theme', '政治面貌管理');
     $this->display('query');
 }
Exemplo n.º 6
0
 public function index()
 {
     ////
     // 		$std=M('2013_std');
     // 		$stdxqcls=M('2013_stdxqcls');
     // 		$stdls=$std->where('f_std_statid=5 AND stdFinalZhuanye=11')->select();
     // 		foreach ($stdls as $v){
     // 			$dt=array(
     // 					'f_stdxqcls_stdid'=>$v['stdid'],
     // 					'f_stdxqcls_xqid'=>2,
     // 					'f_stdxqcls_clsid'=>3,
     // 			);
     // 			$stdxqcls->data($dt)->add();
     // 		}
     // 		p('搞定!');die;
     ////
     if (cookie('usridck') || session('usridss')) {
         //先给hd设置好些东西,他自身是无法提取的
         import('@.SS.SSAction');
         $ss = new SSAction();
         $ss->setss();
         //获取用户的信息查看用户是否被禁了
         $usrid = session('usridss');
         $usr = M('usr');
         $usross = $usr->where('usrid=' . $usrid)->find();
         if ($usross['usrps'] == 0) {
             $this->error('你的账户被冻结,请联系管理员');
         }
         import('@.NTF.NTFAction');
         $ntf = new NTFAction();
         $ntf->setntf();
         import('@.KZMB.KZMBAction');
         $kzmb = new KZMBAction();
         $kzmb->setkzmb();
         $this->assign('title', '后台主页');
         $this->assign('theme', '欢迎进入后台:');
         $this->display('adm');
     } else {
         $this->assign('title', '用户登录页面');
         $this->assign('theme', '用户登录:');
         $this->display('login');
     }
 }
Exemplo n.º 7
0
 function notify()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cstmusr'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cstmusr = M('cstmusr');
     $fldint = '-cstmusrid-cstmusrnm-cstmusrnn-cstmusraddtm-cstmusrmdftm-cstmusrcp-cstmusrml-cstmusrps-cstmusrvw-';
     $cdtint = "-sp-cstmusrvw-eq-0-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-cstmusraddtm DESC-';
     $lmtint = 20;
     $jn = '';
     //$jn='tb_ath ON f_cstmusr_athid=athid-jn-tb_atc ON f_cstmusr_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cstmusr, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($cstmusr,$fldint,$cdtint,$odrint,$lmtint,$jn);
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['cstmusrps'] == 1) {
             $v['cstmusrps'] = '是';
         } else {
             $v['cstmusrps'] = '否';
         }
         if ($v['cstmusrvw'] == 1) {
             $v['cstmusrvw'] = '是';
         } else {
             $v['cstmusrvw'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $this->assign('title', '浏览客户用户列表');
     $this->assign('theme', '未查看客户用户');
     $this->display('notify');
 }
Exemplo n.º 8
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cls'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_cls_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cls_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $cls = M($grdo['grdnm'] . '_cls');
     $fldint = '-clsid-sttnm-f_cls_grdid-grdnm-clsnm-clsxhprx-clsactvt-clsxqu-';
     if ($athofnstt['aths'] == 1) {
         $sttidforxq = 1;
         //默认以本部站点为例
         $cdtint = "-sp-f_cls_grdid-eq-" . $grdid . '-sp-';
     } else {
         $sttidforxq = $usro['f_usr_sttid'];
         //默认以用户所在站点为例
         $cdtint = "-sp-f_cls_sttid-eq-" . $usro['f_usr_sttid'] . "-sp-f_cls_grdid-eq-" . $grdid . '-sp-';
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-clsid ASC-';
     $lmtint = 20;
     $jn = 'tb_stt ON f_cls_sttid=sttid-jn-tb_grd ON f_cls_grdid=grdid';
     //$jn='tb_stt ON f_cls_sttid=sttid-jn-tb_atc ON f_cls_sttid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cls, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     //适应一些站点用一二三
     import('@.XQ.XQAction');
     $xqw = new XQAction();
     //外来的学期
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['clsactvt'] == 1) {
             $v['clsactvt'] = '是';
         } else {
             if ($v['clsactvt'] == 0) {
                 $v['clsactvt'] = '否';
             }
         }
         if ($v['clsxqu']) {
             $clsxqu = explode('-', $v['clsxqu']);
             $xqnmu = '';
             for ($i = 1; $i < count($clsxqu) - 1; $i++) {
                 $xqid = $clsxqu[$i];
                 $xqnm = $xqw->getxqnm($grdid, $sttidforxq, $xqid);
                 $xqnmu = $xqnmu . $xqnm . '<br>';
             }
         }
         $v['clsxqu'] = $xqnmu;
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $stt = M('stt');
     $sttls = $stt->select();
     $this->assign('sttls', $sttls);
     $grd = M('grd');
     $grdls = $grd->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $this->assign('title', '浏览班级列表');
     $this->assign('theme', '班级管理');
     $this->display('query');
 }
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cstmgrpcstmrl'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cstmgrpcstmrl = M('cstmgrpcstmrl');
     $fldint = '-cstmgrpcstmrlid-cstmgrpnm-cstmrlnm-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '';
     $lmtint = 20;
     $jn = 'tb_cstmgrp ON f_cstmgrpcstmrl_cstmgrpid=cstmgrpid-jn-tb_cstmrl ON f_cstmgrpcstmrl_cstmrlid=cstmrlid';
     //$jn='tb_cstmgrp ON f_cstmgrpcstmrl_cstmgrpid=cstmgrpid-jn-tb_atc ON f_cstmgrpcstmrl_cstmgrpid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cstmgrpcstmrl, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     import('@.TREE.TreeAction');
     $tree = new TreeAction();
     $cstmgrp = M('cstmgrp');
     $cstmgrpls = $cstmgrp->order('cstmgrpodr ASC')->select();
     //在按照这个顺序前提下,使用tree方法就能有序的得到
     $str = $tree->unlimitedForListSLCT($cstmgrpls, 0, 'cstmgrpid', 'cstmgrpnm', 'cstmgrppid', 'cstmgrpodr');
     $this->assign('tree', $str);
     $cstmrl = M('cstmrl');
     $cstmrlls = $cstmrl->select();
     $this->assign('cstmrlls', $cstmrlls);
     //q特殊
     $this->assign('title', '浏览团队-客户角色列表');
     $this->assign('theme', '团队-客户角色管理');
     $this->display('query');
 }
Exemplo n.º 10
0
 function zfk()
 {
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Zspxh'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     $mk = $_GET['mk'];
     $zssz = M('zssz');
     $zsszo = $zssz->find();
     $grdid = $zsszo['f_zssz_grdid'];
     $xqid = $zsszo['f_zssz_xqid'];
     $grd = M('grd');
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $mj = M($grdo['grdnm'] . '_mj');
     $mjls = $mj->where("mjsttu LIKE '%-1-%'")->select();
     $mjlsnw = array();
     $zspxh = M($grdo['grdnm'] . '_zspxh');
     foreach ($mjls as $mjv) {
         $zspxh->join('tb_' . $grdo['grdnm'] . '_std ON f_zspxh_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqdm ON stdid=f_stdxqdm_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
         $where = "f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND f_std_statid<>9 AND stdupfnctm<>'' AND f_stdxqmj_mjid=" . $mjv['mjid'] . " AND stdno<>'' AND zspxhschqtm=''";
         $stdls = $zspxh->join('tb_stt ON f_std_sttid=sttid')->join('tb_grd ON f_std_grdid=grdid')->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->join('tb_cc ON f_mj_ccid=ccid')->join('tb_kl ON f_mj_klid=klid')->join('tb_xxxs ON f_mj_xxxsid=xxxsid')->join('tb_zsfw ON f_mj_zsfwid=zsfwid')->join('tb_xz ON f_mj_xzid=xzid')->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->join('tb_dm ON f_stdxqdm_dmid=dmid')->join('tb_sex ON f_std_sexid=sexid')->join('tb_rc ON f_std_rcid=rcid')->join('tb_zzmm ON f_std_zzmmid=zzmmid')->join('tb_xl ON f_std_xlid=xlid')->join('tb_stat ON f_std_statid=statid')->join('tb_xq ON f_stdxqcls_xqid=xqid')->where($where)->order('mjnm ASC,stdaplno ASC')->select();
         if ($stdls) {
             $hspt = 0;
             $stdlsnw = array();
             foreach ($stdls as $stdv) {
                 if (preg_match('/default/', $stdv['stdpt'])) {
                     continue;
                 } else {
                     array_push($stdlsnw, $stdv);
                 }
             }
             $mjv['stdls'] = $stdlsnw;
             array_push($mjlsnw, $mjv);
         }
     }
     $this->assign('mjls', $mjlsnw);
     $this->assign('mk', $mk);
     $this->assign('title', '做饭卡');
     $this->assign('theme', '做饭卡');
     $this->display('zfk');
 }
Exemplo n.º 11
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cstmath'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $cstmathofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cstmath = M('cstmath');
     $fldint = '-cstmathid-cstmrlnm-mdnm-cstmatha-cstmathd-cstmathm-cstmathv-cstmaths-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '';
     $lmtint = 20;
     $jn = 'tb_cstmrl ON f_cstmath_cstmrlid=cstmrlid-jn-tb_md ON f_cstmath_mdid=mdid';
     //$jn='tb_cstmrl ON f_cstmath_cstmrlid=cstmrlid-jn-tb_atc ON f_cstmath_cstmrlid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cstmath, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['cstmatha'] == 1) {
             $v['cstmatha'] = '是';
         } else {
             $v['cstmatha'] = '否';
         }
         if ($v['cstmathd'] == 1) {
             $v['cstmathd'] = '是';
         } else {
             $v['cstmathd'] = '否';
         }
         if ($v['cstmathm'] == 1) {
             $v['cstmathm'] = '是';
         } else {
             $v['cstmathm'] = '否';
         }
         if ($v['cstmathv'] == 1) {
             $v['cstmathv'] = '是';
         } else {
             $v['cstmathv'] = '否';
         }
         if ($v['cstmaths'] == 1) {
             $v['cstmaths'] = '是';
         } else {
             $v['cstmaths'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $cstmrl = M('cstmrl');
     $cstmrlls = $cstmrl->select();
     $this->assign('cstmrlls', $cstmrlls);
     $md = M('md');
     $mdls = $md->select();
     $this->assign('mdls', $mdls);
     //q特殊
     $this->assign('title', '浏览权限列表');
     $this->assign('theme', '权限管理');
     $this->display('query');
 }
Exemplo n.º 12
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Kc'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_kc_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_kc_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $kc = M($grdo['grdnm'] . '_kc');
     $fldint = '-kcid-f_kc_grdid-grdnm-kcnm-kcsfts-';
     $cdtint = "-sp-f_kc_grdid-eq-" . $grdid . '-sp-';
     $spccdtint = '-sp-';
     ////
     $odrint = '-kcid ASC-';
     $lmtint = 20;
     $jn = 'tb_grd ON f_kc_grdid=grdid';
     //$jn='tb_stt ON f_kc_sttid=sttid-jn-tb_atc ON f_kc_sttid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($kc, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['kcsfts'] == 1) {
             $v['kcsfts'] = '是';
         } else {
             $v['kcsfts'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $grd = M('grd');
     $grdls = $grd->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $this->assign('title', '浏览课程列表');
     $this->assign('theme', '课程管理');
     $this->display('query');
 }
Exemplo n.º 13
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cjzx'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以cjzxxqcls cjzxxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_cjzx_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $cjzx = clone M($grdo['grdnm'] . '_cjzx');
     $cjzx->join('tb_' . $grdo['grdnm'] . '_std ON f_cjzx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
     // 		$cjzxls=$cjzx->select();
     $fldint = '-cjzxid-f_cjzx_grdid-stdno-stdnm-sexnm-cjzxzf-cjzxqmf-cjzxpsf-cjzxxtf-cjzxbkf-cjzxsftj-cjzxxk-cjzxqk-cjzxhk-f_stdxqcls_clsid-';
     //默认学期,
     $xq = M('xq');
     $xqo = $xq->where('xqdq=1')->find();
     $xqid = $xqo['xqid'];
     if ($athofnstt['aths'] == 1) {
         $f_usr_sttid = 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_cjzx_grdid-eq-" . $grdid . "-sp-f_cjzx_sttid-eq-" . $f_usr_sttid . "-sp-f_cjzx_xqid-eq-" . $xqid . '-sp-' . "f_pk_grdid-eq-" . $grdid . "-sp-f_pk_sttid-eq-" . $f_usr_sttid . "-sp-f_pk_xqid-eq-" . $xqid . '-sp-' . "f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_cjzx_grdid-eq-" . $grdid . "-sp-f_cjzx_sttid-eq-" . $f_usr_sttid . "-sp-f_cjzx_xqid-eq-" . $xqid . '-sp-' . "f_pk_grdid-eq-" . $grdid . "-sp-f_pk_sttid-eq-" . $f_usr_sttid . "-sp-f_pk_xqid-eq-" . $xqid . '-sp-' . "f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-f_mj_bxxsid ASC-clsid ASC-mjid ASC-stdno ASC-';
     $lmtint = 100;
     $jn = 'tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid-jn-tb_stt ON f_cjzx_sttid=sttid-jn-tb_grd ON f_cjzx_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid-jn-tb_tcr ON f_pk_tcrid=tcrid-jn-tb_xq ON f_cjzx_xqid=xqid' . '-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cjzx, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
     $mls = $arr['mls'];
     $bzr = M($grdo['grdnm'] . '_bzr');
     $mlsfn = array();
     $czps = 0;
     foreach ($mls as $v) {
         $bzro = $bzr->where('f_bzr_clsid=' . $v['f_stdxqcls_clsid'])->find();
         if ($athofn['athm'] == 1 || session('usridss') == $bzro['f_bzr_usrid']) {
             //aths==1说明是教务的人或者是管理员
             $v['czps'] = 1;
         } else {
             $v['czps'] = 0;
         }
         $czps = $v['czps'];
         //是否提交的判断
         if ($v['cjzxsftj'] == 1) {
             $v['cjzxsftj'] = '是';
         } else {
             $v['cjzxsftj'] = '否';
         }
         //是否限考的判断
         if ($v['cjzxxk'] == 1) {
             $v['cjzxxk'] = '是';
             $v['xkstr'] = '取消限考';
         } else {
             $v['cjzxxk'] = '否';
             $v['xkstr'] = '设置限考';
         }
         //是否缺考的判断
         if ($v['cjzxqk'] == 1) {
             $v['cjzxqk'] = '是';
             $v['qkstr'] = '取消缺考';
         } else {
             $v['cjzxqk'] = '否';
             $v['qkstr'] = '设置缺考';
         }
         //是否缓考的判断
         if ($v['cjzxhk'] == 1) {
             $v['cjzxhk'] = '是';
             $v['hkstr'] = '取消缓考';
         } else {
             $v['cjzxhk'] = '否';
             $v['hkstr'] = '设置缓考';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('czps', $czps);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $cdt = $arr['cdt'];
     //如果条件含有学生班级和排课信息就可以显示,否则免谈
     if (preg_match('/f_stdxqcls_clsid/', $cdt) && preg_match('/f_cjzx_pkid/', $cdt)) {
         $mls = $mlsfn;
         $cdt = $arr['cdt'];
         $tmp = explode('f_cjzx_pkid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         //取出权重//顺便给query页给出参考
         $rfr = '-';
         $pk = M($grdo['grdnm'] . '_pk');
         $pko = $pk->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->where('pkid=' . $tmp[0])->find();
         //通过学生得到现在是哪个班,在上哪个课
         $this->assign('pknm', $pko['kcnm'] . '-' . $pko['tcrnn']);
         for ($i = 0; $i < count($mls); $i++) {
             $rfr = $rfr . $mls[$i]['cjzxid'] . '-';
             // 				if($mls[$i]['cjzxqmf']==''&&$mls[$i]['cjzxpsf']==''&&$mls[$i]['cjzxxtf']==''){
             // 					$zf='';
             // 				}else{
             // 					if($mls[$i]['cjzxqmf']==''){$cjzxqmf=0;}else{$cjzxqmf=$mls[$i]['cjzxqmf'];}
             // 					if($mls[$i]['cjzxpsf']==''){$cjzxpsf=0;}else{$cjzxpsf=$mls[$i]['cjzxpsf'];}
             // 					if($mls[$i]['cjzxxtf']==''){$cjzxxtf=0;}else{$cjzxxtf=$mls[$i]['cjzxxtf'];}
             // 					//$zf=sprintf("%.1f", $cjzxqmf*$pko['pkwqm']+$cjzxpsf*$pko['pkwps']+$cjzxxtf*$pko['pkwxt']);
             // 					$zf=ceil($cjzxqmf*$pko['pkwqm']+$cjzxpsf*$pko['pkwps']+$cjzxxtf*$pko['pkwxt']);
             // 				}
             // 				$mls[$i]['zcj']=$zf;
         }
         $this->assign('wqm', $pko['pkwqm']);
         $this->assign('wps', $pko['pkwps']);
         $this->assign('wxt', $pko['pkwxt']);
         $this->assign('rfr', $rfr);
         $this->assign('mls', $mls);
         $this->assign('page_method', $arr['page_method']);
     }
     //NB初始化,结束
     if (preg_match('/f_cjzx_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
         $grdo = $grd->where('grdid=' . $grdid)->find();
     } else {
         $grdo = $grd->order('grdnm DESC')->find();
     }
     if (preg_match('/f_cjzx_xqid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_xqid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $xqid = $tmp[0];
     } else {
     }
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的成绩中心阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     $cdt = $arr['cdt'];
     //q特殊
     $xq = M('xq');
     if (preg_match('/f_cjzx_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     } else {
         $xqls = $xq->order('xqnm DESC')->select();
     }
     $this->assign('xqls', $xqls);
     //q特殊
     $where = '1=1';
     //获取该键的值
     $tmp = explode('f_std_sttid', $cdt);
     $tmp = explode('-eq-', $tmp[1]);
     $tmp = explode('-sp-', $tmp[1]);
     $where = $where . ' AND f_cls_sttid=' . $sttid;
     //之前已经确定过到底是看哪个年级
     $where = $where . ' AND f_cls_grdid=' . $grdid;
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->join('tb_stt ON f_cls_sttid=sttid')->where($where . ' AND clsactvt=1')->order('clsnm ASC')->select();
     $this->assign('clsls', $clsls);
     if (preg_match('/f_stdxqcls_clsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_stdxqcls_clsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $clsid = $tmp[0];
         //找那个班的学生代表看看他选了那些成绩中心
         $stdxqcls = M($grdo['grdnm'] . '_stdxqcls');
         $stdxqclso = $stdxqcls->join('tb_' . $grdo['grdnm'] . '_std ON f_stdxqcls_stdid=stdid')->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->where('f_stdxqcls_xqid=' . $xqid . ' AND f_stdxqcls_clsid=' . $clsid . ' AND f_std_statid=5')->find();
         $cjzx = clone M($grdo['grdnm'] . '_cjzx');
         $pkls = $cjzx->join('tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid')->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->where('f_cjzx_sttid=' . $sttid . ' AND f_cjzx_xqid=' . $xqid . ' AND f_cjzx_stdid=' . $stdxqclso['f_stdxqcls_stdid'])->select();
         $pklsfn = array();
         foreach ($pkls as $v) {
             if ($v['pkzkkm'] == 1) {
                 $v['pkzkkm'] = '【自考科目】';
             } else {
                 $v['pkzkkm'] = '';
             }
             array_push($pklsfn, $v);
         }
     } else {
     }
     $this->assign('pkls', $pklsfn);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //通过学生得到现在是哪个班,在上哪个课
     $this->assign('clsnm', $stdxqclso['clsnm']);
     if ($mls[0]['cjzxsftj'] == '是') {
         $this->assign('tijiao', 1);
     } else {
         $this->assign('tijiao', 0);
     }
     //q特殊
     $this->assign('title', '浏览成绩中心列表');
     $this->assign('theme', '成绩中心管理');
     $this->display('query');
 }
Exemplo n.º 14
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Xk'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //q特殊
     $this->assign('title', '浏览选课列表');
     $this->assign('theme', '选课管理');
     $this->display('query');
 }
Exemplo n.º 15
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Pl'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $this->assign('grdid', $grdid);
     $std = M($grdo['grdnm'] . '_std')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
     $fldint = '-stdid-f_std_grdid-grdnm-f_std_sttid-sttnm-f_stdxqcls_xqid-xqnm-f_stdxqcls_clsid-bxxsnm-clsnm-stdno-stdnm-sexnm-';
     //默认学期,
     $xq = M('xq');
     $xqo = $xq->where('xqdq=1')->find();
     $xqid = $xqo['xqid'];
     if ($athofnstt['aths'] == 1) {
         $f_usr_sttid = 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     }
     if (preg_match('/f_stdxqcls_xqid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_stdxqcls_xqid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $xqid = $tmp[0];
     }
     $this->assign('xqid', $xqid);
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
     }
     $this->assign('sttid', $sttid);
     if (preg_match('/f_stdxqcls_clsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_stdxqcls_clsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $clsid = $tmp[0];
     }
     $this->assign('clsid', $clsid);
     import('@.XQ.XQAction');
     $xqw = new XQAction();
     //外来的学期
     $xqnm = $xqw->getxqnm($grdid, $sttid, $xqid);
     $this->assign('xqnmsx', $xqnm);
     //sx 筛选
     $stt = M('stt');
     $stto = $stt->where('sttid=' . $sttid)->find();
     $this->assign('sttnmsx', $stto['sttnm']);
     $cls = M($grdo['grdnm'] . '_cls');
     $clso = $cls->where('clsid=' . $clsid)->find();
     $this->assign('clsnmsx', $clso['clsnm']);
     $spccdtint = '-sp-';
     ////
     $odrint = '-f_mj_bxxsid ASC-clsid ASC-mjid ASC-stdno ASC-';
     $lmtint = 100;
     $jn = 'tb_stt ON f_std_sttid=sttid-jn-tb_grd ON f_std_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid-jn-tb_xq ON f_stdxqcls_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($std, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     if (preg_match('/f_stdxqcls_clsid/', $arr['cdt'])) {
         $tmp = explode('f_stdxqcls_clsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $clsid = $tmp[0];
         //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
         $mls = $arr['mls'];
         $bzr = M($grdo['grdnm'] . '_bzr');
         $mlsfn = array();
         $cjzx = M($grdo['grdnm'] . '_cjzx');
         //获取有多少该班最多有多少门课
         $pkidls = $cjzx->Distinct(true)->field('pkid')->join('tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid')->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->join('tb_' . $grdo['grdnm'] . '_std ON f_cjzx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid')->join('tb_stt ON f_std_sttid=sttid')->join('tb_grd ON f_std_grdid=grdid')->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->join('tb_cc ON f_mj_ccid=ccid')->join('tb_kl ON f_mj_klid=klid')->join('tb_xxxs ON f_mj_xxxsid=xxxsid')->join('tb_zsfw ON f_mj_zsfwid=zsfwid')->join('tb_xz ON f_mj_xzid=xzid')->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->join('tb_sex ON f_std_sexid=sexid')->join('tb_rc ON f_std_rcid=rcid')->join('tb_zzmm ON f_std_zzmmid=zzmmid')->join('tb_xl ON f_std_xlid=xlid')->join('tb_stat ON f_std_statid=statid')->join('tb_xq ON f_stdxqcls_xqid=xqid')->where("f_cjzx_xqid=" . $xqid . " AND f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_std_statid=5 AND  f_stdxqcls_clsid=" . $clsid)->select();
         $where = '1=2';
         foreach ($pkidls as $vI) {
             $where = $where . ' OR pkid=' . $vI['pkid'];
         }
         $pk = m($grdo['grdnm'] . '_pk');
         $pkls = $pk->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->where($where)->order('pkzkkm ASC,kcnm ASC')->select();
         $iforcnt = 0;
         foreach ($mls as $v) {
             $iforcnt++;
             $v['xh'] = $iforcnt;
             $bzro = $bzr->where('f_bzr_clsid=' . $v['f_stdxqcls_clsid'])->find();
             if ($athofn['aths'] == 1 || session('usridss') == $bzro['f_bzr_usrid']) {
                 //aths==1说明是教务的人或者是管理员
                 $v['mdf'] = 1;
             } else {
                 $v['mdf'] = 0;
             }
             $cjzxls = array();
             foreach ($pkls as $vI) {
                 $cjzxo = $cjzx->join('tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid')->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->where('f_cjzx_grdid=' . $grdid . ' AND f_cjzx_sttid=' . $sttid . ' AND f_cjzx_xqid=' . $xqid . ' AND f_cjzx_stdid=' . $v['stdid'] . ' AND f_cjzx_pkid=' . $vI['pkid'])->find();
                 if ($cjzxo) {
                     if ($cjzxo['cjzxsftj'] == 0) {
                         if ($cjzxo['cjzxxk'] == 0 && $cjzxo['cjzxqk'] == 0 && $cjzxo['cjzxhk'] == 0) {
                             $cjzxo['cjzxzf'] = '';
                         }
                     }
                 } else {
                     $cjzxo['cjzxzf'] = '未选该课';
                 }
                 array_push($cjzxls, $cjzxo);
             }
             $v['cjzxls'] = $cjzxls;
             //查看是否有评论过
             $pl = M($grdo['grdnm'] . '_pl');
             if ($pl->where('f_pl_grdid=' . $grdid . ' AND f_pl_sttid=' . $sttid . ' AND f_pl_xqid=' . $xqid . ' AND f_pl_stdid=' . $v['stdid'])->find()) {
                 $plo = $pl->where('f_pl_grdid=' . $grdid . ' AND f_pl_sttid=' . $sttid . ' AND f_pl_xqid=' . $xqid . ' AND f_pl_stdid=' . $v['stdid'])->find();
                 $v['plid'] = $plo['plid'];
             } else {
                 $v['plid'] = 0;
             }
             array_push($mlsfn, $v);
         }
         //已最后一个学生选课为例
         $this->assign('pkls', $pkls);
         $this->assign('mls', $mlsfn);
         $this->assign('page_method', $arr['page_method']);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     //NB初始化,结束
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的学生阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     //q特殊
     $xq = M('xq');
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     } else {
         $xqls = $xq->order('xqnm DESC')->select();
     }
     $this->assign('xqls', $xqls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_cls_sttid=' . $tmp[0];
     } else {
         if ($athofnstt['aths'] == 1) {
             $where = $where . ' AND f_cls_sttid=1';
         } else {
             $where = $where . ' AND f_cls_sttid=' . $usro['f_usr_sttid'];
         }
     }
     //之前已经确定过到底是看哪个年级
     $where = $where . ' AND f_cls_grdid=' . $grdid . ' AND clsactvt=1';
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->join('tb_stt ON f_cls_sttid=sttid')->where($where)->order('clsnm ASC')->select();
     $this->assign('clsls', $clsls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '浏览成绩单列表');
     $this->assign('theme', '成绩管理');
     $this->display('query');
 }
Exemplo n.º 16
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cstmusrcstmrl'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cstmusrcstmrl = M('cstmusrcstmrl');
     $fldint = '-cstmusrcstmrlid-cstmusrnm-cstmusrnn-cstmgrpid-cstmgrpnm-cstmrlnm-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '';
     $lmtint = 20;
     $jn = 'tb_cstmusr ON f_cstmusrcstmrl_cstmusrid=cstmusrid-jn-tb_cstmrl ON f_cstmusrcstmrl_cstmrlid=cstmrlid-jn-tb_cstmgrpcstmrl ON f_cstmusrcstmrl_cstmrlid=f_cstmgrpcstmrl_cstmrlid-jn-tb_cstmgrp ON f_cstmgrpcstmrl_cstmgrpid=cstmgrpid';
     //$jn='tb_cstmusr ON f_cstmusrcstmrl_cstmusrid=cstmusrid-jn-tb_atc ON f_cstmusrcstmrl_cstmusrid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cstmusrcstmrl, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $cstmusrcstmgrp = M('cstmusrcstmgrp');
     $cstmusrcstmgrpls = $cstmusrcstmgrp->Distinct(true)->field('cstmusrid,cstmusrnm')->join('tb_cstmusr ON f_cstmusrcstmgrp_cstmusrid=cstmusrid')->join('tb_cstmgrp ON f_cstmusrcstmgrp_cstmgrpid=cstmgrpid')->select();
     $this->assign('cstmusrls', $cstmusrcstmgrpls);
     import('@.TREE.TreeAction');
     $tree = new TreeAction();
     $cstmgrp = M('cstmgrp');
     $cstmgrpls = $cstmgrp->order('cstmgrpodr ASC')->select();
     //在按照这个顺序前提下,使用tree方法就能有序的得到
     $str = $tree->unlimitedForListSLCT($cstmgrpls, 0, 'cstmgrpid', 'cstmgrpnm', 'cstmgrppid', 'cstmgrpodr');
     $this->assign('tree', $str);
     //若cstmgrpid 有限制的话,那么cstmrl必须是要 该相应的cstmgrp下面
     //q特殊
     $cdt = $arr['cdt'];
     $cstmgrp = M('cstmgrp');
     $where = '1=1';
     if (preg_match('/cstmgrpid/', $cdt)) {
         //获取该键的值
         $tmp = explode('cstmgrpid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND cstmgrpid=' . $tmp[0];
     }
     $cstmgrpo = $cstmgrp->where($where)->find();
     $cstmgrpcstmrl = M('cstmgrpcstmrl');
     $cstmgrpcstmrlls = $cstmgrpcstmrl->join('tb_cstmgrp ON f_cstmgrpcstmrl_cstmgrpid=cstmgrpid')->join('tb_cstmrl ON f_cstmgrpcstmrl_cstmrlid=cstmrlid')->where($where)->select();
     $this->assign('cstmrlls', $cstmgrpcstmrlls);
     $cstmusr = M('cstmusr');
     $cstmsucstmrls = $cstmusr->join('tb_cstmusrcstmgrp ON cstmusrid=f_cstmusrcstmgrp_cstmusrid')->select();
     $this->assign('cstmusrls', $cstmsucstmrls);
     //q特殊
     $this->assign('title', '浏览客户用户-客户角色列表');
     $this->assign('theme', '客户用户-客户角色管理');
     $this->display('query');
 }
Exemplo n.º 17
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Std'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $std = M($grdo['grdnm'] . '_std')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqdm ON f_stdxqdm_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
     // 		$stdls=$std->select();
     $fldint = '-stdid-bxxsnm-sttnm-f_std_grdid-grdnm-f_stdxqcls_xqid-xqnm-f_stdxqcls_clsid-clsnm-stdno-stdnm-sexnm-mjnm-statnm-';
     //$cdtint="-sp-f_std_ccid-eq-3-sp-f_std_xxxsid-eq-2-sp-f_std_zsfwid-eq-2-sp-f_std_xzid-eq-2-sp-f_std_sttid-eq-1-sp-f_std_statid-eq-5-sp-";
     //默认学期,
     $xq = M('xq');
     $xqo = $xq->where('xqdq=1')->find();
     $xqid = $xqo['xqid'];
     if ($athofnstt['aths'] == 1) {
         $f_usr_sttid = 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . "-sp-f_stdxqdm_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . "-sp-f_stdxqdm_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-f_mj_bxxsid ASC-clsid ASC-mjid ASC-stdno ASC-';
     $lmtint = 20;
     $jn = 'tb_stt ON f_std_sttid=sttid-jn-tb_grd ON f_std_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_dm ON f_stdxqdm_dmid=dmid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid-jn-tb_xq ON f_stdxqcls_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($std, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
     $mls = $arr['mls'];
     $bzr = M($grdo['grdnm'] . '_bzr');
     $mlsfn = array();
     foreach ($mls as $v) {
         $bzro = $bzr->where('f_bzr_clsid=' . $v['f_stdxqcls_clsid'])->find();
         if ($athofn['aths'] == 1 || session('usridss') == $bzro['f_bzr_usrid']) {
             //aths==1说明是教务的人或者是管理员
             $v['mdf'] = 1;
         } else {
             $v['mdf'] = 0;
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $bxxs = M('bxxs');
     $bxxsls = $bxxs->select();
     $this->assign('bxxsls', $bxxsls);
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的学生阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     //q特殊
     $cc = M('cc');
     $ccls = $cc->select();
     $this->assign('ccls', $ccls);
     //q特殊
     $kl = M('kl');
     $klls = $kl->select();
     $this->assign('klls', $klls);
     //q特殊
     $xxxs = M('xxxs');
     $xxxsls = $xxxs->select();
     $this->assign('xxxsls', $xxxsls);
     //q特殊
     $zsfw = M('zsfw');
     $zsfwls = $zsfw->select();
     $this->assign('zsfwls', $zsfwls);
     //q特殊
     $xz = M('xz');
     $xzls = $xz->select();
     $this->assign('xzls', $xzls);
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $xq = M('xq');
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     } else {
         $xqls = $xq->order('xqnm DESC')->select();
     }
     $this->assign('xqls', $xqls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_cls_sttid=' . $tmp[0];
     } else {
         if ($athofnstt['aths'] == 1) {
             $where = $where . ' AND f_cls_sttid=1';
         } else {
             $where = $where . ' AND f_cls_sttid=' . $usro['f_usr_sttid'];
         }
     }
     $where = $where . " AND clsxqu LIKE '%-" . $xqid . "-%'";
     //之前已经确定过到底是看哪个年级
     $where = $where . ' AND f_cls_grdid=' . $grdid;
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->join('tb_stt ON f_cls_sttid=sttid')->where($where)->order('clsnm ASC')->select();
     array_push($clsls, array('clsid' => 0, 'clsnm' => '未分班'));
     $this->assign('clsls', $clsls);
     //q特殊
     $dm = M('dm');
     $dmls = $dm->select();
     $this->assign('dmls', $dmls);
     //q特殊
     $sex = M('sex');
     $sexls = $sex->select();
     $this->assign('sexls', $sexls);
     //q特殊
     $rc = M('rc');
     $rcls = $rc->select();
     $this->assign('rcls', $rcls);
     //q特殊
     $zzmm = M('zzmm');
     $zzmmls = $zzmm->select();
     $this->assign('zzmmls', $zzmmls);
     //q特殊
     $xl = M('xl');
     $xlls = $xl->select();
     $this->assign('xlls', $xlls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_mj_bxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_bxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_bxxsid=' . $tmp[0];
     }
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_grdid=' . $tmp[0];
     }
     if (preg_match('/f_mj_ccid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_ccid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_ccid=' . $tmp[0];
     }
     if (preg_match('/f_mj_klid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_klid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_klid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xxxsid=' . $tmp[0];
     }
     if (preg_match('/f_mj_zsfwid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_zsfwid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_zsfwid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xzid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xzid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xzid=' . $tmp[0];
     }
     $mj = M($grdo['grdnm'] . '_mj');
     $mjls = $mj->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->where($where)->order('f_mj_bxxsid ASC,mjdm ASC')->select();
     $tmpls = array();
     foreach ($mjls as $v) {
         if (preg_match('/技能/', $v['bxxsnm'])) {
             $v['bxxsnm'] = '技能';
         } else {
             if (preg_match('/自考/', $v['bxxsnm'])) {
                 $v['bxxsnm'] = '自考';
             } else {
                 $v['bxxsnm'] = '普通';
             }
         }
         array_push($tmpls, $v);
     }
     $this->assign('mjls', $tmpls);
     //q特殊
     $stat = M('stat');
     $statls = $stat->where("statactvt=1 AND statmk='jw'")->select();
     $this->assign('statls', $statls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '浏览学生列表');
     $this->assign('theme', '学生管理');
     $this->display('query');
 }
Exemplo n.º 18
0
 function collect()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Atc'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     $usrid = session('usridss');
     $atcclct = M('atcclct');
     //$bbb=$atcclct->select();p($bbb);die;
     // 	$aaaa=$atcclct->join('tb_atc ON f_atcclct_atcid=atcid')->join('tb_usr ON f_atcclct_usrid=usrid')->join('tb_bd ON f_atc_bdid=bdid')
     // 	->where("atcps='y' AND atcvw='y' AND usrid=".$usrid)->select();p($aaaa);die;
     //NB初始化,开始
     $usrid = session('usridss');
     $atcclct = M('atcclct');
     $atc = M('atc');
     $fldint = '-atcid-bdnm-atctpc-atcath-atcmdftm-atccnt-';
     $cdtint = "-sp-atcps-eq-1-sp-atcvw-eq-1-sp-usrid-eq-" . $usrid . "-sp-";
     $spccdtint = "-sp-";
     ////
     $odrint = '-atctp DESC-atcmdftm DESC-';
     $lmtint = 20;
     $jn = 'tb_atc ON f_atcclct_atcid=atcid-jn-tb_usr ON f_atcclct_usrid=usrid-jn-tb_bd ON f_atc_bdid=bdid';
     //$jn='tb_ath ON f_atc_athid=athid-jn-tb_atc ON f_atc_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($atcclct, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     // 		$arr=NB($u,$fldint,$cdtint,$odrint,$lmtint,$jn);
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $this->assign('title', '浏览文章列表');
     $this->assign('theme', '收藏文章');
     $this->display('collect');
 }
Exemplo n.º 19
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Xf'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_xf_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_xf_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $xf = M($grdo['grdnm'] . '_xf');
     $fldint = '-xfid-grdnm-sttnm-bxxsnm-ccnm-klnm-xfsm-jckwfsm-';
     $cdtint = "-sp-f_xf_grdid-eq-" . $grdo['grdid'] . "-sp-f_xf_sttid-eq-1-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-';
     $lmtint = 20;
     $jn = 'tb_grd ON f_xf_grdid=grdid-jn-tb_stt ON f_xf_sttid=sttid-jn-tb_bxxs ON f_xf_bxxsid=bxxsid-jn-tb_cc ON f_xf_ccid=ccid-jn-tb_kl ON f_xf_klid=klid';
     //$jn='tb_ath ON f_xf_athid=athid-jn-tb_atc ON f_xf_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($xf, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $stt = M('stt');
     $sttls = $stt->select();
     $this->assign('sttls', $sttls);
     //q特殊
     $bxxs = M('bxxs');
     $bxxsls = $bxxs->select();
     $this->assign('bxxsls', $bxxsls);
     //q特殊
     $cc = M('cc');
     $ccls = $cc->select();
     $this->assign('ccls', $ccls);
     //q特殊
     $kl = M('kl');
     $klls = $kl->select();
     $this->assign('klls', $klls);
     //q特殊
     $this->assign('title', '浏览学费列表');
     $this->assign('theme', '学费管理');
     $this->display('query');
 }
Exemplo n.º 20
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Zssz'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     $zssz = M('zssz');
     $fldint = '-zsszid-grdnm-xqnm-zsszbxxsu-zsszop-zsszjztm-zsszxnltm-';
     $cdtint = "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-';
     $lmtint = 20;
     $jn = 'tb_grd ON f_zssz_grdid=grdid-jn-tb_xq ON f_zssz_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($zssz, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['zsszop'] == 1) {
             $v['zsszop'] = '是';
         } else {
             $v['zsszop'] = '否';
         }
         //改变bxxsu的具体值
         $bxxs = M('bxxs');
         $tmp = explode('-', $v['zsszbxxsu']);
         $str = '';
         for ($i = 1; $i < count($tmp) - 1; $i++) {
             $bxxso = $bxxs->where('bxxsid=' . $tmp[$i])->find();
             $str = $str . $bxxso['bxxsnm'] . ' ';
         }
         $v['zsszbxxsu'] = $str;
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $this->assign('title', '浏览招生设置列表');
     $this->assign('theme', '招生设置管理');
     $this->display('query');
 }
Exemplo n.º 21
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Zsf'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_zsf_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_zsf_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $zsf = M($grdo['grdnm'] . '_zsf');
     $fldint = '-zsfid-grdnm-dmnm-zsfsm-';
     $cdtint = "-sp-f_zsf_grdid-eq-" . $grdo['grdid'] . "-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-';
     $lmtint = 20;
     $jn = 'tb_grd ON f_zsf_grdid=grdid-jn-tb_dm ON f_zsf_dmid=dmid';
     //$jn='tb_ath ON f_zsf_athid=athid-jn-tb_atc ON f_zsf_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($zsf, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $arr['mls']);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     $dm = M('dm');
     $dmls = $dm->order('dmnm DESC')->select();
     $this->assign('dmls', $dmls);
     //q特殊
     $this->assign('title', '浏览住宿费列表');
     $this->assign('theme', '住宿费管理');
     $this->display('query');
 }
Exemplo n.º 22
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Cw'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $cw = M($grdo['grdnm'] . '_cw')->join('tb_' . $grdo['grdnm'] . '_std ON f_cw_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqdm ON stdid=f_stdxqdm_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
     // 		$stdls=$std->select();
     $fldint = '-cwid-bxxsnm-sttnm-f_std_grdid-grdnm-f_cw_xnid-xnnm-f_stdxqcls_clsid-clsnm-stdno-stdnm-sexnm-dmnm-mjnm-statnm-cwyjxfsm-cwyjjckwfsm-cwyjzsfsm-cwsjxfsm-cwsjjckwfsm-cwsjzsfsm-';
     //$cdtint="-sp-f_std_ccid-eq-3-sp-f_std_xxxsid-eq-2-sp-f_std_zsfwid-eq-2-sp-f_std_xzid-eq-2-sp-f_std_sttid-eq-1-sp-f_std_statid-eq-5-sp-";
     //说明:每年的收学费都是 比如 2014-2015学年,那么收费就是2014-2015学年 第1学期 进行注册初始化 注册时候为第1学期 财务的年级、站点 专业的办学形式 层次 科类 决定该学年的收费标准执行
     ////而显示的专业则为,如果他是2014-2015学年第1学期注册的,那么就是顺延到下面一个学期,这两个学期他的最终专业班级为准,毕竟我们看的时候他那一年的终极版本。如果偶尔有人转专业,呵呵,就手动改哈~~ 因此这里需要引入一个学年的概念
     //默认学年 就是 所选的的学年
     //通过学年=》涉及的两个学期,通过站点=》可能注册的学期节点,通过相交,可以找出那个学年的注册学期
     //然后通过当前学期进行判断 显示财务当年最终专业班级的最终学期的学期ID,从而获得学期ID
     //由于和stt有关系,因此,我们xqid的产生也将在下面的stt判断中一并产生,见谅
     $xn = M('xn');
     $xno = $xn->where('xndq=1')->find();
     if ($athofnstt['aths'] == 1) {
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqid = $xqw->getcwxqid($grdid, $xno['xnid'], 1);
         $f_usr_sttid = 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         //if($xqid<$sttintxqo['f_sttintxq_xqid']){$xqid=$sttintxqo['f_sttintxq_xqid'];}//①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_cw_xnid-eq-" . $xno['xnid'] . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . "-sp-f_stdxqdm_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         $xqid = $xqw->getcwxqid($grdid, $xno['xnid'], $f_usr_sttid);
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         //if($xqid<$sttintxqo['f_sttintxq_xqid']){$xqid=$sttintxqo['f_sttintxq_xqid'];}//①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . "-sp-f_stdxqdm_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-f_mj_bxxsid ASC-clsid ASC-mjid ASC-stdno ASC-';
     $lmtint = 20;
     $jn = 'tb_xn ON f_cw_xnid=xnid-jn-tb_stt ON f_std_sttid=sttid-jn-tb_grd ON f_std_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_dm ON f_stdxqdm_dmid=dmid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid-jn-tb_xq ON f_stdxqcls_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($cw, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         //设置对相应的该生是否具有修改权限
         //计算应缴总额和实缴总额
         $v['cwyjze'] = $v['cwyjxfsm'] + $v['cwyjjckwfsm'] + $v['cwyjzsfsm'];
         $v['cwsjze'] = $v['cwsjxfsm'] + $v['cwsjjckwfsm'] + $v['cwsjzsfsm'];
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $bxxs = M('bxxs');
     $bxxsls = $bxxs->select();
     $this->assign('bxxsls', $bxxsls);
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的财务阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     //q特殊
     $cc = M('cc');
     $ccls = $cc->select();
     $this->assign('ccls', $ccls);
     //q特殊
     $kl = M('kl');
     $klls = $kl->select();
     $this->assign('klls', $klls);
     //q特殊
     $xxxs = M('xxxs');
     $xxxsls = $xxxs->select();
     $this->assign('xxxsls', $xxxsls);
     //q特殊
     $zsfw = M('zsfw');
     $zsfwls = $zsfw->select();
     $this->assign('zsfwls', $zsfwls);
     //q特殊
     $xz = M('xz');
     $xzls = $xz->select();
     $this->assign('xzls', $xzls);
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $xq = M('xq');
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     } else {
         $xqls = $xq->order('xqnm DESC')->select();
     }
     $this->assign('xqls', $xqls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_cls_sttid=' . $tmp[0];
     } else {
         if ($athofnstt['aths'] == 1) {
             $where = $where . ' AND f_cls_sttid=1';
         } else {
             $where = $where . ' AND f_cls_sttid=' . $usro['f_usr_sttid'];
         }
     }
     //之前已经确定过到底是看哪个年级
     $where = $where . ' AND f_cls_grdid=' . $grdid;
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->join('tb_stt ON f_cls_sttid=sttid')->where($where)->order('clsnm ASC')->select();
     array_push($clsls, array('clsid' => 0, 'clsnm' => '未分班'));
     $this->assign('clsls', $clsls);
     //q特殊
     $xn = M('xn');
     $xnls = $xn->where('xnnm>=' . $grdo['grdnm'])->order('xnid DESC')->select();
     $this->assign('xnls', $xnls);
     //q特殊
     $dm = M('dm');
     $dmls = $dm->select();
     $this->assign('dmls', $dmls);
     //q特殊
     $sex = M('sex');
     $sexls = $sex->select();
     $this->assign('sexls', $sexls);
     //q特殊
     $rc = M('rc');
     $rcls = $rc->select();
     $this->assign('rcls', $rcls);
     //q特殊
     $zzmm = M('zzmm');
     $zzmmls = $zzmm->select();
     $this->assign('zzmmls', $zzmmls);
     //q特殊
     $xl = M('xl');
     $xlls = $xl->select();
     $this->assign('xlls', $xlls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_std_bxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_bxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_bxxsid=' . $tmp[0];
     }
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_grdid=' . $tmp[0];
     }
     if (preg_match('/f_mj_ccid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_ccid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_ccid=' . $tmp[0];
     }
     if (preg_match('/f_mj_klid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_klid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_klid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xxxsid=' . $tmp[0];
     }
     if (preg_match('/f_mj_zsfwid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_zsfwid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_zsfwid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xzid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xzid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xzid=' . $tmp[0];
     }
     $mj = M($grdo['grdnm'] . '_mj');
     $mjls = $mj->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->where($where)->order('f_mj_bxxsid ASC,mjdm ASC')->select();
     $tmpls = array();
     foreach ($mjls as $v) {
         if (preg_match('/技能/', $v['bxxsnm'])) {
             $v['bxxsnm'] = '技能';
         } else {
             if (preg_match('/自考/', $v['bxxsnm'])) {
                 $v['bxxsnm'] = '自考';
             } else {
                 $v['bxxsnm'] = '普通';
             }
         }
         array_push($tmpls, $v);
     }
     $this->assign('mjls', $tmpls);
     //q特殊
     $stat = M('stat');
     $statls = $stat->select();
     $this->assign('statls', $statls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '浏览财务列表');
     $this->assign('theme', '财务管理');
     $this->display('query');
 }
Exemplo n.º 23
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Grp'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     import('@.TREE.TreeAction');
     $tree = new TreeAction();
     $grp = M('grp');
     $grpls = $grp->order('grpodr ASC')->select();
     //在按照这个顺序前提下,使用tree方法就能有序的得到
     $str = $tree->unlimitedForList($grpls, 0, 'grpid', 'grpnm', 'grppid', 'grpodr');
     $this->assign('tree', $str);
     $this->assign('title', '浏览团队列表');
     $this->assign('theme', '团队管理');
     $this->display('query');
 }
Exemplo n.º 24
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Zsjx'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     $zssz = M('zssz');
     $zsszo = $zssz->find();
     $tmp = explode(' ', $zsszo['zsszxnltm']);
     $zsszo['zsszxnltm'] = $tmp[0];
     $this->assign('zsszo', $zsszo);
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdid = $zsszo['f_zssz_grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $std = M($grdo['grdnm'] . '_std')->join('tb_' . $grdo['grdnm'] . '_zsjx ON f_zsjx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqdm ON stdid=f_stdxqdm_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid')->join('tb_' . $grdo['grdnm'] . '_cw ON stdid=f_cw_stdid');
     //因为2015级他们进来也就一次的信息也不可能有其他的信息,所以,他们是单一的记录,不会重复的
     // 		$stdls=$std->select();
     $fldint = '-stdid-bxxsnm-f_std_grdid-f_stdxqcls_xqid-f_stdxqcls_clsid-stdaplno-stdno-stdnm-stdcp-stdrltacp-stdrltbcp-clsnm-sexnm-stdbtd-mjnm-statnm-zsjxsg-zsjxtz-zsjxxm-stdpt-';
     //$cdtint="-sp-f_std_ccid-eq-3-sp-f_std_xxxsid-eq-2-sp-f_std_zsfwid-eq-2-sp-f_std_xzid-eq-2-sp-f_std_sttid-eq-1-sp-f_std_statid-eq-5-sp-";
     //默认学期,
     // 		$xq=M('xq');
     // 		$xqo=$xq->where('xqdq=1')->find();
     // 		$xqid=$xqo['xqid'];
     $xqid = $zsszo['f_zssz_xqid'];
     $cdtint = "-sp-f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-1-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . "-sp-f_stdxqdm_xqid-eq-" . $xqid . '-sp-';
     $spccdtint = "-sp-(f_std_statid<>9)-sp-";
     ///只有上传过程亨且没有退学的人才有资格排学号
     $odrint = '-mjnm ASC-stdno ASC-stdaplno ASC-';
     $lmtint = 20;
     $jn = 'tb_stt ON f_std_sttid=sttid-jn-tb_grd ON f_std_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_dm ON f_stdxqdm_dmid=dmid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid-jn-tb_xq ON f_stdxqcls_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($std, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
     $mls = $arr['mls'];
     $bzr = M($grdo['grdnm'] . '_bzr');
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['stdbtd'] < $zsszo['zsszxnltm']) {
             $v['xnl'] = '否';
         } else {
             $v['xnl'] = '是';
         }
         if ($athofn['aths'] == 1) {
             //aths==1说明是教务的人或者是管理员
             $v['mdf'] = 1;
         } else {
             $v['mdf'] = 0;
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //q特殊
     $tmp = explode('-', $zsszo['zsszbxxsu']);
     $where = '1=2';
     for ($i = 1; $i < count($tmp) - 1; $i++) {
         $where = $where . ' OR bxxsid=' . $tmp[$i];
     }
     $bxxs = M('bxxs');
     $bxxsls = $bxxs->where($where)->select();
     $this->assign('bxxsls', $bxxsls);
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的学生阔能还在,因此要保留站点
     $sttls = $stt->where('sttid=1')->select();
     $this->assign('sttls', $sttls);
     //q特殊
     $cc = M('cc');
     $ccls = $cc->where('ccid=3')->select();
     $this->assign('ccls', $ccls);
     //q特殊
     $kl = M('kl');
     $klls = $kl->select();
     $this->assign('klls', $klls);
     //q特殊
     $xxxs = M('xxxs');
     $xxxsls = $xxxs->where('xxxsid=2')->select();
     $this->assign('xxxsls', $xxxsls);
     //q特殊
     $zsfw = M('zsfw');
     $zsfwls = $zsfw->where('zsfwid=2')->select();
     $this->assign('zsfwls', $zsfwls);
     //q特殊
     $xz = M('xz');
     $xzls = $xz->where('xzid=2')->select();
     $this->assign('xzls', $xzls);
     //q特殊
     $grd = M('grd');
     $grdls = $grd->where('grdid=' . $zsszo['f_zssz_grdid'])->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $xq = M('xq');
     $xqls = $xq->where('xqid=' . $zsszo['f_zssz_xqid'])->order('xqnm DESC')->select();
     $this->assign('xqls', $xqls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_std_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_cls_sttid=' . $tmp[0];
     } else {
         if ($athofnstt['aths'] == 1) {
             $where = $where . ' AND f_cls_sttid=1';
         } else {
             $where = $where . ' AND f_cls_sttid=' . $usro['f_usr_sttid'];
         }
     }
     //之前已经确定过到底是看哪个年级
     $where = $where . ' AND f_cls_grdid=' . $grdid . ' AND clsactvt=1';
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->join('tb_stt ON f_cls_sttid=sttid')->where($where)->order('clsnm ASC')->select();
     array_push($clsls, array('clsid' => 0, 'clsnm' => '未分班'));
     $this->assign('clsls', $clsls);
     //q特殊
     $dm = M('dm');
     $dmls = $dm->select();
     $this->assign('dmls', $dmls);
     //q特殊
     $sex = M('sex');
     $sexls = $sex->select();
     $this->assign('sexls', $sexls);
     //q特殊
     $rc = M('rc');
     $rcls = $rc->select();
     $this->assign('rcls', $rcls);
     //q特殊
     $zzmm = M('zzmm');
     $zzmmls = $zzmm->select();
     $this->assign('zzmmls', $zzmmls);
     //q特殊
     $xl = M('xl');
     $xlls = $xl->select();
     $this->assign('xlls', $xlls);
     //q特殊
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_mj_bxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_bxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_bxxsid=' . $tmp[0];
     }
     if (preg_match('/f_std_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_std_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_grdid=' . $tmp[0];
     }
     if (preg_match('/f_mj_ccid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_ccid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_ccid=' . $tmp[0];
     }
     if (preg_match('/f_mj_klid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_klid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_klid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xxxsid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xxxsid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xxxsid=' . $tmp[0];
     }
     if (preg_match('/f_mj_zsfwid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_zsfwid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_zsfwid=' . $tmp[0];
     }
     if (preg_match('/f_mj_xzid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_mj_xzid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_mj_xzid=' . $tmp[0];
     }
     $mj = M($grdo['grdnm'] . '_mj');
     $mjls = $mj->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->where($where)->order('f_mj_bxxsid ASC,mjdm ASC')->select();
     $tmpls = array();
     foreach ($mjls as $v) {
         if (preg_match('/技能/', $v['bxxsnm'])) {
             $v['bxxsnm'] = '技能';
         } else {
             if (preg_match('/自考/', $v['bxxsnm'])) {
                 $v['bxxsnm'] = '自考';
             } else {
                 $v['bxxsnm'] = '普通';
             }
         }
         array_push($tmpls, $v);
     }
     $this->assign('mjls', $tmpls);
     //q特殊
     $stat = M('stat');
     $statls = $stat->where("statactvt=1 AND statmk='zs'")->select();
     $this->assign('statls', $statls);
     $zsjx = M($grdo['grdnm'] . '_zsjx');
     $zsjxtmls = $zsjx->Distinct(true)->field('zsjxtm')->select();
     $this->assign('zsjxtmls', $zsjxtmls);
     $zsjxschqtmls = $zsjx->Distinct(true)->field('zsjxschqtm')->select();
     $this->assign('zsjxschqtmls', $zsjxschqtmls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '浏览军训列表');
     $this->assign('theme', '军训管理');
     $this->display('query');
 }
Exemplo n.º 25
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Tsqk'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_tsqk_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_tsqk_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $tsqk = M($grdo['grdnm'] . '_tsqk');
     // 		$stdls=$std->select();
     $fldint = '-tsqkid-sttnm-f_tsqk_grdid-grdnm-stdno-stdnm-tsqktm-tsqknr-tsqkorgid-tsqknwid-tsqkjbr-';
     //$cdtint="-sp-f_std_ccid-eq-3-sp-f_std_xxxsid-eq-2-sp-f_std_zsfwid-eq-2-sp-f_std_xzid-eq-2-sp-f_std_sttid-eq-1-sp-f_std_statid-eq-5-sp-";
     if ($athofnstt['aths'] == 1) {
         $f_usr_sttid = 1;
         // ①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_tsqk_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-";
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         // ①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_tsqk_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $f_usr_sttid . "-sp-";
         //接下来产生学期
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-tsqktm DESC-';
     $lmtint = 20;
     $jn = 'tb_' . $grdo['grdnm'] . '_std ON f_tsqk_stdid=stdid-jn-tb_stt ON f_std_sttid=sttid-jn-tb_grd ON f_std_grdid=grdid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($tsqk, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //判断std所在的班级,当前人员能否修改。。。其实就是看他是教务的还是管理员还是他亲生班主任
     $mls = $arr['mls'];
     $bzr = M($grdo['grdnm'] . '_bzr');
     $mlsfn = array();
     foreach ($mls as $mv) {
         //处理异动
         if ($mv['tsqknr'] == 1) {
             $mv['tsqknr'] = '换状态';
             $stat = M('stat');
             //原状态
             $stato = $stat->where('statid=' . $mv['tsqkorgid'])->find();
             $mv['tsqkorgid'] = $stato['statnm'];
             //现状态
             $stato = $stat->where('statid=' . $mv['tsqknwid'])->find();
             $mv['tsqknwid'] = $stato['statnm'];
         } else {
             if ($mv['tsqknr'] == 2) {
                 $mv['tsqknr'] = '换专业';
                 $mj = M($grdo['grdnm'] . '_mj');
                 //原专业
                 $mjo = $mj->where('mjid=' . $mv['tsqkorgid'])->find();
                 $mv['tsqkorgid'] = $stato['mjnm'];
                 //现专业
                 $mjo = $mj->where('mjid=' . $mv['tsqknwid'])->find();
                 $mv['tsqknwid'] = $stato['mjnm'];
             } else {
                 if ($mv['tsqknr'] == 3) {
                     $mv['tsqknr'] = '换班级';
                     $cls = M($grdo['grdnm'] . '_cls');
                     //原班级
                     $clso = $cls->where('clsid=' . $mv['tsqkorgid'])->find();
                     $mv['tsqkorgid'] = $stato['clsnm'];
                     //现班级
                     $clso = $cls->where('clsid=' . $mv['tsqknwid'])->find();
                     $mv['tsqknwid'] = $stato['clsnm'];
                 } else {
                     if ($mv['tsqknr'] == 4) {
                         $mv['tsqknr'] = '换寝室';
                         $dm = M('dm');
                         //原状态
                         $dmo = $dm->where('dmid=' . $mv['tsqkorgid'])->find();
                         $mv['tsqkorgid'] = $dmo['dmnm'];
                         //现状态
                         $dmo = $dm->where('dmid=' . $mv['tsqknwid'])->find();
                         $mv['tsqknwid'] = $dmo['dmnm'];
                     }
                 }
             }
         }
         //设置该生最近的mj
         $stdxqmj = M($grdo['grdnm'] . '_stdxqmj');
         $stdxqmjo = $stdxqmj->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->where('f_stdxqmj_stdid=' . $mv['f_tsqk_stdid'])->order('f_stdxqmj_xqid DESC')->find();
         $mv['mjnm'] = $stdxqmjo['mjnm'];
         //设置该生最近的cls
         $stdxqcls = M($grdo['grdnm'] . '_stdxqcls');
         $stdxqclso = $stdxqcls->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->where('f_stdxqcls_stdid=' . $mv['f_tsqk_stdid'])->order('f_stdxqcls_xqid DESC')->find();
         $mv['clsnm'] = $stdxqclso['clsnm'];
         //设置该生最近的dm
         $stdxqdm = M($grdo['grdnm'] . '_stdxqdm');
         $stdxqdmo = $stdxqdm->join('tb_' . 'dm ON f_stdxqdm_dmid=dmid')->where('f_stdxqdm_stdid=' . $mv['f_tsqk_stdid'])->order('f_stdxqdm_xqid DESC')->find();
         $mv['dmnm'] = $stdxqdmo['dmnm'];
         array_push($mlsfn, $mv);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的学生阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '学籍异动(特殊情况)列表');
     $this->assign('theme', '学籍异动(特殊情况)管理');
     $this->display('query');
 }
Exemplo n.º 26
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Bzr'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_bzr_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_bzr_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $bzr = M($grdo['grdnm'] . '_bzr');
     $fldint = '-bzrid-f_bzr_grdid-grdnm-sttnm-usrnn-clsnm-clsactvt-';
     $cdtint = "-sp-f_bzr_grdid-eq-" . $grdo['grdid'] . "-sp-f_usr_sttid-eq-1-sp-f_cls_sttid-eq-1-sp-clsactvt-eq-1-sp-";
     $spccdtint = '-sp-';
     ////
     $odrint = '-';
     $lmtint = 20;
     $jn = 'tb_grd ON f_bzr_grdid=grdid-jn-tb_usr ON f_bzr_usrid=usrid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_bzr_clsid=clsid-jn-tb_stt ON f_cls_sttid=sttid';
     //$jn='tb_ath ON f_bzr_athid=athid-jn-tb_atc ON f_bzr_athid=atcid';//若出现多个join
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($bzr, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     //1、0是否化
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['clsactvt'] == 1) {
             $v['clsactvt'] = '是';
         } else {
             $v['clsactvt'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     //p($arr['mls']);die;
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $stt = M('stt');
     $sttls = $stt->select();
     $this->assign('sttls', $sttls);
     //q特殊
     $usr = M('usr');
     $cdt = $arr['cdt'];
     $where = '1=1';
     if (preg_match('/f_usr_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_usr_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_usr_sttid=' . $tmp[0];
     }
     $rl = M('rl');
     $rlo = $rl->where("rlnm LIKE '%班主任%'")->find();
     $usrrl = M('usrrl');
     $usrrlls = $usrrl->join('tb_usr ON f_usrrl_usrid=usrid')->join('tb_stt ON f_usr_sttid=sttid')->where($where . ' AND f_usrrl_rlid=' . $rlo['rlid'])->order('usrnm ASC')->select();
     $this->assign('usrls', $usrrlls);
     //q特殊
     $cdt = $arr['cdt'];
     $cls = M($grdo['grdnm'] . '_cls');
     $where = '1=1';
     if (preg_match('/f_cls_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cls_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . ' AND f_cls_sttid=' . $tmp[0];
     }
     if (preg_match('/clsactvt/', $cdt)) {
         //获取该键的值
         $tmp = explode('clsactvt', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $where = $where . " AND clsactvt=" . $tmp[0];
     }
     $clsls = $cls->where($where)->order('clsnm ASC')->select();
     $this->assign('clsls', $clsls);
     //q特殊
     $this->assign('title', '浏览班主任列表');
     $this->assign('theme', '班主任管理');
     $this->display('query');
 }
Exemplo n.º 27
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Bkjjqk'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_cjzx_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $this->assign('grdiddft', $grdid);
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $cjzx = clone M($grdo['grdnm'] . '_cjzx');
     $cjzxys = clone M($grdo['grdnm'] . '_cjzx');
     //原生成绩中心
     $cjzxforcls = clone M($grdo['grdnm'] . '_cjzx');
     $cjzx->join('tb_' . $grdo['grdnm'] . '_std ON f_cjzx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid');
     // 		$cjzxls=$cjzx->select();
     $fldint = '-cjzxid-f_cjzx_grdid-stdno-stdnm-sexnm-pkzkkm-cjzxpsf-cjzxsftj-cjzxxk-cjzxqk-xqnm-f_cjzx_pkid-f_cjzx_xqid-kcnm-tcrnn-';
     if (preg_match('/f_cjzx_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
     } else {
         //默认sttid
         if ($athofnstt['aths'] == 1) {
             $sttid = 1;
         } else {
             $sttid = $usro['f_usr_sttid'];
         }
     }
     $this->assign('sttiddft', $sttid);
     if (preg_match('/f_cjzx_xqid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_cjzx_xqid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $xqid = $tmp[0];
     } else {
         $xq = M('xq');
         $xqo = $xq->where('xqdq=1')->find();
         $xqid = $xqo['xqid'] - 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
     }
     $this->assign('xqiddft', $xqid);
     $cdtint = "-sp-f_cjzx_grdid-eq-" . $grdid . "-sp-f_cjzx_sttid-eq-" . $sttid . "-sp-f_cjzx_xqid-eq-" . $xqid . '-sp-' . "f_pk_grdid-eq-" . $grdid . "-sp-f_pk_sttid-eq-" . $sttid . "-sp-f_pk_xqid-eq-" . $xqid . '-sp-' . "f_std_grdid-eq-" . $grdid . "-sp-f_std_sttid-eq-" . $sttid . "-sp-f_std_statid-eq-5-sp-f_stdxqcls_xqid-eq-" . $xqid . "-sp-f_stdxqmj_xqid-eq-" . $xqid . '-sp-';
     $spccdtint = '-sp-';
     ////
     $odrint = '-f_mj_bxxsid ASC-clsid ASC-mjid ASC-stdno ASC-pkzkkm ASC-kcnm ASC-';
     $lmtint = 100;
     $jn = 'tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid-jn-tb_stt ON f_cjzx_sttid=sttid-jn-tb_grd ON f_cjzx_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid-jn-tb_tcr ON f_pk_tcrid=tcrid-jn-tb_xq ON f_cjzx_xqid=xqid' . '-jn-tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid-jn-tb_bxxs ON f_mj_bxxsid=bxxsid-jn-tb_cc ON f_mj_ccid=ccid-jn-tb_kl ON f_mj_klid=klid-jn-tb_xxxs ON f_mj_xxxsid=xxxsid-jn-tb_zsfw ON f_mj_zsfwid=zsfwid-jn-tb_xz ON f_mj_xzid=xzid-jn-tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid-jn-tb_sex ON f_std_sexid=sexid-jn-tb_rc ON f_std_rcid=rcid-jn-tb_zzmm ON f_std_zzmmid=zzmmid-jn-tb_xl ON f_std_xlid=xlid-jn-tb_stat ON f_std_statid=statid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $cls = M($grdo['grdnm'] . '_cls');
     $clsls = $cls->where('clsactvt=1 AND f_cls_sttid=' . $sttid)->order('clsnm ASC')->select();
     $stdxqcls = M($grdo['grdnm'] . '_stdxqcls');
     $clslsfn = array();
     //不管你filed啊JOIN啊,多少东西,一旦搞上了,脱不掉的,但是一旦查询一次后,这些搞上的就统统没了,要查询重新搞
     //简称 搞上 查询掉
     foreach ($clsls as $v) {
         $clsid = $v['clsid'];
         //找学生代表
         //JOIN只能JOIN一次//但是实践发现 for第二轮循环的时候join部分被剥离了。
         $stdls = $stdxqcls->join('tb_' . $grdo['grdnm'] . '_std ON f_stdxqcls_stdid=stdid')->where('f_stdxqcls_xqid=' . $xqid . ' AND f_stdxqcls_clsid=' . $clsid . ' AND f_std_statid=5')->order('stdno ASC')->select();
         //默认第一个学生为学生代表
         $pkidls = $cjzxforcls->Distinct(true)->field('pkid')->join('tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid')->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->join('tb_' . $grdo['grdnm'] . '_std ON f_cjzx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid')->join('tb_stt ON f_std_sttid=sttid')->join('tb_grd ON f_std_grdid=grdid')->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->join('tb_cc ON f_mj_ccid=ccid')->join('tb_kl ON f_mj_klid=klid')->join('tb_xxxs ON f_mj_xxxsid=xxxsid')->join('tb_zsfw ON f_mj_zsfwid=zsfwid')->join('tb_xz ON f_mj_xzid=xzid')->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->join('tb_sex ON f_std_sexid=sexid')->join('tb_rc ON f_std_rcid=rcid')->join('tb_zzmm ON f_std_zzmmid=zzmmid')->join('tb_xl ON f_std_xlid=xlid')->join('tb_stat ON f_std_statid=statid')->join('tb_xq ON f_stdxqcls_xqid=xqid')->where("f_cjzx_xqid=" . $xqid . " AND f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_std_statid=5 AND  f_stdxqcls_clsid=" . $v['clsid'] . ' AND pkzkkm=0')->select();
         $where = '1=2';
         foreach ($pkidls as $vI) {
             $where = $where . ' OR pkid=' . $vI['pkid'];
         }
         $pk = m($grdo['grdnm'] . '_pk');
         $pkls = $pk->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->where($where)->order('pkzkkm ASC,kcnm ASC')->select();
         //只需要判断这门课选了的相关学生有一个人被提交了,那么整个班都提交了
         //针对每一个pk,我们要查看教师是否已经提交了//PS:这里的PK实质是cjzx
         $pklsfn = array();
         foreach ($pkls as $vI) {
             //看下有没有需要补考的学生,没的话就不用体现出来了
             $cjzx = M($grdo['grdnm'] . '_cjzx');
             $cjzxnb = $cjzx->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON f_cjzx_stdid=f_stdxqcls_stdid')->where('f_cjzx_sttid=' . $sttid . ' AND f_cjzx_xqid=' . $xqid . ' AND f_stdxqcls_xqid=' . $xqid . ' AND f_cjzx_pkid=' . $vI['pkid'] . ' AND f_stdxqcls_clsid=' . $clsid . ' AND (cjzxhk=1 OR(cjzxzf>30 AND cjzxzf<60))')->count();
             if ($cjzxnb > 0) {
                 //先看任课老师交卷是否妥
                 $jjflg = 0;
                 $jjyiflg = 0;
                 $jjlingflg = 0;
                 //
                 $cjzxnbys = $cjzxys->join('tb_' . $grdo['grdnm'] . '_pk ON f_cjzx_pkid=pkid')->join('tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid')->join('tb_tcr ON f_pk_tcrid=tcrid')->join('tb_' . $grdo['grdnm'] . '_std ON f_cjzx_stdid=stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqcls ON stdid=f_stdxqcls_stdid')->join('inner join tb_' . $grdo['grdnm'] . '_stdxqmj ON stdid=f_stdxqmj_stdid')->join('tb_stt ON f_std_sttid=sttid')->join('tb_grd ON f_std_grdid=grdid')->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->join('tb_cc ON f_mj_ccid=ccid')->join('tb_kl ON f_mj_klid=klid')->join('tb_xxxs ON f_mj_xxxsid=xxxsid')->join('tb_zsfw ON f_mj_zsfwid=zsfwid')->join('tb_xz ON f_mj_xzid=xzid')->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->join('tb_sex ON f_std_sexid=sexid')->join('tb_rc ON f_std_rcid=rcid')->join('tb_zzmm ON f_std_zzmmid=zzmmid')->join('tb_xl ON f_std_xlid=xlid')->join('tb_stat ON f_std_statid=statid')->join('tb_xq ON f_stdxqcls_xqid=xqid')->where("f_cjzx_xqid=" . $xqid . " AND f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_std_statid=5 AND  f_stdxqcls_clsid=" . $v['clsid'] . ' AND f_cjzx_pkid=' . $vI['pkid'] . ' AND (cjzxhk=1 OR(cjzxzf>30 AND cjzxzf<60))' . " AND (cjzxbkf='' OR cjzxbkf IS NULL)")->count();
                 if ($cjzxnbys == 0) {
                     //都有补考成绩(不来的就是缺考,也算有成绩)
                     $jjflg = 1;
                 }
                 $vI['jjflg'] = $jjflg;
                 array_push($pklsfn, $vI);
             }
         }
         $v['pkls'] = $pklsfn;
         array_push($clslsfn, $v);
     }
     //为了确保有NB过程,所以我们不管是有没有班级,统一NB一次,反正得到的ARR也不用,且却得到很多必要参数
     $arr = $NB->NB($cjzx, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn, 'n', 'n');
     ////
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('clsls', $clslsfn);
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     $stt = M('stt');
     $sttls = $stt->order('sttid ASC')->select();
     $this->assign('sttls', $sttls);
     import('@.XQ.XQAction');
     $xqw = new XQAction();
     //外来的学期
     $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     $this->assign('xqls', $xqls);
     //q特殊
     $this->assign('title', '交卷情况列表');
     $this->assign('theme', '交卷情况管理');
     $this->display('query');
 }
Exemplo n.º 28
0
 function query()
 {
     header("Content-Type:text/html; charset=utf-8");
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Pk'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], 'qry');
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     //鉴权对用户对stt的权限,若为设置权限,说明是教务的人,可以全管,否则只能管自己函授站的 ntf为不用this assign的
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Stt'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofnstt = $Idtath->identify($mdo['mdid'], 'ntf');
     $usr = M('usr');
     $usro = $usr->where('usrid=' . session('usridss'))->find();
     //第几学年 第几学期的班级 第几学年 第几学期的专业 ...
     //因为grd无法定下来,所以pkxqcls pkxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓
     //NB初始化,开始
     $cdt = $_GET['cdt'];
     $grd = M('grd');
     if (preg_match('/f_pk_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_pk_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
     } else {
         //默认grdid
         $grdo = $grd->order('grdid DESC')->find();
         $grdid = $grdo['grdid'];
     }
     $grdo = $grd->where('grdid=' . $grdid)->find();
     $pk = M($grdo['grdnm'] . '_pk');
     // 		$pkls=$pk->select();
     $fldint = '-pkid-f_pk_grdid-grdnm-sttnm-xqnm-kcnm-tcrnn-pkwqm-pkwps-pkwxt-pkzkkm-';
     //$cdtint="-sp-f_pk_ccid-eq-3-sp-f_pk_xxxsid-eq-2-sp-f_pk_zsfwid-eq-2-sp-f_pk_xzid-eq-2-sp-f_pk_sttid-eq-1-sp-f_pk_statid-eq-5-sp-";
     //默认学期,
     $xq = M('xq');
     $xqo = $xq->where('xqdq=1')->find();
     $xqid = $xqo['xqid'];
     if ($athofnstt['aths'] == 1) {
         $f_usr_sttid = 1;
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_pk_grdid-eq-" . $grdid . "-sp-f_pk_sttid-eq-" . $f_usr_sttid . "-sp-f_pk_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     } else {
         $f_usr_sttid = $usro['f_usr_sttid'];
         $sttintxq = M($grdo['grdnm'] . '_sttintxq');
         $sttintxqo = $sttintxq->where('f_sttintxq_grdid=' . $grdo['grdid'] . ' AND f_sttintxq_sttid=' . $f_usr_sttid)->find();
         if ($xqid < $sttintxqo['f_sttintxq_xqid']) {
             $xqid = $sttintxqo['f_sttintxq_xqid'];
         }
         //①如果激活的学期在初始学期后范围内的那么就选激活的学期②如果...在范围外的话呢就选择第初始学期为默认学期
         $cdtint = "-sp-f_pk_grdid-eq-" . $grdid . "-sp-f_pk_sttid-eq-" . $f_usr_sttid . "-sp-f_pk_xqid-eq-" . $xqid . '-sp-';
         //接下来产生学期
     }
     $spccdtint = '-sp-';
     ////
     $odrint = '-';
     $lmtint = 20;
     $jn = 'tb_stt ON f_pk_sttid=sttid-jn-tb_grd ON f_pk_grdid=grdid-jn-tb_' . $grdo['grdnm'] . '_kc ON f_pk_kcid=kcid-jn-tb_tcr ON f_pk_tcrid=tcrid-jn-tb_xq ON f_pk_xqid=xqid';
     import('@.NB.NBAction');
     $NB = new NBAction();
     $arr = $NB->NB($pk, $fldint, $cdtint, $spccdtint, $odrint, $lmtint, $jn);
     ////
     $mls = $arr['mls'];
     $mlsfn = array();
     foreach ($mls as $v) {
         if ($v['pkzkkm'] == 1) {
             $v['pkzkkm'] = '是';
         } else {
             $v['pkzkkm'] = '否';
         }
         array_push($mlsfn, $v);
     }
     $this->assign('fstrw', $arr['fstrw']);
     $this->assign('sqlstc', $arr['sqlstc']);
     $this->assign('fld', $arr['fld']);
     $this->assign('cdt', $arr['cdt']);
     $this->assign('spccdt', $arr['spccdt']);
     ////
     $this->assign('odr', $arr['odr']);
     $this->assign('lmt', $arr['lmt']);
     $this->assign('count', $arr['count']);
     $this->assign('mls', $mlsfn);
     $this->assign('page_method', $arr['page_method']);
     //NB初始化,结束
     if (preg_match('/f_pk_grdid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_pk_grdid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $grdid = $tmp[0];
         $grdo = $grd->where('grdid=' . $grdid)->find();
     } else {
         $grdo = $grd->order('grdnm DESC')->find();
     }
     //q特殊
     $grd = M('grd');
     $grdls = $grd->order('grdnm DESC')->select();
     $this->assign('grdls', $grdls);
     //q特殊
     $stt = M('stt');
     //因为你站点可能木有了,但是站点已经招的排课阔能还在,因此要保留站点
     if ($athofnstt['aths'] == 1) {
         $sttls = $stt->select();
     } else {
         $sttls = $stt->where('sttid=' . $usro['f_usr_sttid'])->select();
     }
     $this->assign('sttls', $sttls);
     $cdt = $arr['cdt'];
     //q特殊
     $xq = M('xq');
     if (preg_match('/f_pk_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_pk_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         import('@.XQ.XQAction');
         $xqw = new XQAction();
         //外来的学期
         $xqls = $xqw->getxqls($grdo['grdid'], $sttid, 'DESC');
     } else {
         $xqls = $xq->order('xqnm DESC')->select();
     }
     $this->assign('xqls', $xqls);
     //课程
     //q特殊
     $kc = M($grdo['grdnm'] . '_kc');
     $kcls = $kc->where('f_kc_grdid=' . $grdo['grdid'])->select();
     $this->assign('kcls', $kcls);
     //教师
     //q特殊
     $tcr = M('tcr');
     if (preg_match('/f_pk_sttid/', $cdt)) {
         //获取该键的值
         $tmp = explode('f_pk_sttid', $cdt);
         $tmp = explode('-eq-', $tmp[1]);
         $tmp = explode('-sp-', $tmp[1]);
         $sttid = $tmp[0];
         $tcr = M('tcr');
         $tcrls = $tcr->where('f_tcr_sttid=' . $sttid)->select();
     } else {
         $tcrls = $tcr->where('f_tcr_sttid=1')->select();
     }
     $this->assign('tcrls', $tcrls);
     //用于生成xls
     $this->assign('grdnm', $grdo['grdnm']);
     //q特殊
     $this->assign('title', '浏览排课列表');
     $this->assign('theme', '排课管理');
     $this->display('query');
 }