<!--#include file="chklogin.asp"-->
<%
dim siteddr,sitename,adminname,copyright,logoddr,bannerddr,sitemail,qq
siteddr=request("siteddr")
sitename=request("sitename")
adminname=request("adminname")
copyright=request("copyright")
logoddr=request("logoddr")
bannerddr=request("bannerddr")
sitemail=request("sitemail")
qq=request("qq")

dim mailsmtp,mailform,mailname,mailpass,sendname
mailsmtp=request.form("mailsmtp")
mailform=request.form("mailform")
mailname=request.form("mailname")
mailpass=request.form("mailpass")
sendname=request.form("sendname")
dim strInstallDir
strInstallDir = Trim(Request.ServerVariables("SCRIPT_NAME"))
strInstallDir = Left(strInstallDir, InStrRev(LCase(strInstallDir), "/")-1)
strInstallDir = Left(strInstallDir, InStrRev(LCase(strInstallDir), "/"))

strTemplate="<%"&vbCrLf
strTemplate=strTemplate&"const siteddr="""&siteddr&""""&vbCrLf
strTemplate=strTemplate&"const sitename="""&sitename&""""&vbCrLf
strTemplate=strTemplate&"const adminname="""&adminname&""""&vbCrLf
strTemplate=strTemplate&"const copyright="""&copyright&""""&vbCrLf
strTemplate=strTemplate&"const logoddr="""&logoddr&""""&vbCrLf
strTemplate=strTemplate&"const bannerddr="""&bannerddr&""""&vbCrLf
strTemplate=strTemplate&"const sitemail="""&sitemail&""""&vbCrLf
strTemplate=strTemplate&"const qq="""&qq&""""&vbCrLf

strTemplate=strTemplate&"const mailsmtp="""&mailsmtp&""""&vbCrLf
strTemplate=strTemplate&"const mailform="""&mailform&""""&vbCrLf
strTemplate=strTemplate&"const mailname="""&mailname&""""&vbCrLf
strTemplate=strTemplate&"const mailpass="""&mailpass&""""&vbCrLf
strTemplate=strTemplate&"const sendname="""&sendname&""""&vbCrLf
strTemplate=strTemplate&"const siteurl="""&strInstallDir&""""&vbCrLf
strTemplate=strTemplate&"%\>"


path=Server.MapPath("../config.asp")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set files=fso.CreateTextFile(path,true)
files.writeline(strTemplate)
files.close
set fso=nothing

response.write "<script language=javascript>alert('成功的修改了设置!');history.go(-1);</script>"
%>