后台修改显示
修改位置
\e\admin\ecmseditor\infoeditor\fckeditor.php (1 hits)
Line 8: function ECMS_ShowEditorVar($varname,$varvalue,$toolbar='Default',$basepath='',$height='300',$width='100%'){
改后
//变量名,变量值,工具条模式,编辑器目录,高度,宽度
function ECMS_ShowEditorVar($varname,$varvalue,$toolbar='Default',$basepath='',$height='300',$width='100%'){
if(empty($basepath))
{
$basepath='ecmseditor/infoeditor/';
}
if(empty($height))
{
$height='300';
}
if(empty($width))
{
$width='100%';
}
if(!empty($varvalue))
{
$varvalue=str_replace("\","\\",$varvalue);
}
//设置区域
$oFCKeditor=new FCKeditor($varname);
$oFCKeditor->BasePath=$basepath;
$oFCKeditor->Value=$varvalue;
$oFCKeditor->Height=$height;
$oFCKeditor->Width=$width;
$oFCKeditor->ToolbarSet=$toolbar;
//区域的模板变量
$area=$oFCKeditor->CreateHtml();
return $area;
}
位置:e/class/hinfofun.php
//修改信息
function EditNews($add,$userid,$username){
global $empire,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
$add[classid]=(int)$add[classid];
$userid=(int)$userid;
$ztid=$add[ztid];
$add[id]=(int)$add[id];
if(!$add[id]||!$add[title]||!$add[classid]||!$add[filename])
{
printerror("EmptyTitle","history.go(-1)");
}
if(!empty($add[newstext]))
{
$add[newstext]=str_replace('\\',"\",$add[newstext]);
}
$doselfinfo=CheckLevel($userid,$username,$add[classid],"news");//操作权限
if(!$doselfinfo['doeditinfo'])//编辑权限
{
printerror("NotEditInfoLevel","history.go(-1)");
}
$ccr=$empire->fetch1("select classid,modid,listdt,haddlist,sametitle,addreinfo,wburl,repreinfo from {$dbtbpre}enewsclass where classid='$add[classid]' and islast=1");
生成html显示时
位置:e/class/connect.php
//写文件
function WriteFiletext($filepath,$string){
global $public_r;
$string=stripSlashes($string);
$string=str_replace('\','\\',$string);
$fp=@fopen($filepath,"w");
@fputs($fp,$string);
@fclose($fp);
if(empty($public_r[filechmod]))
{
@chmod($filepath,0777);
}
}
后台增加信息时
文件修改位置:e/class/hinfofun.php
//增加信息
function AddNews($add,$userid,$username){
global $empire,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
$add[classid]=(int)$add[classid];
$userid=(int)$userid;
$ztid=$add[ztid];
if(!$add[title]||!$add[classid])
{
printerror("EmptyTitle","history.go(-1)");
}
if(!empty($add[newstext]))
{
$add[newstext]=str_replace('\\',"\",$add[newstext]);
}
//操作权限
$doselfinfo=CheckLevel($userid,$username,$add[classid],"news");
if(!$doselfinfo['doaddinfo'])//增加权限
{
printerror("NotAddInfoLevel","history.go(-1)");
}
$ccr=$empire->fetch1("select classid,modid,listdt,haddlist,sametitle,addreinfo,wburl,repreinfo from {$dbtbpre}enewsclass where classid='$add[classid]' and islast=1");
评论