<!--#include file="../Include/config.asp"-->
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<script language="javascript" src="Images/Disp.js"></script>
<script language="javascript" type="text/javascript" src="../Include/date/WdatePicker.js"></script>
<title>admin</title>
</head>
<body>
<%
Sub ADODB_SaveToFile(ByVal strBody,ByVal File)
	On Error Resume Next
	Dim objStream,FSFlag,fs,WriteFile
	FSFlag = 1
	If DEF_FSOString <> "" Then
		Set fs = Server.CreateObject(DEF_FSOString)
		If Err Then
			FSFlag = 0
			Err.Clear
			Set fs = Nothing
		End If
	Else
		FSFlag = 0
	End If
	
	If FSFlag = 1 Then
		Set WriteFile = fs.CreateTextFile(Server.MapPath(File),True)
		WriteFile.Write strBody
		WriteFile.Close
		Set Fs = Nothing
	Else
		Set objStream = Server.CreateObject("ADODB.Stream")
		If Err.Number=-2147221005 Then 
			GBL_CHK_TempStr = "您的主机不支持ADODB.Stream，无法完成操作，请使用FTP等功能，将<font color=Red >Include/config.asp</font>文件内容替换成框中内容"
			Err.Clear
			Set objStream = Noting
			Exit Sub
		End If
		With objStream
			.Type = 2
			.Open
			.Charset = "GB2312"
			.Position = objStream.Size
			.WriteText = strBody
			.SaveToFile Server.MapPath(File),2
			.Close
		End With
		Set objStream = Nothing
	End If
End Sub

