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'); }
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'); }
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='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']); //NB初始化,开始 $atc = M('atc'); $fldint = '-atcid-bdnm-atctpc-atcath-atcaddtm-atcmdftm-atctp-atcps-atcanc-atcdnmc-atccnt-atcnw-atczn-atctc-atcvw-atczs-'; if ($athofn['athm'] == 1 || $athofn['aths'] == 1) { $cdtint = "-sp-"; } else { $cdtint = '-sp-atcps-eq-1-sp-atcvw-eq-1-sp-'; } $spccdtint = '-sp-'; //// $odrint = '-atctp DESC-atcmdftm DESC-'; $lmtint = 20; $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($atc, $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['atctp'] == 1) { $v['atctp'] = '是'; } else { $v['atctp'] = '否'; } if ($v['atcps'] == 1) { $v['atcps'] = '是'; } else { $v['atcps'] = '否'; } if ($v['atcanc'] == 1) { $v['atcanc'] = '是'; } else { $v['atcanc'] = '否'; } if ($v['atcdnmc'] == 1) { $v['atcdnmc'] = '是'; } else { $v['atcdnmc'] = '否'; } if ($v['atcnw'] == 1) { $v['atcnw'] = '是'; } else { $v['atcnw'] = '否'; } if ($v['atcvw'] == 1) { $v['atcvw'] = '是'; } else { $v['atcvw'] = '否'; } if ($v['atczs'] == 1) { $v['atczs'] = '是'; } else { $v['atczs'] = '否'; } 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特殊 $bd = M('bd'); $bdls = $bd->select(); $this->assign('bdls', $bdls); // import('@.TREE.TreeAction'); $tree = new TreeAction(); $bd = M('bd'); $bdls = $bd->order('bdodr ASC')->select(); //在按照这个顺序前提下,使用tree方法就能有序的得到 $str = $tree->unlimitedForListSLCT($bdls, 0, 'bdid', 'bdnm', 'bdpid', 'bdodr'); $this->assign('tree', $str); //q特殊 $this->assign('title', '浏览文章列表'); $this->assign('theme', '文章管理'); $this->display('query'); }