<% Option Explicit %>
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P0703") then Call ReturnError1()
	Dim RsOCObj,TempFlag
	Set RsOCObj = Conn.Execute("Select * from WebInfo")
	If RsOCObj.eof then
		TempFlag = false
	Else
		TempFlag = true
	End If
%>
<html>
<head>
<link href="../../CSS/css.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站维护</title>
</head>
<script language="JavaScript" src="../JS/PublicJS.js"></script>
<body topmargin="0" leftmargin="0" oncontextmenu="return false;">
<form action="" method="post" name="VOForm">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25" class="ButtonList"><div align="center"><strong>网站信息维护</strong></div></td>
</tr>
<tr><td height="50">&nbsp;</td>
</tr>
</table>
<table width="75%"  border="8" align="center" cellpadding="0" cellspacing="5" bordercolor="e6e6e6">
  <tr>
    <td width="24%">&nbsp;&nbsp;&nbsp;&nbsp;网站名称</td>
    <td width="76%"><input name="WebName" type="text" id="WebName" style="width:90%" value="<%If TempFlag = true then Response.Write(RsOCObj("WebName")) end if%>"></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;网站地址</td>
    <td><input name="WebUrl" type="text" id="WebUrl" style="width:90%" value="<%If TempFlag = true then Response.Write(RsOCObj("WebUrl")) end if%>"></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;管理员</td>
    <td><input name="WebAdmin" type="text" id="WebAdmin" style="width:90%" value="<%If TempFlag = true then Response.Write(RsOCObj("WebAdmin")) end if%>"></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;网站信箱</td>
    <td><input name="WebEmail" type="text" id="WebEmail" style="width:90%" value="<%If TempFlag = true then Response.Write(RsOCObj("WebEmail")) end if%>"></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;开始统计时间</td>
    <td><input name="WebCountTime" type="text" readonly id="WebCountTime" style="width:71%" value="<%If TempFlag = true then Response.Write(RsOCObj("WebCountTime")) end if%>">
      <input type="button" name="dfgdf" value="选择日期" onClick="OpenWindowAndSetValue('../Inc/SelectDate.asp',280,110,window,document.VOForm.WebCountTime);"></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;网站介绍</td>
    <td><textarea name="WebIntro" id="WebIntro" style="width:90%"><%If TempFlag = true then Response.Write(RsOCObj("WebIntro")) end if%></textarea></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
      <input type="submit" name="Submit" value=" 确 定 ">&nbsp;&nbsp;
      <input name="action" type="hidden" id="action" value="trues">
      <input type="reset" name="Submit" value=" 还 原 ">&nbsp;&nbsp;
      <input type="button" name="Submit" value=" 取 消 " onclick="history.back();">
    </div></td>
    </tr>
</table>
</form>
</body>
</html>
<%
	If Request.Form("action") = "trues" then
		Dim VOModObj,VoModSql
		Set VOModObj = Server.CreateObject("Adodb.RecordSet")
		VoModSql = "Select * from WebInfo order by ID asc"
		VOModObj.Open VoModSql,Conn,3,3
		If TempFlag = false then
		VOModObj.AddNew
		End If
		VOModObj("WebName") = Replace(Replace(Request.Form("WebName"),"""",""),"'","")
		VOModObj("WebUrl") = Request.Form("WebUrl")
		VOModObj("WebIntro") = Request.Form("WebIntro")
		VOModObj("WebEmail") = Request.Form("WebEmail")
		VOModObj("WebAdmin") = Request.Form("WebAdmin")
		VOModObj("WebCountTime") = Request.Form("WebCountTime")
		VOModObj.Update
		VOModObj.Close
		Set VOModObj = Nothing
		Response.Write("<script>alert(""网站信息维护成功"");history.back();</script>")
	End If
Conn.Close
Set Conn = Nothing
%>