If request("action")="Edit" then
SiteTitle = replace(Trim(Request.Form("SiteTitle")),CHR(34),"'")
Lelogo = replace(Trim(Request.Form("Images")),CHR(34),"'")
SiteUrl = replace(Trim(Request.Form("SiteUrl")),CHR(34),"'")
email = replace(Trim(Request.Form("email")),CHR(34),"'")
Tel = replace(Trim(Request.Form("Tel")),CHR(34),"'")
Address = replace(Trim(Request.Form("Address")),CHR(34),"'")
SitePath = replace(Trim(Request.Form("SitePath")),CHR(34),"'")
DataName = replace(Trim(Request.Form("DataName")),CHR(34),"'")
SqlNo = replace(Trim(Request.Form("SqlNo")),CHR(34),"'")
SiteUp = replace(Trim(Request.Form("SiteUp")),CHR(34),"'")
Sitekeywords = replace(Trim(Request.Form("Sitekeywords")),CHR(34),"'")
Sitedescription = replace(Trim(Request.Form("Sitedescription")),CHR(34),"'")
Htmledit = replace(Trim(Request.Form("Htmledit")),CHR(34),"'")
SiteTcp = replace(Trim(Request.Form("SiteTcp")),CHR(34),"'")
BadWord1 = replace(Trim(Request.Form("BadWord1")),CHR(34),"'")
bookoff = replace(Trim(Request.Form("bookoff")),CHR(34),"'")
Plsh = replace(Trim(Request.Form("Plsh")),CHR(34),"'")
Switch = replace(Trim(Request.Form("Switch")),CHR(34),"'")
power = replace(Trim(Request.Form("power")),CHR(34),"'")
Member = replace(Trim(Request.Form("Member")),CHR(34),"'")
Restri = replace(Trim(Request.Form("Restri")),CHR(34),"'")
Most = replace(Trim(Request.Form("Most")),CHR(34),"'")
least = replace(Trim(Request.Form("least")),CHR(34),"'")
MMost = replace(Trim(Request.Form("MMost")),CHR(34),"'")
Mleast = replace(Trim(Request.Form("Mleast")),CHR(34),"'")
lasting = replace(Trim(Request.Form("lasting")),CHR(34),"'")
sumis = replace(Trim(Request.Form("sumis")),CHR(34),"'")
ctime = replace(Trim(Request.Form("ctime")),CHR(34),"'")
flashTime = replace(Trim(Request.Form("flashTime")),CHR(34),"'")
Certif = replace(Trim(Request.Form("Certif")),CHR(34),"'")
HosIP = replace(Trim(Request.Form("HosIP")),CHR(34),"'")
HosTime = replace(Trim(Request.Form("HosTime")),CHR(34),"'")
MemTime = replace(Trim(Request.Form("MemTime")),CHR(34),"'")
BaiPk = replace(Trim(Request.Form("BaiPk")),CHR(34),"'")
FlashUrl = replace(Trim(Request.Form("FlashUrl")),CHR(34),"'")
Flck = replace(Trim(Request.Form("Flck")),CHR(34),"'")
Cock = replace(Trim(Request.Form("Cock")),CHR(34),"'")
powers = replace(Trim(Request.Form("powers")),CHR(34),"'")
Jump = replace(Trim(Request.Form("Jump")),CHR(34),"'")
pages = replace(Trim(Request.Form("pages")),CHR(34),"'")
Cnzz = replace(Trim(Request.Form("Cnzz")),CHR(34),"'")
qqline = replace(Trim(Request.Form("qqline")),CHR(34),"'")
Dim n,TempStr
	TempStr = ""
	TempStr = TempStr & chr(60) & "%" & VbCrLf
	TempStr = TempStr & "Dim SiteTitle,Lelogo,Cnzz,SiteUrl,email,tel,address,SitePath,DataName,SqlNo,SiteUp,Sitekeywords,Sitedescription,HosIP,HosTime,MemTime,BaiPk,FlashUrl,Cock" & VbCrLf
	TempStr = TempStr & "Dim SiteTcp,BadWord1,bookoff,Plsh,Switch,power,Member,Restri,Most,least,MMost,Mleast,lasting,sumis,ctime,flashTime,Certif,Flck,fabu,Jump,pages,qqline" & VbCrLf & VbCrLf
	TempStr = TempStr & "'=====网站名称" & VbCrLf 
	TempStr = TempStr & "SiteTitle="& Chr(34) & SiteTitle & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Lelogo="& Chr(34) & Lelogo & Chr(34) &"" & VbCrLf 
	TempStr = TempStr & "'=====注意不要随意更改" & VbCrLf 
	TempStr = TempStr & "SiteUrl="& Chr(34) & SiteUrl & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "'=====根目录直接用/" & VbCrLf
	TempStr = TempStr & "email="& Chr(34) & email & Chr(34) &" '联系邮件" & VbCrLf
	TempStr = TempStr & "tel="& Chr(34) & tel & Chr(34) &" '联系电话" & VbCrLf
	TempStr = TempStr & "address="& Chr(34) & address & Chr(34) &" '联系地址" & VbCrLf
	TempStr = TempStr & "SitePath="& Chr(34) & SitePath & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "'=======数据库设置================" & VbCrLf
	TempStr = TempStr & "DataName="& Chr(34) & DataName & Chr(34) &" '数据库名称" & VbCrLf
	TempStr = TempStr & "SqlNo="& Chr(34) & SqlNo & Chr(34) &" '数据库类型" & VbCrLf
	TempStr = TempStr & "SiteUp="& Chr(34) & SiteUp & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Sitekeywords="& Chr(34) & Sitekeywords & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Sitedescription="& Chr(34) & Sitedescription & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "SiteTcp="& Chr(34) & SiteTcp & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "BadWord1="& Chr(34) & BadWord1 & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "'=====显示设置=====" & VbCrLf
	TempStr = TempStr & "bookoff="& Chr(34) & bookoff & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Plsh="& Chr(34) & Plsh & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "'=====投票设置=====" & VbCrLf
	TempStr = TempStr & "Switch="& Chr(34) & Switch & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "power="& Chr(34) & power & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Member="& Chr(34) & Member & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Restri="& Chr(34) & Restri & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Most="& Chr(34) & Most & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "least="& Chr(34) & least & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "MMost="& Chr(34) & MMost & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Mleast="& Chr(34) & Mleast & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "lasting="& Chr(34) & lasting & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "sumis="& Chr(34) & sumis & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "ctime="& Chr(34) & ctime & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "flashTime="& Chr(34) & flashTime & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Certif="& Chr(34) & Certif & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "HosIP="& Chr(34) & HosIP & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "HosTime="& Chr(34) & HosTime & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "MemTime="& Chr(34) & MemTime & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "BaiPk="& Chr(34) & BaiPk & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "FlashUrl="& Chr(34) & FlashUrl & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Flck="& Chr(34) & Flck & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Cock="& Chr(34) & Cock & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "powers="& Chr(34) & powers & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Jump="& Chr(34) & Jump & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "pages="& Chr(34) & pages & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "Cnzz="& Chr(34) & Cnzz & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "qqline="& Chr(34) & qqline & Chr(34) &"" & VbCrLf
	TempStr = TempStr & "%" & chr(62) & VbCrLf
	
	ADODB_SaveToFile TempStr,"../Include/Config.asp"
	If GBL_CHK_TempStr = "" Then
		Response.Write("<script language=javascript>alert('修改成功！');this.location.href='admin_Config.asp';</script>")
	Else
		%><table width=""98%"" align=""center"" border=""1"" cellspacing=""0"" cellpadding=""4"" class=lanyubk style=""border-collapse: collapse""><tr><td class=lanyuss>基本资料更新</td></tr><tr class=lanyuds><td align=""center"" height=""66"">&gt;<%=GBL_CHK_TempStr%>&lt;<br><br>
		<textarea name="fileContent" cols="1" rows="1"><%=Server.htmlencode(TempStr)%></textarea></td></tr></table><%
		GBL_CHK_TempStr = ""
	End If
	End if
	%>
	<form action="?Action=Edit" method="post"  name="myform">
	<table border="0" align="center" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable">
	  <tr>
		<td height="30" colspan="2" background="images/skin/th_bg.gif" class="admintitle"> 网站基本资料</td>
	  </tr>
	  <tr>
		<td width="10%" height="25" bgcolor="EBF2F9" class="tdleft">网站名称：</td>
		<td  bgcolor="EBF2F9"><input name="SiteTitle" type="text" id="SiteTitle" value="<%=SiteTitle%>" size="40" class="textfield"></td>
	  </tr>
	  <tr>
		<td width="10%" height="25" bgcolor="EBF2F9" class="tdleft">登陆认证：</td>
		<td  bgcolor="EBF2F9"><input name="Certif"type="text" class="textfield" id="Certif" value="<%=Certif%>" size="10"> *系统登录认证码</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">网站LOGO：</td>
		<td bgcolor="EBF2F9">
			<input name="Images" type="text" class="textfield" style="WIDTH: 240;" value="<%=Lelogo%>" maxlength="100">
			<input type="checkbox" onClick="display('upload');" id="iox"/><label for='iox'>上传评选</label><br>
			<div id="upload" style="display:none;">			
			<iframe frameborder=0 width=290 height=25 scrolling=no src="Admin_upload.asp?action=AD_Pic"></iframe>
			</div>		</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">网站域名：</td>
		<td bgcolor="EBF2F9"><input name="SiteUrl"type="text" class="textfield" id="SiteUrl" value="<%=SiteUrl%>" size="40"> 
		如：www.ZhiRui.net,不要"http://"</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">网站邮件：</td>
		<td bgcolor="EBF2F9"><input name="email"type="text" class="textfield" id="mail" value="<%=email%>" size="40"> 
		如：88888888@126.com</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">联系电话：</td>
		<td bgcolor="EBF2F9"><input name="Tel"type="text" class="textfield" id="Tel" value="<%=Tel%>" size="40"> 
		如：010-88888888</td>
	  </tr>
		<tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">联系地址：</td>
		<td bgcolor="EBF2F9"><input name="Address"type="text" class="textfield" id="Address" value="<%=Address%>" size="40"> 
		如：中国北京朝阳路</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">安装目录：</td>
		<td bgcolor="EBF2F9"><input name="SitePath"type="text" class="textfield" id="SitePath" value="<%=SitePath%>" size="40">
		  网站安装目录，根目录请填写&quot;/&quot;，暂不支持二级目录；</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">数据库名称：</td>
		<td height="0" bgcolor="EBF2F9"><input name="DataName"type="text" class="textfield" id="DataName" value="<%=DataName%>" size="40">
		  更改Data目录下的数据库对应,SQL手动修改inclunde/conn.asp </td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">数据库：</td>
		<td bgcolor="EBF2F9"><input name="SqlNo" type="radio" class="noborder" value="1"<%IF ""&SqlNo&""=1 then Response.Write("checked") end if%>>
	MSSQL
	  <input name="SqlNo" type="radio" class="noborder" value="0"<%IF ""&SqlNo&""=0 then Response.Write("checked") end if%>>
	Access	</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">上传目录：</td>
		<td bgcolor="EBF2F9"><input name="SiteUp"type="text" class="textfield" id="SiteUp" value="<%=SiteUp%>" size="40">
		  如更改此项,请手工更改上传目录名</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">关 键 字：</td>
		<td bgcolor="EBF2F9"><input name="SiteKeywords" type="text" class="textfield" id="SiteKeywords" value="<%=SiteKeywords%>" size="40"> 
		网站针对搜索引擎的关键字</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">网站描述：</td>
		<td bgcolor="EBF2F9"><input name="Sitedescription" type="text" class="textfield" id="Sitedescription" value="<%=Sitedescription%>" size="80"></td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">备案序号：</td>
		<td bgcolor="EBF2F9"><input name="SiteTcp" type="text" class="textfield" id="SiteTcp" value="<%=SiteTcp%>" size="40"></td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">脏话过滤：</td>
		<td bgcolor="EBF2F9"><input name="BadWord1" type="text" class="textfield" id="BadWord1" value="<%=BadWord1%>" size="80">
		  注意：不正确的格式可能导致错误显示,每组过滤词用|隔开</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">统计代码：</td>
		<td bgcolor="EBF2F9"><input name="Cnzz" type="text" class="textfield" id="Cnzz" value="<%=Cnzz%>" size="80">
		  注意：可直接在cnzz.com上申请免费统计</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">留言审核：</td>
		<td bgcolor="EBF2F9">
		<input name="bookoff" type="radio" class="noborder" value="1"<%IF ""&bookoff&""=1 then Response.Write("checked") end if%>> 不需审核
	    <input name="bookoff" type="radio" class="noborder" value="0"<%IF ""&bookoff&""=0 then Response.Write("checked") end if%>> 需要审核 
		评论审核： 
		<input name="Plsh" type="radio" class="noborder" value="1"<%IF ""&Plsh&""=1 then Response.Write("checked") end if%>> 不需审核
		<input name="Plsh" type="radio" class="noborder" value="0"<%IF ""&Plsh&""=0 then Response.Write("checked") end if%>> 需要审核		</td>
	  </tr>
	  <tr>
		<td height="25" bgcolor="EBF2F9" class="tdleft">投票开关：</td>
		<td bgcolor="EBF2F9">
		<input name="power" type="radio" class="noborder" value="1"<%IF ""&power&""=1 then Response.Write("checked") end if%>> 开启
	    <input name="power" type="radio" class="noborder" value="0"<%IF ""&power&""=0 then Response.Write("checked") end if%>>	    
	     关闭
	注:总投票开关</td>
	  </tr>
          <tr>
            <td height="25" align="center" bgcolor="EBF2F9" colspan="2" ><input name="Submit" type="submit" class="button" id="Submit" value="确定修改"></td>
          </tr>
        </table>
</form>
<%
Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If Err = 0 Then IsObjInstalled = True
	If Err = -2147352567 Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function
%>
</body>
</html>