帝国cms

推荐列表 站点导航

当前位置:首页 > 建站教程 > 帝国cms >

帝国cms复制栏目时同时复制子栏目

来源:网络整理  作者:网络  发布时间:2020-12-12 17:53
帝国CMS模板网下面的帝国CMS教程栏目为您提供了帝国cms复制栏目时同时复制子栏目...
$featherclass="";
if(!$add[classname]||!$add[classpath]||!$add[modid])
if($add[islast]&&(!$add[newstempid]||!$add[listtempid]))
//建立栏目目录
{
}
{
{
printerror("BclassNotLast","");
}
//目录已存在
//文件前缀
if($sql){
{
//增加外部栏目
}
global $empire,$dbtbpre;

}else{
}else{
DelListEnews();//删除缓存文件
function cAddClass1($add,$userid,$username,$zz=0){
$sql=$empire->query("insert into {$dbtbpre}enewsclass(bclassid,classname,sonclass,is_zt,lencord,link_num,newstempid,onclick,listtempid,featherclass,islast,classpath,classtype,newspath,filename,filetype,openpl,openadd,newline,hotline,goodline,classurl,groupid,myorder,filename_qz,hotplline,modid,checked,docheckuser,checkuser,firstline,bname,islist,searchtempid,tid,tbname,maxnum,checkpl,down_num,online_num,listorderf,listorder,reorderf,reorder,intro,classimg,jstempid,addinfofen,listdt,showclass,showdt,checkqadd,qaddlist,qaddgroupid,qaddshowkey,adminqinfo,doctime,classpagekey,dtlisttempid,classtempid,nreclass,nreinfo,nrejs,nottobq,ipath,addreinfo,haddlist,sametitle,definfovoteid,wburl,qeditchecked,wapstyleid,repreinfo,pltempid,cgroupid) values($add[bclassid],'$add[classname]','$sonclass',0,$add[lencord],$add[link_num],$add[newstempid],0,$add[listtempid],'$featherclass',$add[islast],'$classpath','$add[classtype]','$add[newspath]',$add[filename],'$add[filetype]',$add[openpl],$add[openadd],$add[newline],$add[hotline],$add[goodline],'$add[classurl]',$add[groupid],$add[myorder],'$add[filename_qz]',$add[hotplline],$add[modid],$add[checked],$add[docheckuser],'$add[checkuser]',$add[firstline],'$add[bname]',$add[islist],$add[searchtempid],$tabler[tid],'$tabler[tbname]',$add[maxnum],$add[checkpl],$add[down_num],$add[online_num],'$add[listorderf]','$add[listorder]','$add[reorderf]','$add[reorder]','$add[intro]','$add[classimg]',$add[jstempid],$add[addinfofen],$add[listdt],$add[showclass],$add[showdt],$add[checkqadd],$add[qaddlist],'$add[qaddgroupid]',$add[qaddshowkey],$add[adminqinfo],$add[doctime],'$add[classpagekey]','$add[dtlisttempid]','$add[classtempid]',$add[nreclass],$add[nreinfo],$add[nrejs],$add[nottobq],'$add[ipath]',$add[addreinfo],$add[haddlist],$add[sametitle],$add[definfovoteid],'',$add[qeditchecked],$add[wapstyleid],'$add[repreinfo]','$add[pltempid]','$add[cgroupid]');");

}
{
GetSearch($add[modid]);//更新缓存
$r[featherclass]="|";
GetClass();
if($add[bclassid])
}
printerror("BclassNotWb","");
}
if($r[islast])//是否终极栏目
//增加终级栏目
}
else
if(empty($r[featherclass])){
{
if(!$add[islast])
}
if($add[copyzlm]=='1'){
if(strchr($add[classpath],".")||strchr($add[classpath],"/")||strchr($add[classpath],""))
while($br=$empire->fetch($bsql)){
AddWbClass($add,$userid,$username);
$add[filename_qz]=RepFilenameQz($add[filename_qz]);
$tabler=GetModTable($add[modid]);
$new_sonclass=$b_r[sonclass].$lastid."|";
$tabler[tid]=(int)$tabler[tid];
}
$sonclass="";
3、将以下代码拷贝到class/userfun.php中。
NewsBq($lastid,$classtemp,0,1);
printerror("BclassNotWb","");
printerror("ReClasspath","");
{
if(empty($r[featherclass]))
else{

1263633949.gif

{
$lastid=$empire->lastid();
else//子栏目
//取得表名
$classtemp=$add[islist]==2?GetClassText($lastid):GetClassTemp($add['classtempid']);
}
的前面增加:<?php if($docopy) { ?><input type="checkbox" value="1" checked>复制子栏目&nbsp; <? }?>&nbsp;
else{
if(empty($br[sonclass]))
//建立目录
if($add[ecmsclasstype])
}
if(empty($where)){
while($br=$empire->fetch($bsql))
$b_r=$empire->fetch1("select sonclass,featherclass from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
$brr=$br;
}
cAddClass($brr,$userid,$username);//递归
GetClass();

上面代码,只有函数cAddClass是我写的,下面的函数cAddClass是对wf原来的函数AddClass稍作修改拷贝过来的,放到userfun.php文件中目的是不对classfun.php文件作改动。
$sql=$empire->query("insert into {$dbtbpre}enewsclass(bclassid,classname,is_zt,sonclass,lencord,link_num,newstempid,onclick,listtempid,featherclass,islast,classpath,classtype,newspath,filename,filetype,openpl,openadd,newline,hotline,goodline,classurl,groupid,myorder,filename_qz,hotplline,modid,checked,docheckuser,checkuser,firstline,bname,islist,searchtempid,tid,tbname,maxnum,checkpl,down_num,online_num,listorderf,listorder,reorderf,reorder,intro,classimg,jstempid,addinfofen,listdt,showclass,showdt,checkqadd,qaddlist,qaddgroupid,qaddshowkey,adminqinfo,doctime,classpagekey,dtlisttempid,classtempid,nreclass,nreinfo,nrejs,nottobq,ipath,addreinfo,haddlist,sametitle,definfovoteid,wburl,qeditchecked,wapstyleid,repreinfo,pltempid,cgroupid) values($add[bclassid],'$add[classname]',0,'$sonclass',$add[lencord],$add[link_num],$add[newstempid],0,$add[listtempid],'$featherclass',$add[islast],'$classpath','$add[classtype]','$add[newspath]',$add[filename],'$add[filetype]',$add[openpl],$add[openadd],$add[newline],$add[hotline],$add[goodline],'$add[classurl]',$add[groupid],$add[myorder],'$add[filename_qz]',$add[hotplline],$add[modid],$add[checked],$add[docheckuser],'$add[checkuser]',$add[firstline],'$add[bname]',$add[islist],$add[searchtempid],$tabler[tid],'$tabler[tbname]',$add[maxnum],$add[checkpl],$add[down_num],$add[online_num],'$add[listorderf]','$add[listorder]','$add[reorderf]','$add[reorder]','$add[intro]','$add[classimg]',$add[jstempid],$add[addinfofen],$add[listdt],$add[showclass],$add[showdt],$add[checkqadd],$add[qaddlist],'$add[qaddgroupid]',$add[qaddshowkey],$add[adminqinfo],$add[doctime],'$add[classpagekey]','$add[dtlisttempid]','$add[classtempid]',$add[nreclass],$add[nreinfo],$add[nrejs],$add[nottobq],'$add[ipath]',$add[addreinfo],$add[haddlist],$add[sametitle],$add[definfovoteid],'',$add[qeditchecked],$add[wapstyleid],'$add[repreinfo]','$add[pltempid]','$add[cgroupid]');");
$bsql=$empire->query("select sonclass,classid from {$dbtbpre}enewsclass where ".$where);
}
cAddClass1($br,$userid,$username,'1');
//操作权限
if($sql){
{
{
}
}
}
{
{
$br[classpath]=strrchr($br[classpath],'/');
$featherclass=$r[featherclass].$add[bclassid]."|";
//增加栏目
}
{
$lastid=$empire->lastid();
DelListEnews();//删除缓存文件
{
cAddClass1($add,$userid,$username);
if($zz==0){
GetSearch($add[modid]);//更新缓存
//副表
$new_sonclass=$br[sonclass].$lastid."|";
if($br[islast]==0){
if($r[wburl])
$r=$empire->fetch1("select featherclass,islast,wburl from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
// printerror("AddLastClassSuccess","AddClass.php?enews=AddClass&from=$add[from]");
}
{

function cAddClass($add,$userid,$username){
//修改父栏目的子栏目
TogNotReClass(1);
$b_r[sonclass]="|";
printerror("DbError","history.go(-1)");
$sonclass="";
}
$bsql=$empire->query("select * from {$dbtbpre}enewsclass where bclassid='$add[classid]' and bclassid<>'0'");
{
if(empty($add[bclassid]))//主类别为终级栏目时
if($add[islist]==0||$add[islist]==2)
{
if($r[wburl])
}
printerror("LastMustChange","");
$br[copyzlm]='1';
}
$sonclass="";
$r=$empire->fetch1("select featherclass,islast,wburl from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
//增加大栏目
好了,复制栏目试试看

{
$where="classid=0";
}
printerror("BclassNotLast","");
$r[featherclass]="|";
}
$empire->query("replace into {$dbtbpre}enewsclassadd(classid,classtext) values('$lastid','".addslashes($add[classtext])."');");
{
}
}
$br[pripath]=$r[classpath];
$classpath=$add[pripath].$add[classpath];
$featherclass="";
if($r[islast])
$update=$empire->query("update {$dbtbpre}enewsclass set sonclass='$new_sonclass' where classid='$br[classid]'");
}
printerror("EmptyClass","");
if(empty($add[bclassid]))//主栏目
$empire->query("replace into {$dbtbpre}enewsclassadd(classid,classtext) values('$lastid','".addslashes($add[classtext])."');");
$update=$empire->query("update {$dbtbpre}enewsclass set sonclass='$new_sonclass' where classid='$add[bclassid]'");
AddClass($add,$userid,$username);
$featherclass=$r[featherclass].$add[bclassid]."|";
}
//取得上一级父栏目
{
//取得上一级父栏目
}

insert_dolog("classid=".$lastid."<br>classname=".$add[classname]);//操作日志
TogNotReClass(1);
$where=ReturnClass($b_r[featherclass]);
$add=DoPostClassVar($add);
//更改父类别的父栏目的子栏目
//副表
CheckLevel($userid,$username,$classid,"class");
2、修改admin/emsclass.php文件,大约在52行,将“AddClass($_POST,$logininid,$loginin);”修改为“cAddClass($_POST,$logininid,$loginin);”
if(empty($b_r[sonclass]))
// printerror("badpath","");
}

insert_dolog("classid=".$lastid."<br>classname=".$add[classname]);//操作日志
$sonclass="";
printerror("DbError","");

1、修改admin/addclass.php文件,大约在1153行,<input type="submit" value="提交">
// printerror("AddClassSuccess","AddClass.php?enews=AddClass&from=$add[from]");
global $empire,$dbtbpre;
}
}
}
$br[bclassid]=$r[classid];
}
//是否终极类别
else//中级栏目
$br[sonclass]="|";
CreateClassPath($classpath);
CreateClassPath($classpath);
if(file_exists("../../".$classpath))
{
$r = $empire->fetch1( "select * from {$dbtbpre}enewsclass order by classid desc limit 1" );
$add[classpath]=trim($add[classpath]);

相关热词: 帝国cms

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://www.juheyunku.com/jz/ecms/3011.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

帝国cms复制栏目时同时复制子栏目

2020-12-12 编辑:网络

$featherclass="";
if(!$add[classname]||!$add[classpath]||!$add[modid])
if($add[islast]&&(!$add[newstempid]||!$add[listtempid]))
//建立栏目目录
{
}
{
{
printerror("BclassNotLast","");
}
//目录已存在
//文件前缀
if($sql){
{
//增加外部栏目
}
global $empire,$dbtbpre;

}else{
}else{
DelListEnews();//删除缓存文件
function cAddClass1($add,$userid,$username,$zz=0){
$sql=$empire->query("insert into {$dbtbpre}enewsclass(bclassid,classname,sonclass,is_zt,lencord,link_num,newstempid,onclick,listtempid,featherclass,islast,classpath,classtype,newspath,filename,filetype,openpl,openadd,newline,hotline,goodline,classurl,groupid,myorder,filename_qz,hotplline,modid,checked,docheckuser,checkuser,firstline,bname,islist,searchtempid,tid,tbname,maxnum,checkpl,down_num,online_num,listorderf,listorder,reorderf,reorder,intro,classimg,jstempid,addinfofen,listdt,showclass,showdt,checkqadd,qaddlist,qaddgroupid,qaddshowkey,adminqinfo,doctime,classpagekey,dtlisttempid,classtempid,nreclass,nreinfo,nrejs,nottobq,ipath,addreinfo,haddlist,sametitle,definfovoteid,wburl,qeditchecked,wapstyleid,repreinfo,pltempid,cgroupid) values($add[bclassid],'$add[classname]','$sonclass',0,$add[lencord],$add[link_num],$add[newstempid],0,$add[listtempid],'$featherclass',$add[islast],'$classpath','$add[classtype]','$add[newspath]',$add[filename],'$add[filetype]',$add[openpl],$add[openadd],$add[newline],$add[hotline],$add[goodline],'$add[classurl]',$add[groupid],$add[myorder],'$add[filename_qz]',$add[hotplline],$add[modid],$add[checked],$add[docheckuser],'$add[checkuser]',$add[firstline],'$add[bname]',$add[islist],$add[searchtempid],$tabler[tid],'$tabler[tbname]',$add[maxnum],$add[checkpl],$add[down_num],$add[online_num],'$add[listorderf]','$add[listorder]','$add[reorderf]','$add[reorder]','$add[intro]','$add[classimg]',$add[jstempid],$add[addinfofen],$add[listdt],$add[showclass],$add[showdt],$add[checkqadd],$add[qaddlist],'$add[qaddgroupid]',$add[qaddshowkey],$add[adminqinfo],$add[doctime],'$add[classpagekey]','$add[dtlisttempid]','$add[classtempid]',$add[nreclass],$add[nreinfo],$add[nrejs],$add[nottobq],'$add[ipath]',$add[addreinfo],$add[haddlist],$add[sametitle],$add[definfovoteid],'',$add[qeditchecked],$add[wapstyleid],'$add[repreinfo]','$add[pltempid]','$add[cgroupid]');");

}
{
GetSearch($add[modid]);//更新缓存
$r[featherclass]="|";
GetClass();
if($add[bclassid])
}
printerror("BclassNotWb","");
}
if($r[islast])//是否终极栏目
//增加终级栏目
}
else
if(empty($r[featherclass])){
{
if(!$add[islast])
}
if($add[copyzlm]=='1'){
if(strchr($add[classpath],".")||strchr($add[classpath],"/")||strchr($add[classpath],""))
while($br=$empire->fetch($bsql)){
AddWbClass($add,$userid,$username);
$add[filename_qz]=RepFilenameQz($add[filename_qz]);
$tabler=GetModTable($add[modid]);
$new_sonclass=$b_r[sonclass].$lastid."|";
$tabler[tid]=(int)$tabler[tid];
}
$sonclass="";
3、将以下代码拷贝到class/userfun.php中。
NewsBq($lastid,$classtemp,0,1);
printerror("BclassNotWb","");
printerror("ReClasspath","");
{
if(empty($r[featherclass]))
else{

1263633949.gif

{
$lastid=$empire->lastid();
else//子栏目
//取得表名
$classtemp=$add[islist]==2?GetClassText($lastid):GetClassTemp($add['classtempid']);
}
的前面增加:<?php if($docopy) { ?><input type="checkbox" value="1" checked>复制子栏目&nbsp; <? }?>&nbsp;
else{
if(empty($br[sonclass]))
//建立目录
if($add[ecmsclasstype])
}
if(empty($where)){
while($br=$empire->fetch($bsql))
$b_r=$empire->fetch1("select sonclass,featherclass from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
$brr=$br;
}
cAddClass($brr,$userid,$username);//递归
GetClass();

上面代码,只有函数cAddClass是我写的,下面的函数cAddClass是对wf原来的函数AddClass稍作修改拷贝过来的,放到userfun.php文件中目的是不对classfun.php文件作改动。
$sql=$empire->query("insert into {$dbtbpre}enewsclass(bclassid,classname,is_zt,sonclass,lencord,link_num,newstempid,onclick,listtempid,featherclass,islast,classpath,classtype,newspath,filename,filetype,openpl,openadd,newline,hotline,goodline,classurl,groupid,myorder,filename_qz,hotplline,modid,checked,docheckuser,checkuser,firstline,bname,islist,searchtempid,tid,tbname,maxnum,checkpl,down_num,online_num,listorderf,listorder,reorderf,reorder,intro,classimg,jstempid,addinfofen,listdt,showclass,showdt,checkqadd,qaddlist,qaddgroupid,qaddshowkey,adminqinfo,doctime,classpagekey,dtlisttempid,classtempid,nreclass,nreinfo,nrejs,nottobq,ipath,addreinfo,haddlist,sametitle,definfovoteid,wburl,qeditchecked,wapstyleid,repreinfo,pltempid,cgroupid) values($add[bclassid],'$add[classname]',0,'$sonclass',$add[lencord],$add[link_num],$add[newstempid],0,$add[listtempid],'$featherclass',$add[islast],'$classpath','$add[classtype]','$add[newspath]',$add[filename],'$add[filetype]',$add[openpl],$add[openadd],$add[newline],$add[hotline],$add[goodline],'$add[classurl]',$add[groupid],$add[myorder],'$add[filename_qz]',$add[hotplline],$add[modid],$add[checked],$add[docheckuser],'$add[checkuser]',$add[firstline],'$add[bname]',$add[islist],$add[searchtempid],$tabler[tid],'$tabler[tbname]',$add[maxnum],$add[checkpl],$add[down_num],$add[online_num],'$add[listorderf]','$add[listorder]','$add[reorderf]','$add[reorder]','$add[intro]','$add[classimg]',$add[jstempid],$add[addinfofen],$add[listdt],$add[showclass],$add[showdt],$add[checkqadd],$add[qaddlist],'$add[qaddgroupid]',$add[qaddshowkey],$add[adminqinfo],$add[doctime],'$add[classpagekey]','$add[dtlisttempid]','$add[classtempid]',$add[nreclass],$add[nreinfo],$add[nrejs],$add[nottobq],'$add[ipath]',$add[addreinfo],$add[haddlist],$add[sametitle],$add[definfovoteid],'',$add[qeditchecked],$add[wapstyleid],'$add[repreinfo]','$add[pltempid]','$add[cgroupid]');");
$bsql=$empire->query("select sonclass,classid from {$dbtbpre}enewsclass where ".$where);
}
cAddClass1($br,$userid,$username,'1');
//操作权限
if($sql){
{
{
}
}
}
{
{
$br[classpath]=strrchr($br[classpath],'/');
$featherclass=$r[featherclass].$add[bclassid]."|";
//增加栏目
}
{
$lastid=$empire->lastid();
DelListEnews();//删除缓存文件
{
cAddClass1($add,$userid,$username);
if($zz==0){
GetSearch($add[modid]);//更新缓存
//副表
$new_sonclass=$br[sonclass].$lastid."|";
if($br[islast]==0){
if($r[wburl])
$r=$empire->fetch1("select featherclass,islast,wburl from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
// printerror("AddLastClassSuccess","AddClass.php?enews=AddClass&from=$add[from]");
}
{

function cAddClass($add,$userid,$username){
//修改父栏目的子栏目
TogNotReClass(1);
$b_r[sonclass]="|";
printerror("DbError","history.go(-1)");
$sonclass="";
}
$bsql=$empire->query("select * from {$dbtbpre}enewsclass where bclassid='$add[classid]' and bclassid<>'0'");
{
if(empty($add[bclassid]))//主类别为终级栏目时
if($add[islist]==0||$add[islist]==2)
{
if($r[wburl])
}
printerror("LastMustChange","");
$br[copyzlm]='1';
}
$sonclass="";
$r=$empire->fetch1("select featherclass,islast,wburl from {$dbtbpre}enewsclass where classid='$add[bclassid]'");
//增加大栏目
好了,复制栏目试试看

{
$where="classid=0";
}
printerror("BclassNotLast","");
$r[featherclass]="|";
}
$empire->query("replace into {$dbtbpre}enewsclassadd(classid,classtext) values('$lastid','".addslashes($add[classtext])."');");
{
}
}
$br[pripath]=$r[classpath];
$classpath=$add[pripath].$add[classpath];
$featherclass="";
if($r[islast])
$update=$empire->query("update {$dbtbpre}enewsclass set sonclass='$new_sonclass' where classid='$br[classid]'");
}
printerror("EmptyClass","");
if(empty($add[bclassid]))//主栏目
$empire->query("replace into {$dbtbpre}enewsclassadd(classid,classtext) values('$lastid','".addslashes($add[classtext])."');");
$update=$empire->query("update {$dbtbpre}enewsclass set sonclass='$new_sonclass' where classid='$add[bclassid]'");
AddClass($add,$userid,$username);
$featherclass=$r[featherclass].$add[bclassid]."|";
}
//取得上一级父栏目
{
//取得上一级父栏目
}

insert_dolog("classid=".$lastid."<br>classname=".$add[classname]);//操作日志
TogNotReClass(1);
$where=ReturnClass($b_r[featherclass]);
$add=DoPostClassVar($add);
//更改父类别的父栏目的子栏目
//副表
CheckLevel($userid,$username,$classid,"class");
2、修改admin/emsclass.php文件,大约在52行,将“AddClass($_POST,$logininid,$loginin);”修改为“cAddClass($_POST,$logininid,$loginin);”
if(empty($b_r[sonclass]))
// printerror("badpath","");
}

insert_dolog("classid=".$lastid."<br>classname=".$add[classname]);//操作日志
$sonclass="";
printerror("DbError","");

1、修改admin/addclass.php文件,大约在1153行,<input type="submit" value="提交">
// printerror("AddClassSuccess","AddClass.php?enews=AddClass&from=$add[from]");
global $empire,$dbtbpre;
}
}
}
$br[bclassid]=$r[classid];
}
//是否终极类别
else//中级栏目
$br[sonclass]="|";
CreateClassPath($classpath);
CreateClassPath($classpath);
if(file_exists("../../".$classpath))
{
$r = $empire->fetch1( "select * from {$dbtbpre}enewsclass order by classid desc limit 1" );
$add[classpath]=trim($add[classpath]);

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://www.juheyunku.com/jz/ecms/3011.shtml

相关文章

风云图片

推荐阅读

返回帝国cms频道首页