GetHtml 函数修改:
//生成内容文件
function GetHtml($classid,$id,$add,$ecms=0,$doall=0){
global $public_r,$class_r,$class_zr,$fun_r,$empire,$dbtbpre,$emod_r,$class_tr,$level_r,$etable_r;
$mid=$class_r[$classid]['modid'];
$tbname=$class_r[$classid][tbname];
if(InfoIsInTable($tbname))//内部表
{
return '';
}
if($ecms==0)//主表
{
$add=$empire->fetch1("select ".ReturnSqlTextF($mid,1)." from {$dbtbpre}ecms_".$tbname." where id='$id' limit 1");
}
$add['id']=$id;
$add['classid']=$classid;
if($add['isurl'])
{
return '';
}
if(empty($doall))
{
if(!$add['stb']||$class_r[$add[classid]][showdt]==2||strstr($public_r['nreinfo'],','.$add['classid'].','))//不生成
{
return '';
}
}
//副表
$addr=$empire->fetch1(“select “.ReturnSqlFtextF($mid).” from {$dbtbpre}ecms_”.$tbname.”_data_”.$add[stb].” where id=’$add[id]’ limit 1″);
$add=array_merge($add,$addr);
//路径
$iclasspath=ReturnSaveInfoPath($add[classid],$add[id]);
$doclasspath=eReturnTrueEcmsPath().$iclasspath;//moreport
$createinfopath=$doclasspath;
//建立日期目录
$newspath=”;
if($add[newspath])
{
$createpath=$doclasspath.$add[newspath];
if(!file_exists($createpath))
{
$r[newspath]=FormatPath($add[classid],$add[newspath],1);
}
$createinfopath.=$add[newspath].’/’;
$newspath=$add[newspath].’/’;
}
//新建存放目录
if($class_r[$add[classid]][filename]==3)
{
$createinfopath.=ReturnInfoSPath($add[‘filename’]);
DoMkdir($createinfopath);
$fn3=1;
}
//存文本
if($emod_r[$mid][‘savetxtf’])
{
$stf=$emod_r[$mid][‘savetxtf’];
if($add[$stf])
{
$add[$stf]=GetTxtFieldText($add[$stf]);
}
}
eAutodo_AddDo(‘ReNewsHtml’,$classid,$id,0,0,0);//moreportdo
$GLOBALS[‘navclassid’]=$add[classid];
$GLOBALS[‘navinfor’]=$add;
//取得内容模板
$add[newstempid]=$add[newstempid]?$add[newstempid]:$class_r[$add[classid]][newstempid];
$newstemp_r=$empire->fetch1(“select temptext,showdate from “.GetTemptb(“enewsnewstemp”).” where tempid=’$add[newstempid]’ limit 1″);
$newstemp_r[‘tempid’]=$add[‘newstempid’];
if($public_r[‘opennotcj’])//启用反采集
{
$newstemp_r[‘temptext’]=ReturnNotcj($newstemp_r[‘temptext’]);
}
$newstemptext=$newstemp_r[temptext];
$formatdate=$newstemp_r[showdate];
//文件类型/权限
if($add[groupid]||$class_r[$add[classid]][‘cgtoinfo’])
{
if(empty($add[newspath]))
{
$include=”;
}
else
{
$pr=explode(‘/’,$add[newspath]);
for($i=0;$i<count($pr);$i++)
{
$include.=’../’;
}
}
if($fn3==1)
{
$include.=’../’;
}
$pr=explode(‘/’,$iclasspath);
$pcount=count($pr);
for($i=0;$i<$pcount-1;$i++)
{
$include.=’../’;
}
$include1=$include;
$include.=’e/class/CheckLevel.php’;
$filetype=’.php’;
$addlevel=”<?php
define(’empirecms’,’wm_chief’);
\$check_tbname=’”.$class_r[$add[classid]][tbname].”‘;
\$check_infoid=”.$add[id].”;
\$check_classid=”.$add[classid].”;
\$check_path=\””.$include1.”\”;
require(\””.$include.”\”);
?>”;
}
else
{
$filetype=$class_r[$add[classid]][filetype];
$addlevel=”;
}
//取得本目录链接
if($class_r[$add[classid]][classurl]&&$class_r[$add[classid]][ipath]==”)//域名
{
$dolink=$class_r[$add[classid]][classurl].’/’.$newspath;
}
else
{
$dolink=$public_r[newsurl].$iclasspath.$newspath;
}
//返回替换验证字符
$docheckrep=ReturnCheckDoRepStr();
if($add[newstext])
{
if(empty($public_r[‘dorepword’])&&$docheckrep[3])
{
$add[newstext]=ReplaceWord($add[newstext]);//过滤字符
}
if(empty($public_r[‘dorepkey’])&&$docheckrep[4]&&!empty($add[dokey]))//替换关键字
{
$add[newstext]=ReplaceKey($add[‘newstext’],$add[‘classid’]);
}
if($public_r[‘opencopytext’])
{
$add[newstext]=AddNotCopyRndStr($add[newstext]);//随机复制字符
}
}
//返回编译
$newstemptext=GetInfoNewsBq($classid,$newstemp_r,$add,$docheckrep);
//分页字段
$expage=’
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:115904045@qq.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明。