📄 save_config.asp
字号:
<%
'***********************************************
'* MAKE CONFIG FUNCTION
'* 需FSO支持,你可以对以下内容进行任何修改,但请保留版权,谢谢。
'* 零点设计在线 Power by marquee 2005年5月
'***********************************************
Function saveConfig()
Dim take_time,begin_time,config_path,content
begin_time=timer()
Tmp_sitetitle=Request.Form("sitetitle") '站点标题
Tmp_copyright=Request.Form("copyright") '版权
Tmp_datapath=Request.Form("datapath")
' Tmp_adminPath=Request.Form("adminPath")
Tmp_Skin = Request.Form("frmSkin")
Tmp_softlanguage=Request.Form("softlanguage")
Tmp_softlevel=cint(Request.Form("softlevel"))
Tmp_softaccredit=Request.Form("softaccredit")
Tmp_MemberType = Request.Form("MemberType")
Tmp_CountOnline = Request.Form("CountOnline")
Tmp_Interval = Request.Form("Interval")
Tmp_ArticleListPath = Request.Form("ArticleListPath")
Tmp_ArticleViewPath = Request.Form("ArticleViewPath")
Tmp_SoftListPath = Request.Form("SoftListPath")
Tmp_SoftViewPath = Request.Form("SoftViewPath")
Tmp_ExteriorPost = Request.Form("ExteriorPost")
Tmp_CookieName = Request.Form("CookieName")
Tmp_MemberNeedCheck = Request.Form("MemberNeedCheck")
Tmp_GbookNeedLogin = Request.Form("GbookNeedLogin")
Tmp_AllowUpload = ZD_AllowUpload
set Rs=Server.CreateObject("Adodb.Recordset")
sql="select * from ZD_configdata"
Rs.open sql,conn,1,3
rs("lastupdate")=cstr(date())
Rs("copyright")=Trim(Tmp_copyright)
Rs("sitetitle")=Trim(Tmp_sitetitle)
Rs("datapath")=Trim(Tmp_datapath)
' Rs("adminPath")=Trim(Tmp_adminPath)
Rs("softaccredit")=Trim(Tmp_softaccredit)
Rs("softlanguage")=Trim(Tmp_softlanguage)
Rs("softlevel")=Trim(Tmp_softlevel)
Rs("MemberType")=Trim(Tmp_MemberType)
Rs("ArticleListPath") = Trim(Tmp_ArticleListPath)
RS("ArticleViewPath") = Trim(Tmp_ArticleViewPath)
Rs("SoftListPath") = Trim(Tmp_SoftListPath)
RS("SoftViewPath") = Trim(Tmp_SoftViewPath)
Rs("Skin") = Trim(Tmp_Skin)
IF Tmp_ExteriorPost = "true" Then
Rs("ExteriorPost")=True
Else
Rs("ExteriorPost")=False
End IF
Rs("CookieName")=Tmp_CookieName
IF Tmp_MemberNeedCheck = "true" Then
Rs("MemberNeedCheck")=True
Else
Rs("MemberNeedCheck")=False
End IF
IF Tmp_GbookNeedLogin = "true" Then
Rs("GbookNeedLogin")=True
Else
Rs("GbookNeedLogin")=False
End IF
Rs("Version") = "ZSA1.3"
Rs.update
RS.close
set Rs=nothing
config_path=Server.MapPath("..\config.asp")
set fso=Server.CreateObject("Scripting.FileSystemObject")
set ConfigWrite=fso.CreateTextFile(config_path)
IF err>0 Then
saveConfig="出错了!!!服务器不支持FSO,请手动更改CONFIG文件进行配置。详细信息请看帮助文件。"
fso.close
set f_writ=nothing
set fso=nothing
Exit Function
End IF
ConfigWrite.WriteLine("<%")
ConfigWrite.WriteLine("'=========================================================================================================")
ConfigWrite.WriteLine("'*该处定义全局变量与站点参数设置。")
ConfigWrite.WriteLine("'=========================================================================================================")
ConfigWrite.WriteLine("")
content="Const ZD_SiteTitle="+chr(34)+Tmp_sitetitle+chr(34)+" '站点标题"
ConfigWrite.WriteLine(content)
content="Const ZD_CopyRight="+chr(34)+Tmp_copyright+chr(34)+" '版权"
ConfigWrite.WriteLine(content)
content="Const ZD_DataName="+chr(34)+Tmp_datapath+chr(34)+" '数据库路径"
ConfigWrite.WriteLine(content)
content="Const ZD_Skin="+chr(34)+Tmp_Skin+chr(34)+" '皮肤地址"
ConfigWrite.WriteLine(content)
ConfigWrite.WriteLine("")
ConfigWrite.WriteLine("'=========================================================================================================")
content="Const ZD_SoftAccredit="+chr(34)+cstr(Tmp_softaccredit)+chr(34)
ConfigWrite.WriteLine(content)
content="Const ZD_SoftLevel="+cstr(Tmp_softlevel)
ConfigWrite.WriteLine(content)
content="Const ZD_SoftLanguage="+chr(34)+cstr(Tmp_softlanguage)+chr(34)
ConfigWrite.WriteLine(content)
content="Const ZD_MemberType="""&Tmp_MemberType&""""
ConfigWrite.WriteLine(content)
content="Const ZD_ArticleListPath="""&Tmp_ArticleListPath&""""
ConfigWrite.WriteLine(content)
content="Const ZD_ArticleViewPath="""&Tmp_ArticleViewPath&""""
ConfigWrite.WriteLine(content)
content="Const ZD_SoftListPath="""&Tmp_SoftListPath&""""
ConfigWrite.WriteLine(content)
content="Const ZD_SoftViewPath="""&Tmp_SoftViewPath&""""
ConfigWrite.WriteLine(content)
content="Const ZD_ExteriorPost="&Tmp_ExteriorPost&" '是否允计外部提交"
ConfigWrite.WriteLine(content)
content="Const ZD_CookieName="""&Tmp_CookieName&""" 'COOKIES名字"
ConfigWrite.WriteLine(content)
content="Const ZD_MemberNeedCheck="&Tmp_MemberNeedCheck&" '新注册会员是否需要验证才能登录"
ConfigWrite.WriteLine(content)
content="Const ZD_GbookNeedLogin="&Tmp_GbookNeedLogin&" '留言本是否只对会员开放"
ConfigWrite.WriteLine(content)
content="Const ZD_AllowUpload="&Tmp_AllowUpload&" '是否开启上传.该选项无法在后台修改"
ConfigWrite.WriteLine(content)
content="Const ZD_CountOnline="&Tmp_CountOnline&" '开启在线及流量统计.对速度有一定影响.请自己根据实际需要决定."
ConfigWrite.WriteLine(content)
content="Const ZD_Interval="&Tmp_Interval&" '刷新时间,值越大则同时在线人数也就越多....."
ConfigWrite.WriteLine(content)
ConfigWrite.WriteLine("%"+chr(62))
ConfigWrite.close
set ConfigWrite=nothing
set fso=nothing
take_time=FormatNumber((timer()-begin_time),2)
call SaveLog(Session("member"),"参数设置成功"&Request.Form("title"),now(),"参点参数设置",getIP(),true)
saveConfig="站点参数配置完毕,总计费时:<font color=red>0"&take_time&"秒"
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -