query("insert into {$dbtbpre}enewsinfotype(tname,mid,myorder,yhid,tnum,listtempid,tpath,ttype,maxnum,reorder,tid,tbname,timg,intro,pagekey,newline,hotline,goodline,hotplline,firstline,jstempid,nrejs,listdt,repagenum,fclast) values('$add[tname]','$add[mid]','$add[myorder]','$add[yhid]','$add[tnum]','$add[listtempid]','$add[tpath]','$add[ttype]','$add[maxnum]','$add[reorder]','$tabler[tid]','$tabler[tbname]','$add[timg]','$add[intro]','$add[pagekey]','$add[newline]','$add[hotline]','$add[goodline]','$add[hotplline]','$add[firstline]','$add[jstempid]','$add[nrejs]','$add[listdt]','$add[repagenum]','$ecms_fclast');"); $typeid=$empire->lastid(); //生成页面 if($add[listdt]==0) { //ListHtml($typeid,$ret_r,5); } GetClass();//更新缓存 if($sql) { //操作日志 insert_dolog("typeid=".$typeid."
tname=".$add[tname]); printerror("AddInfoTypeSuccess","InfoType.php".hReturnEcmsHashStrHref2(1)); } else {printerror("DbError","history.go(-1)");} } //修改分类 function EditInfoType($add,$userid,$username){ global $empire,$dbtbpre; $typeid=(int)$add['typeid']; if(!$typeid||!$add[mid]||!$add[tname]||!$add[listtempid]||!$add[tpath]) { printerror("EmptyInfoTypeName","history.go(-1)"); } $add=DoPostInfoTypeVar($add); CheckLevel($userid,$username,$classid,"infotype"); //改变目录 if($add[oldtpath]<>$add[tpath]) { $createpath=ECMS_PATH.$add[tpath]; if(file_exists($createpath)) { printerror("ReInfoTypePath",""); } if($add['oldpripath']==$add['pripath']) { $new=ECMS_PATH; @rename($new.$add[oldtpath],$new.$add[tpath]);//改变目录名 } else { CreateInfoTypePath($add[tpath]);//建立目录 } } //取得表名 $ecms_fclast=time(); $tabler=GetModTable($add[mid]); $tabler[tid]=(int)$tabler[tid]; //修改 $sql=$empire->query("update {$dbtbpre}enewsinfotype set tname='$add[tname]',mid='$add[mid]',myorder='$add[myorder]',yhid='$add[yhid]',tnum='$add[tnum]',listtempid='$add[listtempid]',tpath='$add[tpath]',ttype='$add[ttype]',maxnum='$add[maxnum]',reorder='$add[reorder]',tid='$tabler[tid]',tbname='$tabler[tbname]',timg='$add[timg]',intro='$add[intro]',pagekey='$add[pagekey]',newline='$add[newline]',hotline='$add[hotline]',goodline='$add[goodline]',hotplline='$add[hotplline]',firstline='$add[firstline]',jstempid='$add[jstempid]',nrejs='$add[nrejs]',listdt='$add[listdt]',repagenum='$add[repagenum]',fclast='$ecms_fclast' where typeid='$typeid'"); GetClass();//更新缓存 //生成页面 if($add[listdt]==0) { ListHtml($typeid,$ret_r,5); } if($sql) { insert_dolog("typeid=".$typeid."
tname=".$add[tname]);//操作日志 printerror("EditInfoTypeSuccess","InfoType.php?mid=$add[fmid]".hReturnEcmsHashStrHref2(0)); } else { printerror("DbError",""); } } //删除分类 function DelInfoType($add,$userid,$username){ global $empire,$dbtbpre; $typeid=(int)$add[typeid]; if(!$typeid) { printerror("NotDelInfoTypeid",""); } CheckLevel($userid,$username,$classid,"infotype"); $r=$empire->fetch1("select * from {$dbtbpre}enewsinfotype where typeid='$typeid'"); if(empty($r[typeid])) { printerror("NotDelInfoTypeid","history.go(-1)"); } //删除标题分类 $sql=$empire->query("delete from {$dbtbpre}enewsinfotype where typeid='$typeid'"); $delpath=ECMS_PATH.$r[tpath]; $del=DelPath($delpath); //moreportdo if($r['tpath']) { $eautodofname='delpath|'.$r['tpath'].'||'; eAutodo_AddDo('eDelFileTT',0,0,0,0,0,$eautodofname); } //改变信息分类值 $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]." set ttid=0 where ttid='$typeid'"); $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]."_check set ttid=0 where ttid='$typeid'"); $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]."_doc set ttid=0 where ttid='$typeid'"); GetClass();//更新缓存 if($sql) { insert_dolog("typeid=".$typeid."
tname=".$r[tname]);//操作日志 printerror("DelInfoTypeSuccess","InfoType.php?mid=$add[fmid]".hReturnEcmsHashStrHref2(0)); } else { printerror("DbError",""); } } //修改分类顺序 function EditInfoTypeOrder($typeid,$myorder,$userid,$username){ global $empire,$dbtbpre; CheckLevel($userid,$username,$classid,"infotype"); for($i=0;$iquery("update {$dbtbpre}enewsinfotype set myorder='$newmyorder' where typeid='$typeid[$i]'"); } //操作日志 insert_dolog(""); printerror("EditInfoTypeOrderSuccess",EcmsGetReturnUrl()); } $enews=$_POST['enews']; if(empty($enews)) {$enews=$_GET['enews'];} if($enews) { hCheckEcmsRHash(); include('../../class/delpath.php'); include('../../class/copypath.php'); include('../../class/t_functions.php'); } if($enews=="AddInfoType")//增加分类 { AddInfoType($_POST,$logininid,$loginin); } elseif($enews=="EditInfoType")//修改分类 { EditInfoType($_POST,$logininid,$loginin); } elseif($enews=="DelInfoType")//删除分类 { DelInfoType($_GET,$logininid,$loginin); } elseif($enews=="EditInfoTypeOrder")//修改分类排序 { EditInfoTypeOrder($_POST['typeid'],$_POST['myorder'],$logininid,$loginin); } $search=''; $search.=$ecms_hashur['ehref']; $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=50;//每页显示条数 $page_line=12;//每页显示链接数 $offset=$page*$line;//总偏移量 $query="select typeid,tname,mid,myorder,tpath from {$dbtbpre}enewsinfotype"; $totalquery="select count(*) as total from {$dbtbpre}enewsinfotype"; $add=''; $mid=(int)$_GET['mid']; if($mid) { $add=" where mid='$mid'"; $search.='&mid='.$mid; } $query.=$add; $totalquery.=$add; $num=$empire->gettotal($totalquery);//取得总条数 $query=$query." order by myorder,typeid limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); //模型 $mstr=""; $msql=$empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid"); while($mr=$empire->fetch($msql)) { $select=""; if($mr[mid]==$mid) { $select=" selected"; } $mstr.=""; } ?> 标题分类
位置:管理标题分类
选择所属系统模型:

fetch($sql)) { $modr=$empire->fetch1("select mid,mname from {$dbtbpre}enewsmod where mid='$r[mid]'"); $turl=sys_ReturnBqInfoTypeUrl($r['typeid']); ?>
选择
ID
排序
分类名称
所属系统模型
操作
操作
[ ]
修改 复制 删除 刷新 '>JS 调用
       (排序值越小越前面)