query("update {$dbtbpre}enewspublic set ".$a."sitename='$add[sitename]',newsurl='$add[newsurl]',email='$add[email]',filetype='$add[filetype]',filesize=$add[filesize],hotnum=$add[hotnum],newnum=$add[newnum],relistnum=$add[relistnum],renewsnum=$add[renewsnum],min_keyboard=$add[min_keyboard],max_keyboard=$add[max_keyboard],search_num=$add[search_num],search_pagenum=$add[search_pagenum],newslink=$add[newslink],checked=$add[checked],searchtime=$add[searchtime],loginnum=$add[loginnum],logintime=$add[logintime],addnews_ok=$add[addnews_ok],register_ok=$add[register_ok],indextype='$add[indextype]',goodlencord=$add[goodlencord],goodtype='$add[goodtype]',goodnum=$add[goodnum],searchtype='$add[searchtype]',exittime=$add[exittime],smalltextlen=$add[smalltextlen],defaultgroupid=$add[defaultgroupid],fileurl='$add[fileurl]',phpmode=$add[phpmode],ftphost='$add[ftphost]',ftpport='$add[ftpport]',ftpusername='$add[ftpusername]',ftppath='$add[ftppath]',ftpmode='$add[ftpmode]',install=$add[install],hotplnum=$add[hotplnum],dorepnum=$add[dorepnum],loadtempnum=$add[loadtempnum],firstnum=$add[firstnum],bakdbpath='$add[bakdbpath]',bakdbzip='$add[bakdbzip]',downpass='$add[downpass]',min_userlen=$add[min_userlen],max_userlen=$add[max_userlen],min_passlen=$add[min_passlen],max_passlen=$add[max_passlen],filechmod=$add[filechmod],loginkey_ok=$add[loginkey_ok],limittype=$add[limittype],redodown=$add[redodown],candocode=$add[candocode],opennotcj=$add[opennotcj],reuserpagenum=$add[reuserpagenum],revotejsnum=$add[revotejsnum],readjsnum=$add[readjsnum],qaddtran=$add[qaddtran],qaddtransize=$add[qaddtransize],ebakthisdb=$add[ebakthisdb],delnewsnum=$add[delnewsnum],markpos=$add[markpos],markimg='$add[markimg]',marktext='$add[marktext]',markfontsize='$add[markfontsize]',markfontcolor='$add[markfontcolor]',markfont='$add[markfont]',adminloginkey=$add[adminloginkey],php_outtime=$add[php_outtime],listpagefun='$add[listpagefun]',textpagefun='$add[textpagefun]',adfile='$add[adfile]',notsaveurl='$add[notsaveurl]',rssnum=$add[rssnum],rsssub=$add[rsssub],dorepdlevelnum=$add[dorepdlevelnum],listpagelistfun='$add[listpagelistfun]',listpagelistnum=$add[listpagelistnum],infolinknum=$add[infolinknum],searchgroupid=$add[searchgroupid],opencopytext=$add[opencopytext],reuserjsnum=$add[reuserjsnum],reuserlistnum=$add[reuserlistnum],opentitleurl='$add[opentitleurl]',qaddtranimgtype='$add[qimgtype]',qaddtranfile=$add[qaddtranfile],qaddtranfilesize=$add[qaddtranfilesize],qaddtranfiletype='$add[qfiletype]',sendmailtype=$add[sendmailtype],smtphost='$add[smtphost]',fromemail='$add[fromemail]',loginemail=$add[loginemail],emailusername='$add[emailusername]',emailpassword='$add[emailpassword]',smtpport='$add[smtpport]',emailname='$add[emailname]',feedbacktfile=$add[feedbacktfile],feedbackfilesize=$add[feedbackfilesize],feedbackfiletype='$add[feedbackfiletype]',searchtempvar=$add[searchtempvar],showinfolevel=$add[showinfolevel],navfh='".eaddslashes($add[navfh])."',spicwidth=$add[spicwidth],spicheight=$add[spicheight],spickill=$add[spickill],jpgquality=$add[jpgquality],markpct=$add[markpct],redoview=$add[redoview],reggetfen=$add[reggetfen],regbooktime=$add[regbooktime],revotetime=$add[revotetime],fpath=$add[fpath],filepath='$add[filepath]',openmembertranimg=$add[openmembertranimg],memberimgsize=$add[memberimgsize],openmembertranfile=$add[openmembertranfile],memberfilesize=$add[memberfilesize],memberimgtype='$add[memberimgtype]',memberfiletype='$add[memberfiletype]',canposturl='$add[canposturl]',openspace='$add[openspace]',realltime=$add[realltime],closeip='$add[closeip]',openip='$add[openip]',hopenip='$add[hopenip]',closewords='$add[closewords]',closewordsf='$add[closewordsf]',textpagelistnum=$add[textpagelistnum],memberlistlevel=$add[memberlistlevel],ebakcanlistdb=$add[ebakcanlistdb],keytog='$add[keytog]',keyrnd='$add[keyrnd]',keytime='$add[keytime]',regkey_ok='$add[regkey_ok]',opengetdown='$add[opengetdown]',gbkey_ok='$add[gbkey_ok]',fbkey_ok='$add[fbkey_ok]',newaddinfotime='$add[newaddinfotime]',classnavline='$add[classnavline]',classnavfh='".eaddslashes($add[classnavfh])."',sitekey='$add[sitekey]',siteintro='$add[siteintro]',docnewsnum='$add[docnewsnum]',dtcanbq='$add[dtcanbq]',dtcachetime='$add[dtcachetime]',regretime='$add[regretime]',regclosewords='$add[regclosewords]',regemailonly='$add[regemailonly]',repkeynum='$add[repkeynum]',getpasstime='$add[getpasstime]',acttime='$add[acttime]',regacttype='$add[regacttype]',acttext='".eaddslashes($add[acttext])."',getpasstext='".eaddslashes($add[getpasstext])."',acttitle='".eaddslashes($add[acttitle])."',getpasstitle='".eaddslashes($add[getpasstitle])."',opengetpass='$add[opengetpass]',hlistinfonum='$add[hlistinfonum]',qlistinfonum='$add[qlistinfonum]',dtncanbq='$add[dtncanbq]',dtncachetime='$add[dtncachetime]',readdinfotime='$add[readdinfotime]',qeditinfotime='$add[qeditinfotime]',ftpssl='$add[ftpssl]',ftppasv='$add[ftppasv]',ftpouttime='$add[ftpouttime]',onclicktype='$add[onclicktype]',onclickfilesize='$add[onclickfilesize]',onclickfiletime='$add[onclickfiletime]',closeqdt='$add[closeqdt]',settop='$add[settop]',qlistinfomod='$add[qlistinfomod]',gb_num='$add[gb_num]',member_num='$add[member_num]',space_num='$add[space_num]',opendoip='$add[opendoip]',closedoip='$add[closedoip]',doiptype='$doiptypes',infolday='$add[infolday]',filelday='$add[filelday]',baktempnum='$add[baktempnum]',dorepkey='$add[dorepkey]',dorepword='$add[dorepword]',onclickrnd='$add[onclickrnd]',indexpagedt='$add[indexpagedt]',keybgcolor='$add[keybgcolor]',keyfontcolor='$add[keyfontcolor]',keydistcolor='$add[keydistcolor]',closeqdtmsg='$add[closeqdtmsg]',openfileserver='$add[openfileserver]',closemods='$closemodss',fieldandtop='$add[fieldandtop]',fieldandclosetb='$add[fieldandclosetb]',closelisttemp='".eaddslashes($add[closelisttemp])."',chclasscolor='".eaddslashes($add[chclasscolor])."',timeclose='".eaddslashes($timecloses)."',timeclosedo='".eaddslashes($timeclosedos)."',ipaddinfonum='$add[ipaddinfonum]',ipaddinfotime='$add[ipaddinfotime]',closehmenu='$closehmenus',indexaddpage='$add[indexaddpage]',modmemberedittran='$add[modmemberedittran]',modinfoedittran='$add[modinfoedittran]',php_adminouttime='$add[php_adminouttime]',httptype='$add[httptype]',qinfoaddfen='$add[qinfoaddfen]',bakescapetype='$add[bakescapetype]',hkeytime='$add[hkeytime]',hkeyrnd='$add[hkeyrnd]',mhavedatedo='$add[mhavedatedo]',reportkey='$add[reportkey]',usetotalnum='$add[usetotalnum]',spacegids='".eaddslashes($spacegids)."',candocodetag='$add[candocodetag]',openern='".eaddslashes($openerns)."',ernurl='".eaddslashes($ernurl)."';");
//配置副表
$addpsql=$empire->query("update {$dbtbpre}enewspublicadd set toqjf='$add[toqjf]',qtoqjf='$add[qtoqjf]';");
DoSetFileServer($add);//远程附件更新
GetConfig();
//首页动态文件
if($add['indexpagedt']!=$add['oldindexpagedt'])
{
if($add['indexpagedt'])
{
DelFiletext(ECMS_PATH.'index'.$add[indextype]);
@copy(ECMS_PATH.'e/data/template/dtindexpage.txt',ECMS_PATH.'index.php');
}
else
{
DelFiletext(ECMS_PATH.'index.php');
$indextemp=GetIndextemp();
NewsBq(0,$indextemp,1,0);
}
}
if($sql){
insert_dolog("");//操作日志
printerror("SetPublicSuccess","SetEnews.php".hReturnEcmsHashStrHref2(1));
}
else{
printerror("DbError","history.go(-1)");
}
}
//远程附件更新
function DoSetFileServer($add){
global $empire,$dbtbpre;
$update='';
if($add['fs_ftppassword'])
{
$update=",ftppassword='$add[fs_ftppassword]'";
}
$add['fs_ftpmode']=(int)$add['fs_ftpmode'];
$add['fs_ftpssl']=(int)$add['fs_ftpssl'];
$add['fs_ftppasv']=(int)$add['fs_ftppasv'];
$add['fs_ftpouttime']=(int)$add['fs_ftpouttime'];
$sql=$empire->query("update {$dbtbpre}enewspostserver set purl='$add[fs_purl]',ftphost='$add[fs_ftphost]',ftpport='$add[fs_ftpport]',ftpusername='$add[fs_ftpusername]',ftppath='$add[fs_ftppath]',ftpmode='$add[fs_ftpmode]',ftpssl='$add[fs_ftpssl]',ftppasv='$add[fs_ftppasv]',ftpouttime='$add[fs_ftpouttime]'".$update." where pid='1'");
}
//测试远程附件FTP
function CheckFileServerFtp($add,$userid,$username){
global $empire,$dbtbpre;
//操作权限
CheckLevel($userid,$username,$classid,"public");
$ftphost=$add[fs_ftphost];
$ftpport=$add[fs_ftpport];
$ftpusername=$add[fs_ftpusername];
if($add[fs_ftppassword])
{
$ftppassword=$add[fs_ftppassword];
}
else
{
$fsr=$empire->fetch1("select ftppassword from {$dbtbpre}enewspostserver where pid='1' limit 1");
$ftppassword=$fsr[ftppassword];
}
$ftppath=$add[fs_ftppath];
$tranmode=(int)$add['fs_ftpmode'];
$ftpssl=(int)$add['fs_ftpssl'];
$pasv=(int)$add['fs_ftppasv'];
$timeout=(int)$add['fs_ftpouttime'];
CheckFtpConnect($ftphost,$ftpport,$ftpusername,$ftppassword,$ftppath,$ftpssl,$pasv,$tranmode,$timeout);
}
//测试远程发布FTP
function CheckPostServerFtp($add,$userid,$username){
global $empire,$dbtbpre;
//操作权限
CheckLevel($userid,$username,$classid,"public");
$ftphost=$add[ftphost];
$ftpport=$add[ftpport];
$ftpusername=$add[ftpusername];
if($add[ftppassword])
{
$ftppassword=$add[ftppassword];
}
else
{
$fsr=$empire->fetch1("select ftppassword from {$dbtbpre}enewspublic limit 1");
$ftppassword=$fsr[ftppassword];
}
$ftppath=$add[ftppath];
$tranmode=(int)$add['ftpmode'];
$ftpssl=(int)$add['ftpssl'];
$pasv=(int)$add['ftppasv'];
$timeout=(int)$add['ftpouttime'];
CheckFtpConnect($ftphost,$ftpport,$ftpusername,$ftppassword,$ftppath,$ftpssl,$pasv,$tranmode,$timeout);
}
$enews=$_POST['enews'];
if(empty($enews))
{
$enews=$_GET['enews'];
}
if($enews)
{
hCheckEcmsRHash();
include LoadLang("pub/fun.php");
include("../data/dbcache/class.php");
include("../data/dbcache/MemberLevel.php");
}
if($enews=="SetEnews")//参数设置
{
SetEnews($_POST,$logininid,$loginin);
}
elseif($enews=='CheckFileServerFtp')//测试附件FTP
{
CheckFileServerFtp($_POST,$logininid,$loginin);
}
elseif($enews=='CheckPostServerFtp')//测试远程发布FTP
{
CheckPostServerFtp($_POST,$logininid,$loginin);
}
$r=$empire->fetch1("select * from {$dbtbpre}enewspublic limit 1");
$addpr=$empire->fetch1("select * from {$dbtbpre}enewspublicadd limit 1");
//文件类别
$filetype=substr($r[filetype],1,strlen($r[filetype]));
$filetype=substr($filetype,0,strlen($filetype)-1);
//投稿图片扩展名
$qaddimgtype=substr($r[qaddtranimgtype],1,strlen($r[qaddtranimgtype]));
$qaddimgtype=substr($qaddimgtype,0,strlen($qaddimgtype)-1);
//投稿附件扩展名
$qaddfiletype=substr($r[qaddtranfiletype],1,strlen($r[qaddtranfiletype]));
$qaddfiletype=substr($qaddfiletype,0,strlen($qaddfiletype)-1);
//反馈附件
$feedbackfiletype=substr($r[feedbackfiletype],1,strlen($r[feedbackfiletype])-2);
//会员表单
$memberimgtype=substr($r[memberimgtype],1,strlen($r[memberimgtype]));
$memberimgtype=substr($memberimgtype,0,strlen($memberimgtype)-1);
$memberfiletype=substr($r[memberfiletype],1,strlen($r[memberfiletype]));
$memberfiletype=substr($memberfiletype,0,strlen($memberfiletype)-1);
//----------会员组
$mgshowline=5;//一行显示五个
$mgsi=0;
$sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while($l_r=$empire->fetch($sql1))
{
if($r[defaultgroupid]==$l_r[groupid])
{$select=" selected";}
else
{$select="";}
//搜索会员组
if($r[searchgroupid]==$l_r[groupid])
{$s_select=" selected";}
else
{$s_select="";}
//查看资料权限
if($r[showinfolevel]==$l_r[groupid])
{$showinfo_select=" selected";}
else
{$showinfo_select="";}
//会员列表查看权限
if($r[memberlistlevel]==$l_r[groupid])
{$memberlist_select=" selected";}
else
{$memberlist_select="";}
$membergroup.="";
$searchmembergroup.="";
$showinfolevel.="";
$memberlistlevel.="";
//会员空间
$mgsi++;
$mgsbr='';
if($mgsi%$mgshowline==0)
{
$mgsbr='
';
}
if(strstr($r['spacegids'],','.$l_r['groupid'].','))
{$mgschecked=' checked';}
else
{$mgschecked='';}
$spacegids.="".$l_r[groupname]." ".$mgsbr;
}
//远程附件
if($r['openfileserver']==1)
{
$hiddenfileserver="";
}
else
{
$hiddenfileserver="";
}
$fsr=$empire->fetch1("select * from {$dbtbpre}enewspostserver where pid='1' limit 1");
//当前使用的模板组
$thegid=GetDoTempGid();
db_close();
$empire=null;
?>
位置:参数设置 |