public function index() { //处理ss import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //设置 导航 bd import('@.TREE.TreeAction'); $tree = new TreeAction(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $atc = M('atc'); $atc = M('atc'); $atcls = $atc->join('tb_bd ON f_atc_bdid=bdid')->where("atcps=1 AND atcvw=1 AND atczs=1")->order('atctp DESC,atcmdftm DESC')->limit(0, 10)->select(); for ($i = 0; $i < count($atcls); $i++) { if (mb_strlen($atcls[$i]['atctpc'], 'utf-8') > 30) { $atcls[$i]['atctpcsrk'] = mb_substr($atcls[$i]['atctpc'], 0, 30, 'utf-8') . '...'; } else { $atcls[$i]['atctpcsrk'] = $atcls[$i]['atctpc']; } $tmp = explode(' ', $atcls[$i]['atcmdftm']); $atcls[$i]['atcmdftmst'] = $tmp[0]; } $this->assign('atcls', $atcls); //通用部分 $this->assign('title', '招生平台'); $this->assign('theme', '招生平台'); $this->display('index'); }
public function index() { //处理ss import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //设置 导航 bd import('@.TREE.TreeAction'); $tree = new TreeAction(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); //通用部分 $this->assign('title', '学生后台'); $this->assign('theme', '学生后台'); $this->display('index'); }
function cxlncj() { //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //设置 导航 bd import('@.TREE.TreeAction'); $tree = new TreeAction(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $stdid = session('stdidss'); $grdid = session('grdidss'); $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $cjzx = M($grdo['grdnm'] . '_cjzx'); $cjzxls = $cjzx->join('tb_xq ON f_cjzx_xqid=xqid')->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_stdid=' . $stdid)->order('xqnm ASC,pkzkkm ASC,kcnm ASC')->select(); $cjzxlsfn = array(); foreach ($cjzxls as $cjzxv) { if ($cjzxv['pkzkkm' == 1]) { $cjzxv['kcnm'] = $cjzxv['kcnm'] . '【自考科目】'; } if ($cjzxv['cjzxsftj'] == 0) { $cjzxv['cjzxzf'] = ''; } array_push($cjzxlsfn, $cjzxv); } $this->assign('cjzxls', $cjzxlsfn); $this->assign('title', '查询历年成绩'); $this->assign('theme', '查询历年成绩'); $this->display('cxlncj'); }
function gtxpg() { $x = $_GET['x']; //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //鉴权分立partA $mdII = M('md'); $mdo = $mdII->where("mdmk='Cstmusr'")->find(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); // import('@.KZMB.KZMBAction'); // $kzmb = new KZMBAction(); // $kzmb->setkzmb($mdo['mdid']); //个人行为不参与鉴权 if ($x == 'select') { $this->display('select'); } else { if ($x == 'login') { $this->display('login'); } else { if ($x == 'regist') { //配置页面显示内容 $mo['cstmusrid'] = 0; $mo['cstmusrpt'] = C('PUBLIC') . '/IMG/default.jpg'; $this->assign('mo', $mo); $this->assign('title', '客户用户注册页面'); $this->assign('theme', '注册:'); $this->assign('btnvl', '添加'); $this->display('regist'); } else { if ($x == 'center') { $cstmusrid = session('cstmusridss'); $cstmusr = M('cstmusr'); $mo = $cstmusr->where('cstmusrid=' . $cstmusrid)->find(); $wxusrcstmusr = M('wxusrcstmusr'); $wxusrcstmusro = $wxusrcstmusr->where('f_wxusrcstmusr_cstmusrid=' . $cstmusrid)->find(); if ($wxusrcstmusro) { if ($wxusrcstmusro['wxusrcstmusriswx'] == 1) { $this->assign('iswxcb', 1); //微信账户和类微信账户的combine } else { $this->assign('iscb', 1); } $wxusr = M('wxusr'); $wxusro = $wxusr->where('wxusrid=' . $wxusrcstmusro['f_wxusrcstmusr_wxusrid'])->find(); $mo['cstmusrpt'] = $wxusro['wxusrpt']; } //以后扩展看是在哪个grp哪个角色 //$mo=$cstmusr->join('tb_ath ON f_cstmusr_athid=athid')->where('cstmusrid='.$cstmusrid)->find(); // if($mo['f_cstmusr_athid']==0){ // $mo['athnm']='无权限'; // } if ($mo['cstmusrps'] == 1) { $mo['cstmusrps'] = '客户用户状态正常'; } else { $mo['cstmusrps'] = '客户用户状态冻结'; } $this->assign('title', '客户用户中心'); $this->assign('theme', '客户用户中心:'); $this->assign('mo', $mo); $this->display('center'); } else { if ($x == 'modify') { $cstmusr = M('cstmusr'); $cstmusrid = session('cstmusridss'); $mo = $cstmusr->where('cstmusrid=' . $cstmusrid)->find(); $mo['dsplpt'] = $mo['cstmusrpt']; //判断下是否有相关绑出来的头像 $wxusrcstmusr = M('wxusrcstmusr'); $wxusrcstmusro = $wxusrcstmusr->where('f_wxusrcstmusr_cstmusrid=' . $cstmusrid)->find(); if ($wxusrcstmusro && strpos($mo['cstmusrpt'], 'default') != false) { $wxusr = M('wxusr'); $wxusro = $wxusr->where('wxusrid=' . $wxusrcstmusro['f_wxusrcstmusr_wxusrid'])->find(); $mo['dsplpt'] = $wxusro['wxusrpt']; } $this->assign('mo', $mo); $this->assign('title', '客户用户修改页面'); $this->assign('theme', '修改:'); $this->assign('btnvl', '修改'); $this->display('modify'); } else { if ($x == 'modifypw') { $cstmusr = M('cstmusr'); $cstmusrid = session('cstmusridss'); $mo = $cstmusr->where('cstmusrid=' . $cstmusrid)->find(); $this->assign('mo', $mo); $this->assign('title', '客户用户修改密码页面'); $this->assign('theme', '修改密码:'); $this->assign('btnvl', '修改'); $this->display('modifypw'); } else { if ($x == 'combine') { $cstmusrid = session('cstmusridss'); $cstmusr = M('cstmusr'); $mo = $cstmusr->where('cstmusrid=' . $cstmusrid)->find(); $wxusrcstmusr = M('wxusrcstmusr'); $wxusrcstmusro = $wxusrcstmusr->where('f_wxusrcstmusr_cstmusrid=' . $cstmusrid)->find(); if ($wxusrcstmusro && strpos($mo['cstmusrpt'], 'default') != false) { $wxusr = M('wxusr'); $wxusro = $wxusr->where('wxusrid=' . $wxusrcstmusro['f_wxusrcstmusr_wxusrid'])->find(); $mo['cstmusrpt'] = $wxusro['wxusrpt']; } $this->assign('title', '微信用户绑定'); $this->assign('theme', '微信用户绑定:'); $this->assign('mo', $mo); $this->display('combine'); } else { if ($x == 'forget') { $this->assign('title', '忘记密码'); $this->assign('theme', '忘记密码:'); $this->assign('btnvl', '发送至邮箱'); $this->display('forget'); } else { if ($x == 'modifypwml') { $vrf = $_GET['vrf']; $ssid = $_GET['ssid']; $ss = M('ss'); $sso = $ss->where('ssid=' . $ssid)->find(); $cstmusr = M('cstmusr'); if ($vrf != $sso['ssvrf']) { //验证码过期 $errmsg = '验证码已过期'; $this->assign('theme', '结果:'); $this->assign('errmsg', $errmsg); $this->display('vrferror'); } else { if (time() - $sso['sstm'] > 1800) { //超过30分钟了 $errmsg = '已经超过30分钟,请重新认证'; $this->assign('theme', '结果:'); $this->assign('errmsg', $errmsg); $this->display('vrferror'); } else { $mo = $cstmusr->where("cstmusrnm='" . $sso['sscstmusrnm'] . "'")->find(); $this->assign('mo', $mo); $this->assign('title', '客户用户通过密保修改密码页面'); $this->assign('theme', '修改密码:'); $this->assign('btnvl', '修改'); $this->display('modifypwml'); } } } } } } } } } } } }
public function index() { //处理ss import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //设置 导航 bd import('@.TREE.TreeAction'); $tree = new TreeAction(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $atc = M('atc'); //获得焦点图 $atcfcsls = $atc->join('tb_bd ON f_atc_bdid=bdid')->where("atcps=1 AND atcvw=1 AND atcnw=0 AND atcdnmc=1 AND atccv<>'dflt'")->order('atctp DESC,atcmdftm DESC')->limit(0, 5)->select(); for ($i = 0; $i < count($atcfcsls); $i++) { if (mb_strlen($atcfcsls[$i]['atctpc'], 'utf-8') > 10) { $atcfcsls[$i]['atctpcsrk'] = mb_substr($atcfcsls[$i]['atctpc'], 0, 10, 'utf-8') . '...'; } else { $atcfcsls[$i]['atctpcsrk'] = $atcfcsls[$i]['atctpc']; } if ($i == 0) { $atcfcsls[$i]['class'] = 'active'; } else { $atcfcsls[$i]['class'] = ''; } } $this->assign('atcfcsls', $atcfcsls); //左侧部分的文章 //首先找出所有第一级的bd $bd = M('bd'); $bdls = $bd->order('bdodr ASC')->select(); //在按照这个顺序前提下,使用tree方法就能有序的得到 $bdlsnog = $bd->where('bdpid=0')->order('bdodr ASC')->select(); //NO 1 generation for ($i = 0; $i < count($bdlsnog); $i++) { $bdidall = $tree->unlimitedForListID($bdls, $bdlsnog[$i]['bdid'], 'bdid', 'bdnm', 'bdpid', 'bdodr'); //设置搜索条件 $sccdt = 'f_atc_bdid=' . $bdlsnog[$i]['bdid']; $tmp = explode('-', $bdidall); for ($j = 0; $j < count($tmp); $j++) { if ($tmp[$j] != '') { $sccdt = $sccdt . ' OR f_atc_bdid=' . $tmp[$j]; } } $atcls = $atc->field('atcid,atctpc,atcmdftm,atctp')->where("atcps=1 AND atcvw=1 AND atcnw='n' AND (" . $sccdt . ")")->order('atctp DESC,atcmdftm DESC')->limit(0, 6)->select(); for ($j = 0; $j < count($atcls); $j++) { if (mb_strlen($atcls[$j]['atctpc'], 'utf-8') > 15) { $atcls[$j]['atctpcsrk'] = mb_substr($atcls[$j]['atctpc'], 0, 15, 'utf-8') . '...'; } else { $atcls[$j]['atctpcsrk'] = $atcls[$j]['atctpc']; } $time = strtotime($atcls[$j]['atcmdftm']); $atcls[$j]['atcmdftm'] = date("Y/m/d", $time); if ($atcls[$j]['atctp'] == 1) { $atcls[$j]['atcstyle'] = 'font-weight:bold'; $atcls[$j]['atcflag'] = 'glyphicon glyphicon-equalizer'; } } //$this->assign('atcls'.$bdlsnog[$i]['bdid'],$atcls); $bdlsnog[$i]['atcls'] = $atcls; } $this->assign('bdlsnog', $bdlsnog); //获得通知公告 $atcls = $atc->field('atcid,atctpc,atcmdftm,atctp')->where("atcps=1 AND atcvw=1 AND atcnw=0 AND atcanc=1")->order('atctp DESC,atcmdftm DESC')->limit(0, 6)->select(); for ($j = 0; $j < count($atcls); $j++) { $time = strtotime($atcls[$j]['atcmdftm']); $atcls[$j]['atcmdftm'] = date("Y/m/d", $time); if ($atcls[$j]['atctp'] == 1) { $atcls[$j]['atcstyle'] = 'font-weight:bold'; $atcls[$j]['atcflag'] = 'glyphicon glyphicon-equalizer'; } } $this->assign('atclsanc', $atcls); //获得院校动态 $atcls = $atc->field('atcid,atctpc,atcmdftm,atctp')->where("atcps=1 AND atcvw=1 AND atcnw=0 AND atcdnmc=1")->order('atctp DESC,atcmdftm DESC')->limit(0, 6)->select(); for ($j = 0; $j < count($atcls); $j++) { $time = strtotime($atcls[$j]['atcmdftm']); $atcls[$j]['atcmdftm'] = date("Y/m/d", $time); if ($atcls[$j]['atctp'] == 1) { $atcls[$j]['atcstyle'] = 'font-weight:bold'; $atcls[$j]['atcflag'] = 'glyphicon glyphicon-equalizer'; } } $this->assign('atclsdnmc', $atcls); //获得二维码 //首先获得服务器的广域网域名 $sys = M('sys'); $syso = $sys->find(); $url = 'http://' . $syso['sysip'] . '/' . $syso['sysnm'] . '/wap.php'; $this->assign('url', $url); import('@.QR.QRAction'); $qr = new QRAction(); $qrimgurl = $qr->getQR($url); $qr = $qrimgurl; $this->assign('qr', $qr); //通用部分 $this->assign('title', 'Geek标准'); $this->assign('theme', 'Geek主题'); $this->display('index'); }
function collect() { header("Content-Type:text/html; charset=utf-8"); //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $cstmusrid = session('cstmusridss'); $atcclct = M('atcclct'); //$bbb=$atcclct->select();p($bbb);die; // $aaaa=$atcclct->join('tb_atc ON f_atcclct_atcid=atcid')->join('tb_cstmusr ON f_atcclct_cstmusrid=cstmusrid')->join('tb_bd ON f_atc_bdid=bdid') // ->where("atcps='y' AND atcvw='y' AND cstmusrid=".$cstmusrid)->select();p($aaaa);die; //NB初始化,开始 $cstmusrid = session('cstmusridss'); $cstmatcclct = M('cstmatcclct'); $atc = M('atc'); $bd = M('bd'); //设置每页多少条//由于采用下拉方案,因此无法享受show方案的参数值续传,得自己来设置 $lmt = 10; $bdo['bdnm'] = "<ol class='breadcrumb'><li><a href='" . __APP__ . "'>首页</a></li><li><a href='#'>我的收藏</a></li></ol>"; $this->assign('bdo', $bdo); $bdlsxd = $bd->where('bdpid=0')->order('bdodr ASC')->select(); $this->assign('bdlsxd', $bdlsxd); $this->assign('hdlpldnld', __URL__ . '/appendatcclct'); $atcls = $cstmatcclct->join('tb_cstmusr ON f_cstmatcclct_cstmusrid=cstmusrid')->join('tb_atc ON f_cstmatcclct_atcid=atcid')->field('atcid,atctpc,atcmdftm,atctp,atccv,atczn,atctc,atccnt')->where("atcps=1 AND atcvw=1 AND atcnw=0 AND cstmusrid=" . $cstmusrid)->order('atctp DESC,atcmdftm DESC')->limit(0, $lmt)->select(); for ($j = 0; $j < count($atcls); $j++) { //处理封面 if ($atcls[$j]['atccv'] == 'dflt') { $atcls[$j]['atccv'] = C('PUBLIC') . '/IMG/atcdflt.png'; } //处理题目长度 if (mb_strlen($atcls[$j]['atctpc'], 'utf-8') > 30) { $atcls[$j]['atctpcsrk'] = mb_substr($atcls[$j]['atctpc'], 0, 30, 'utf-8') . '...'; } else { $atcls[$j]['atctpcsrk'] = $atcls[$j]['atctpc']; } $time = strtotime($atcls[$j]['atcmdftm']); $atcls[$j]['atcmdftm'] = date("Y/m/d", $time); if ($atcls[$j]['atctp'] == 1) { $atcls[$j]['atcstyle'] = 'font-weight:bold'; $atcls[$j]['atcflag'] = 'glyphicon glyphicon-equalizer'; } //获得评论数 $cstmcmt = M('cstmcmt'); $cstmcmtcnt = $cstmcmt->where('f_cstmcmt_atcid=' . $atcls[$j]['atcid'])->count(); $atcls[$j]['cstmcmtcnt'] = $cstmcmtcnt; } $this->assign('atcls', $atcls); if ($cstmatcclct->join('tb_cstmusr ON f_cstmatcclct_cstmusrid=cstmusrid')->join('tb_atc ON f_cstmatcclct_atcid=atcid')->field('atcid,atctpc,atcmdftm,atctp,atccv,atczn,atctc,atccnt')->where("atcps=1 AND atcvw=1 AND atcnw=0 AND cstmusrid=" . $cstmusrid)->order('atctp DESC,atcmdftm DESC')->limit($lmt, 1)->select()) { $hsnxt = 'y'; } else { $hsnxt = 'n'; } $this->assign('hsnxt', $hsnxt); //记录当前页 $this->assign('pg', 1); //给活动浏览页面赋值,使其和新的一样,不会因为刷新残留参数而没用//之前已经有hsnxt 和 pg搞定了 $this->assign('executing', 'n'); //通用部分 $this->assign('title', '文章浏览'); $this->assign('theme', 'Geek主题'); $this->display('query'); }
function gtxpg() { $x = $_GET['x']; //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //鉴权分立partA $mdII = M('md'); $mdo = $mdII->where("mdmk='Cstmusr'")->find(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); // import('@.KZMB.KZMBAction'); // $kzmb = new KZMBAction(); // $kzmb->setkzmb($mdo['mdid']); //个人行为不参与鉴权 if ($x == 'center') { $wxusross = session('wxusross'); $wxusr = M('wxusr'); $mo = $wxusr->where("wxusropid='" . $wxusross['wxusropid'] . "'")->find(); $this->assign('title', '微信用户中心'); $this->assign('theme', '微信用户中心:'); $this->assign('mo', $mo); $this->display('center'); } else { if ($x == 'combine') { $wxusross = session('wxusross'); $wxusr = M('wxusr'); $mo = $wxusr->where("wxusropid='" . $wxusross['wxusropid'] . "'")->find(); $this->assign('title', '微信用户绑定'); $this->assign('theme', '微信用户绑定:'); $this->assign('mo', $mo); $this->display('combine'); } else { if ($x == 'regist') { $wxusross = session('wxusross'); $wxusr = M('wxusr'); $mo = $wxusr->where("wxusropid='" . $wxusross['wxusropid'] . "'")->find(); $mo['cstmusrpt'] = C('PUBLIC') . '/IMG/default.jpg'; $this->assign('title', '微信用户信息完善'); $this->assign('theme', '微信用户信息完善:'); $this->assign('mo', $mo); $this->display('regist'); } } } }
function collect() { header("Content-Type:text/html; charset=utf-8"); //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $cstmusrid = session('cstmusridss'); $atcclct = M('atcclct'); //$bbb=$atcclct->select();p($bbb);die; // $aaaa=$atcclct->join('tb_atc ON f_atcclct_atcid=atcid')->join('tb_cstmusr ON f_atcclct_cstmusrid=cstmusrid')->join('tb_bd ON f_atc_bdid=bdid') // ->where("atcps='y' AND atcvw='y' AND cstmusrid=".$cstmusrid)->select();p($aaaa);die; //NB初始化,开始 $cstmusrid = session('cstmusridss'); $cstmatcclct = M('cstmatcclct'); $atc = M('atc'); $fldint = '-atcid-bdnm-atctpc-atcath-atcmdftm-atccnt-atczn-atctc-'; $cdtint = "-sp-atcps-eq-1-sp-atcvw-eq-1-sp-cstmusrid-eq-" . $cstmusrid . "-sp-"; $spccdtint = "-sp-"; //// $odrint = '-atctp DESC-atcmdftm DESC-'; $lmtint = 20; $jn = 'tb_atc ON f_cstmatcclct_atcid=atcid-jn-tb_cstmusr ON f_cstmatcclct_cstmusrid=cstmusrid-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($cstmatcclct, $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初始化,结束 //p($arr['mls']);die; $atcls = $arr['mls']; for ($j = 0; $j < count($atcls); $j++) { if (mb_strlen($atcls[$j]['atctpc'], 'utf-8') > 45) { $atcls[$j]['atctpcsrk'] = mb_substr($atcls[$j]['atctpc'], 0, 45, 'utf-8') . '...'; } else { $atcls[$j]['atctpcsrk'] = $atcls[$j]['atctpc']; } $time = strtotime($atcls[$j]['atcmdftm']); $atcls[$j]['atcmdftm'] = date("Y/m/d", $time); if ($atcls[$j]['atctp'] == 1) { $atcls[$j]['atcstyle'] = 'font-weight:bold'; $atcls[$j]['atcflag'] = 'glyphicon glyphicon-equalizer'; } } $this->assign('atcls', $atcls); $bdo['bdnm'] = "<h1 class='page-header' style='font-size:30px'>收藏的文章</h1>"; $this->assign('bdo', $bdo); //q特殊 $this->assign('title', '浏览文章列表'); $this->assign('theme', '收藏文章'); $this->display('query'); }
function gtxpg() { //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $x = $_GET['x']; if ($x == 'vw') { if ($_GET['bmcg']) { $this->assign('bmcg', 'y'); } $zssz = M('zssz'); $zsszo = $zssz->find(); $grdid = $zsszo['f_zssz_grdid']; $xqid = $zsszo['f_zssz_xqid']; $stdid = $_GET['stdid']; $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $std = M($grdo['grdnm'] . '_std')->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'); $mo = $std->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND stdid=" . $stdid)->find(); //给专业多点修饰 if (preg_match('/技能/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '自考'; } else { $mo['bxxsnmst'] = '普通'; } } //需要看下如果是其他函授站的可以能要第一学期,第二学期,第三学期之类的很BT的东西 //适应一些站点用一二三 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqnm = $xqw->getxqnm($grdid, $mo['f_std_sttid'], $xqid); $mo['xqnm'] = $xqnm; $this->assign('mo', $mo); //搞推荐人 if ($mo['stdrcmdnm'] || $mo['stdrcmdcp']) { $this->assign('ifrcmd', '是'); } else { $this->assign('ifrcmd', '否'); } // //所有的注册信息,哪个学期哪个班哪个专业 // //应该具备哪些注册信息 // //学期 // import('@.XQ.XQAction'); // $xqw = new XQAction();//外来的学期 // $xqls=$xqw->getxqls($grdid, $mo['f_std_sttid'], 'ASC');//年级确定开始,学制确定过程 // $stdxqcls=M($grdo['grdnm'].'_stdxqcls'); // $stdxqmj=M($grdo['grdnm'].'_stdxqmj'); // for($i=0;$i<count($xqls);$i++){ // $xqid=$xqls[$i]['xqid']; // if($stdxqcls->where('f_stdxqcls_stdid='.$stdid.' AND f_stdxqcls_xqid='.$xqid)->find()&&$stdxqmj->where('f_stdxqmj_stdid='.$stdid.' AND f_stdxqmj_xqid='.$xqid)->find()){ // $xqls[$i]['zcf']='active';//注册否? // $xqls[$i]['zczt']='已注册'; // }else{ // $xqls[$i]['zcf']='disabled'; // $xqls[$i]['zczt']='未注册'; // } // $stdxqclso=$stdxqcls->join('tb_'.$grdo['grdnm'].'_cls ON f_stdxqcls_clsid=clsid')->where('f_stdxqcls_stdid='.$stdid.' AND f_stdxqcls_xqid='.$xqid)->find(); // $stdxqmjo=$stdxqmj->join('tb_'.$grdo['grdnm'].'_mj ON f_stdxqmj_mjid=mjid')->where('f_stdxqmj_stdid='.$stdid.' AND f_stdxqmj_xqid='.$xqid)->find(); // $xqls[$i]['clsnm']=$stdxqclso['clsnm']; // $xqls[$i]['mjnm']=$stdxqmjo['mjnm']; // } // $this->assign('zcls',$xqls);//注册列表 //特殊情况 $tsqk = M($grdo['grdnm'] . '_tsqk'); $tsqkls = $tsqk->where('f_tsqk_stdid=' . $stdid)->order('tsqktm DESC')->select(); $this->assign('tsqkls', $tsqkls); $this->assign('title', '查看'); $this->assign('theme', '查看详细'); $this->display('view'); } else { if ($x == 'updt') { $zssz = M('zssz'); $zsszo = $zssz->find(); $grdid = $zsszo['f_zssz_grdid']; $xqid = $zsszo['f_zssz_xqid']; $stdid = $_GET['stdid']; if ($stdid == 0) { $mo['stdid'] = 0; $mo['stdsol'] = '无'; $mo['stdpt'] = C('PUBLIC') . '/IMG/default.jpg'; //第几学年 第几学期的班级 第几学年 第几学期的专业 ... //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓 //默认年级是当前年级 $grd = M('grd'); $grdo = $grd->where('grdid=' . $zsszo['f_zssz_grdid'])->find(); $mo['grdnm'] = $grdo['grdnm']; $this->assign('title', '报名'); $this->assign('theme', '报名(填写基本信息&选择专业)'); $this->assign('btnvl', '报名'); $where = '1=1'; $where = $where . ' AND f_cls_sttid=1'; //之前已经确定过到底是看哪个年级 $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(); $this->assign('clsls', $clsls); $where = '1=1 AND mjbbzs=1'; $where = $where . " AND mjsttu LIKE '%-1-%'"; $tmp = explode('-', $zsszo['zsszbxxsu']); $wr = ' AND (1=2'; for ($i = 1; $i < count($tmp) - 1; $i++) { $wr = $wr . ' OR f_mj_bxxsid=' . $tmp[$i]; } $wr = $wr . ')'; $where = $where . $wr; //之前已经确定过到底是看哪个年级 $where = $where . ' AND f_mj_grdid=' . $grdid; $mj = M($grdo['grdnm'] . '_mj'); $mjls = $mj->select(); $mjls = $mj->join('tb_bxxs ON f_mj_bxxsid=bxxsid')->join('tb_kl ON f_mj_klid=klid')->where($where)->order('f_mj_bxxsid ASC,mjdm ASC')->select(); $mjlsnw = array(); foreach ($mjls as $v) { //给专业多点修饰 if (preg_match('/技能/', $v['bxxsnm'])) { $v['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $v['bxxsnm'])) { $v['bxxsnmst'] = '自考'; } else { $v['bxxsnmst'] = '普通'; } } array_push($mjlsnw, $v); } $this->assign('mjls', $mjlsnw); } else { $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $std = M($grdo['grdnm'] . '_std')->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'); $mo = $std->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND stdid=" . $stdid)->find(); $this->assign('title', '修改'); $this->assign('theme', '修改:'); $this->assign('btnvl', '修改'); //q特殊 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqls = $xqw->getxqls($grdo['grdid'], $mo['f_std_sttid'], 'DESC'); $this->assign('xqls', $xqls); $where = '1=1'; $where = $where . ' AND f_cls_sttid=' . $mo['f_std_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(); $this->assign('clsls', $clsls); $where = '1=1'; $where = $where . " AND mjsttu LIKE '%-" . $mo['f_std_sttid'] . "-%' AND f_mj_bxxsid=" . $mo['f_mj_bxxsid']; //之前已经确定过到底是看哪个年级 $where = $where . ' AND f_mj_grdid=' . $grdid; $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(); $mjlsnw = array(); foreach ($mjls as $v) { //给专业多点修饰 if (preg_match('/技能/', $v['bxxsnm'])) { $v['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $v['bxxsnm'])) { $v['bxxsnmst'] = '自考'; } else { $v['bxxsnmst'] = '普通'; } } array_push($mjlsnw, $v); } $this->assign('mjls', $mjlsnw); //所有的注册信息,哪个学期哪个班哪个专业 //应该具备哪些注册信息 //学期 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqls = $xqw->getxqls($grdid, $mo['f_std_sttid'], 'ASC'); //年级确定开始,学制确定过程 $stdxqcls = M($grdo['grdnm'] . '_stdxqcls'); $stdxqmj = M($grdo['grdnm'] . '_stdxqmj'); for ($i = 0; $i < count($xqls); $i++) { $xqid = $xqls[$i]['xqid']; if ($stdxqcls->where('f_stdxqcls_stdid=' . $stdid . ' AND f_stdxqcls_xqid=' . $xqid)->find() && $stdxqmj->where('f_stdxqmj_stdid=' . $stdid . ' AND f_stdxqmj_xqid=' . $xqid)->find()) { $xqls[$i]['zcf'] = 'active'; //注册否? $xqls[$i]['zczt'] = '已注册'; } else { $xqls[$i]['zcf'] = 'disabled'; $xqls[$i]['zczt'] = '未注册'; } $stdxqclso = $stdxqcls->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->where('f_stdxqcls_stdid=' . $stdid . ' AND f_stdxqcls_xqid=' . $xqid)->find(); $stdxqmjo = $stdxqmj->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->where('f_stdxqmj_stdid=' . $stdid . ' AND f_stdxqmj_xqid=' . $xqid)->find(); $xqls[$i]['clsnm'] = $stdxqclso['clsnm']; $xqls[$i]['mjnm'] = $stdxqmjo['mjnm']; } $this->assign('zcls', $xqls); //注册列表 //特殊情况 $tsqk = M($grdo['grdnm'] . '_tsqk'); $tsqkls = $tsqk->where('f_tsqk_stdid=' . $stdid)->order('tsqktm DESC')->select(); $this->assign('tsqkls', $tsqkls); } $this->assign('mo', $mo); $tmp = explode('-', $zsszo['zsszbxxsu']); $where = '1=1'; $wr = ' AND (1=2'; for ($i = 1; $i < count($tmp) - 1; $i++) { $wr = $wr . ' OR bxxsid=' . $tmp[$i]; } $wr = $wr . ')'; $where = $where . $wr; //q特殊 $bxxs = M('bxxs'); $bxxsls = $bxxs->where($where)->select(); if (count($bxxsls) == 1) { $this->assign('bxxssg', 'y'); } else { $this->assign('bxxssg', 'n'); } //bxxs single $this->assign('bxxsls', $bxxsls); //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); $dm = M('dm'); $dmls = $dm->select(); $this->assign('dmls', $dmls); //q特殊 $stat = M('stat'); $statls = $stat->select(); $this->assign('statls', $statls); //搞介绍人 if ($mo['stdrcmdnm'] || $mo['stdrcmdcp']) { $this->assign('ifrcmd', '是'); $this->assign('rcmdcls', ''); } else { $this->assign('ifrcmd', '否'); $this->assign('rcmdcls', 'readonly'); } $this->display('update'); } else { if ($x == 'center') { $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(); $stdid = session('stdidss'); $std = M($grdo['grdnm'] . '_std')->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'); $mo = $std->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND stdid=" . $stdid)->find(); $this->assign('title', '学生个人中心'); $this->assign('theme', '学生个人中心:'); $this->assign('mo', $mo); $this->display('center'); } else { if ($x == 'ylqtz') { $zssz = M('zssz'); $zsszo = $zssz->find(); $grdid = $zsszo['f_zssz_grdid']; $xqid = $zsszo['f_zssz_xqid']; //根据学期获得学年 $xq = M('xq'); $xqo = $xq->where('xqid=' . $xqid)->find(); if (preg_match('/第1学期/', $xqo['xqnm'])) { $tmp = explode('-', $xqo[xqnm]); $xnnm = $tmp[0]; } else { $tmp = explode('-', $xqo[xqnm]); $tmp = explode('学年', $tmp[1]); $xnnm = $tmp[0]; } $xn = M('xn'); $xno = $xn->where("xnnm='" . $xnnm . "'")->find(); $stdid = session('stdidss'); $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $cwo = M($grdo['grdnm'] . '_cw')->where('f_cw_stdid=' . $stdid . ' AND f_cw_xnid=' . $xno['xnid'])->find(); $cwid = $cwo['cwid']; $xqid = $cwo['cwzcxqid']; $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'); $mo = $cw->join('tb_xn ON f_cw_xnid=xnid')->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND cwid=" . $cwid)->find(); //给专业多点修饰 if (preg_match('/技能/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '自考'; } else { $mo['bxxsnmst'] = '普通'; } } //需要看下如果是其他函授站的可以能要第一学期,第二学期,第三学期之类的很BT的东西 //适应一些站点用一二三 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqnm = $xqw->getxqnm($grdid, $mo['f_std_sttid'], $xqid); $mo['xqnm'] = $xqnm; $mo['cwyjze'] = $mo['cwyjxfsm'] + $mo['cwyjjckwfsm'] + $mo['cwyjzsfsm']; $mo['cwsjze'] = $mo['cwsjxfsm'] + $mo['cwsjjckwfsm'] + $mo['cwsjzsfsm']; $this->assign('mo', $mo); //添加缴费信息1、学费教材考务费2、住宿费 $mj = M($grdo['grdnm'] . '_mj'); $mjo = $mj->where('mjid=' . $mo['f_stdxqmj_mjid'])->find(); $xf = M($grdo['grdnm'] . '_xf'); $xfo = $xf->where('f_xf_sttid=' . $mo['f_std_sttid'] . ' AND f_xf_bxxsid=' . $mjo['f_mj_bxxsid'] . ' AND f_xf_ccid=' . $mjo['f_mj_ccid'] . ' AND f_xf_klid=' . $mjo['f_mj_klid'])->find(); $zsf = M($grdo['grdnm'] . '_zsf'); $zsfo = $zsf->where('f_zsf_dmid=' . $mo['f_stdxqdm_dmid'])->find(); $this->assign('xfo', $xfo); $this->assign('zsfo', $zsfo); $this->assign('title', '预录取通知书电子版'); $this->assign('theme', '预录取通知书电子版'); $this->display('ylqtz'); } } } } }
function gtxpg() { //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); $x = $_GET['x']; if ($x == 'vw') { $zssz = M('zssz'); $zsszo = $zssz->find(); $grdid = $zsszo['f_zssz_grdid']; $xqid = $zsszo['f_zssz_xqid']; //根据学期获得学年 $xq = M('xq'); $xqo = $xq->where('xqid=' . $xqid)->find(); if (preg_match('/第1学期/', $xqo['xqnm'])) { $tmp = explode('-', $xqo[xqnm]); $xnnm = $tmp[0]; } else { $tmp = explode('-', $xqo[xqnm]); $tmp = explode('学年', $tmp[1]); $xnnm = $tmp[0]; } $xn = M('xn'); $xno = $xn->where("xnnm='" . $xnnm . "'")->find(); $stdid = $_GET['stdid']; $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $cwo = M($grdo['grdnm'] . '_cw')->where('f_cw_stdid=' . $stdid . ' AND f_cw_xnid=' . $xno['xnid'])->find(); $cwid = $cwo['cwid']; $xqid = $cwo['cwzcxqid']; $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'); $mo = $cw->join('tb_xn ON f_cw_xnid=xnid')->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND cwid=" . $cwid)->find(); //给专业多点修饰 if (preg_match('/技能/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '自考'; } else { $mo['bxxsnmst'] = '普通'; } } //需要看下如果是其他函授站的可以能要第一学期,第二学期,第三学期之类的很BT的东西 //适应一些站点用一二三 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqnm = $xqw->getxqnm($grdid, $mo['f_std_sttid'], $xqid); $mo['xqnm'] = $xqnm; $mo['cwyjze'] = $mo['cwyjxfsm'] + $mo['cwyjjckwfsm'] + $mo['cwyjzsfsm']; $mo['cwsjze'] = $mo['cwsjxfsm'] + $mo['cwsjjckwfsm'] + $mo['cwsjzsfsm']; $this->assign('mo', $mo); $this->assign('title', '查看'); $this->assign('theme', '查看缴费信息'); $this->display('view'); } else { if ($x == 'updt') { $cwid = $_GET['cwid']; $grdid = $_GET['grdid']; $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $cwo = M($grdo['grdnm'] . '_cw')->where('cwid=' . $cwid)->find(); $xqid = $cwo['cwzcxqid']; $usr = M('usr'); $usro = $usr->where('usrid=' . session('usridss'))->find(); //鉴权对用户对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'); if ($cwid == 0) { // $mo['stdid']=0; // $mo['stdsol']='无'; // $mo['stdpt']=C('PUBLIC').'/IMG/default.jpg'; // //第几学年 第几学期的班级 第几学年 第几学期的专业 ... // //因为grd无法定下来,所以stdxqcls stdxqmj_xqid 定下来也没有意义,干脆就不定了,等搜索时候自由分晓 // //默认年级是当前年级 // $grd=M('grd'); // $grdo=$grd->order('grdnm DESC')->find(); // $grdid=$grdo['grdid']; // $mo['f_std_grdid']=$grdid; // $mo['grdnm']=$grdo['grdnm']; // //默认站点,有主的找有主的,没主的找本部 // if($athofnstt['aths']!=1){ // $mo['f_std_sttid']=$usro['f_usr_sttid']; // }else{ // $mo['f_std_sttid']=1; // } // //默认学期 为XX年级XX站点的起始学期 // $sttintxq=M($grdo['grdnm'].'_sttintxq'); // $sttintxqo=$sttintxq->where('f_sttintxq_grdid='.$grdo['grdid'].' AND f_sttintxq_sttid='.$mo['f_std_sttid'])->find(); // $xqid=$sttintxqo['f_sttintxq_xqid']; // $mo['f_stdxqcls_xqid']=$xqid; // $mo['f_stdxqmj_xqid']=$xqid; // $this->assign('title','添加'); // $this->assign('theme','添加:'); // $this->assign('btnvl','添加'); // //q特殊 // $xq=M('xq'); // $xqls=$xq->where('xqid='.$xqid)->select();//我TMD就为了一个置顶的xq来了 // $this->assign('xqls',$xqls); // $where='1=1'; // if($athofnstt['aths']!=1){ // $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(); // $this->assign('clsls',$clsls); // $where='1=1'; // if($athofnstt['aths']!=1){ // $where=$where." AND mjsttu LIKE '%-".$usro['f_usr_sttid']."-%'"; // } // //之前已经确定过到底是看哪个年级 // $where=$where.' AND f_mj_grdid='.$grdid; // $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(); // $mjlsnw=array(); // foreach($mjls as $v){ // //给专业多点修饰 // if(preg_match('/技能/',$v['bxxsnm'])){ // $v['bxxsnmst']='技能'; // }else if(preg_match('/自考/',$v['bxxsnm'])){ // $v['bxxsnmst']='自考'; // }else{ // $v['bxxsnmst']='普通'; // } // array_push($mjlsnw, $v); // } // $this->assign('mjls',$mjlsnw); } else { $grd = M('grd'); $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'); $mo = $cw->join('tb_xn ON f_cw_xnid=xnid')->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND cwid=" . $cwid)->find(); if (preg_match('/技能/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '自考'; } else { $mo['bxxsnmst'] = '普通'; } } $mo['cwyjze'] = $mo['cwyjxfsm'] + $mo['cwyjjckwfsm'] + $mo['cwyjzsfsm']; $mo['cwsjze'] = $mo['cwsjxfsm'] + $mo['cwsjjckwfsm'] + $mo['cwsjzsfsm']; $this->assign('title', '修改'); $this->assign('theme', '修改:'); $this->assign('btnvl', '修改'); //所有的注册信息,哪个学期哪个班哪个专业 //应该具备哪些注册信息 //学期 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqls = $xqw->getxqls($grdid, $mo['f_std_sttid'], 'ASC'); //年级确定开始,学制确定过程 $stdxqcls = M($grdo['grdnm'] . '_stdxqcls'); $stdxqmj = M($grdo['grdnm'] . '_stdxqmj'); for ($i = 0; $i < count($xqls); $i++) { $xqid = $xqls[$i]['xqid']; if ($stdxqcls->where('f_stdxqcls_stdid=' . $mo['f_cw_stdid'] . ' AND f_stdxqcls_xqid=' . $xqid)->find() && $stdxqmj->where('f_stdxqmj_stdid=' . $mo['f_cw_stdid'] . ' AND f_stdxqmj_xqid=' . $xqid)->find()) { $xqls[$i]['zcf'] = 'active'; //注册否? $xqls[$i]['zczt'] = '已注册'; } else { $xqls[$i]['zcf'] = 'disabled'; $xqls[$i]['zczt'] = '未注册'; } $stdxqclso = $stdxqcls->join('tb_' . $grdo['grdnm'] . '_cls ON f_stdxqcls_clsid=clsid')->where('f_stdxqcls_stdid=' . $mo['f_cw_stdid'] . ' AND f_stdxqcls_xqid=' . $xqid)->find(); $stdxqmjo = $stdxqmj->join('tb_' . $grdo['grdnm'] . '_mj ON f_stdxqmj_mjid=mjid')->where('f_stdxqmj_stdid=' . $mo['f_cw_stdid'] . ' AND f_stdxqmj_xqid=' . $xqid)->find(); $xqls[$i]['clsnm'] = $stdxqclso['clsnm']; $xqls[$i]['mjnm'] = $stdxqmjo['mjnm']; } $this->assign('zcls', $xqls); //注册列表 //特殊情况 $tsqk = M($grdo['grdnm'] . '_tsqk'); $tsqkls = $tsqk->where('f_tsqk_stdid=' . $mo['f_cw_stdid'])->order('tsqktm DESC')->select(); $this->assign('tsqkls', $tsqkls); } $this->assign('mo', $mo); $this->display('update'); } else { if ($x == 'center') { $zssz = M('zssz'); $zsszo = $zssz->find(); $grdid = $zsszo['f_zssz_grdid']; $xqid = $zsszo['f_zssz_xqid']; //根据学期获得学年 $xq = M('xq'); $xqo = $xq->where('xqid=' . $xqid)->find(); if (preg_match('/第1学期/', $xqo['xqnm'])) { $tmp = explode('-', $xqo[xqnm]); $xnnm = $tmp[0]; } else { $tmp = explode('-', $xqo[xqnm]); $tmp = explode('学年', $tmp[1]); $xnnm = $tmp[0]; } $xn = M('xn'); $xno = $xn->where("xnnm='" . $xnnm . "'")->find(); $stdid = session('stdidss'); $grd = M('grd'); $grdo = $grd->where('grdid=' . $grdid)->find(); $cwo = M($grdo['grdnm'] . '_cw')->where('f_cw_stdid=' . $stdid . ' AND f_cw_xnid=' . $xno['xnid'])->find(); $cwid = $cwo['cwid']; $xqid = $cwo['cwzcxqid']; $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'); $mo = $cw->join('tb_xn ON f_cw_xnid=xnid')->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND cwid=" . $cwid)->find(); //给专业多点修饰 if (preg_match('/技能/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '技能'; } else { if (preg_match('/自考/', $mo['bxxsnm'])) { $mo['bxxsnmst'] = '自考'; } else { $mo['bxxsnmst'] = '普通'; } } //需要看下如果是其他函授站的可以能要第一学期,第二学期,第三学期之类的很BT的东西 //适应一些站点用一二三 import('@.XQ.XQAction'); $xqw = new XQAction(); //外来的学期 $xqnm = $xqw->getxqnm($grdid, $mo['f_std_sttid'], $xqid); $mo['xqnm'] = $xqnm; $mo['cwyjze'] = $mo['cwyjxfsm'] + $mo['cwyjjckwfsm'] + $mo['cwyjzsfsm']; $mo['cwsjze'] = $mo['cwsjxfsm'] + $mo['cwsjjckwfsm'] + $mo['cwsjzsfsm']; $this->assign('mo', $mo); $this->assign('title', '查看'); $this->assign('theme', '查看缴费信息'); $this->display('center'); } } } }
function gtxpg() { $x = $_GET['x']; //先给hd设置好些东西,他自身是无法提取的 import('@.SS.SSAction'); $ss = new SSAction(); $ss->setss(); //设置 导航 bd import('@.TREE.TreeAction'); $tree = new TreeAction(); // import('@.NTF.NTFAction'); // $ntf = new NTFAction(); // $ntf->setntf(); import('@.NV.NVAction'); $nv = new NVAction(); $nv->setnv(); //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,qstdery he gtxpg两处 $mdII = M('md'); $mdo = $mdII->where("mdmk='Std'")->find(); //个人行为不参与鉴权 if ($x == 'regist') { //配置页面显示内容 $mo['stdid'] = 0; $mo['stdpt'] = C('PUBLIC') . '/IMG/default.jpg'; $this->assign('mo', $mo); $stt = M('stt'); $sttls = $stt->where('sttactvt=1')->select(); $this->assign('sttls', $sttls); $this->assign('title', '学生注册页面'); $this->assign('theme', '注册:'); $this->assign('btnvl', '添加'); $this->display('regist'); } else { if ($x == 'center') { $grd = M('grd'); $stdid = session('stdidss'); $grdid = session('grdidss'); $grdo = $grd->where('grdid=' . $grdid)->find(); $xq = M('xq'); $xqo = $xq->where('xqdq=1')->find(); $xqid = $xqo['xqid']; $std = M($grdo['grdnm'] . '_std')->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'); $mo = $std->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("f_stdxqcls_xqid=" . $xqid . " AND f_stdxqmj_xqid=" . $xqid . " AND f_stdxqdm_xqid=" . $xqid . " AND stdid=" . $stdid)->find(); $this->assign('title', '学生中心'); $this->assign('theme', '学生中心:'); $this->assign('mo', $mo); $this->display('center'); } else { if ($x == 'modify') { $std = M('std'); $stdid = session('stdidss'); $mo = $std->where('stdid=' . $stdid)->find(); $this->assign('mo', $mo); $stt = M('stt'); $sttls = $stt->where('sttactvt=1')->select(); $this->assign('sttls', $sttls); $this->assign('title', '学生修改页面'); $this->assign('theme', '修改:'); $this->assign('btnvl', '修改'); $this->display('modify'); } else { if ($x == 'modifypw') { $std = M('std'); $stdid = session('stdidss'); $mo = $std->where('stdid=' . $stdid)->find(); $this->assign('mo', $mo); $this->assign('title', '学生修改密码页面'); $this->assign('theme', '修改密码:'); $this->assign('btnvl', '修改'); $this->display('modifypw'); } else { if ($x == 'forget') { $this->assign('title', '忘记密码'); $this->assign('theme', '忘记密码:'); $this->assign('btnvl', '发送至邮箱'); $this->display('forget'); } else { if ($x == 'modifypwml') { $vrf = $_GET['vrf']; $ssid = $_GET['ssid']; $ss = M('ss'); $sso = $ss->where('ssid=' . $ssid)->find(); $std = M('std'); if ($vrf != $sso['ssvrf']) { //验证码过期 $errmsg = '验证码已过期'; $this->assign('theme', '结果:'); $this->assign('errmsg', $errmsg); $this->display('vrferror'); } else { if (time() - $sso['sstm'] > 1800) { //超过30分钟了 $errmsg = '已经超过30分钟,请重新认证'; $this->assign('theme', '结果:'); $this->assign('errmsg', $errmsg); $this->display('vrferror'); } else { $mo = $std->where("stdnm='" . $sso['ssstdnm'] . "'")->find(); $this->assign('mo', $mo); $this->assign('title', '学生通过密保修改密码页面'); $this->assign('theme', '修改密码:'); $this->assign('btnvl', '修改'); $this->display('modifypwml'); } } } } } } } } }