<!-- #Include File=Conn.asp -->
<%
Action=Request.Form("Rereg")
WebName=Request.Form("WebName")
WebUrl=Request.Form("WebUrl")
PassWord=Request.Form("PassWord")
Select Case Action
Case "更改信息":
     NewPsw=Request.Form("NewPsw")
     Confirm=Request.Form("Confirm")
     Flag=0
     PswMod=0
     Sql="Select * from InfoList"
     Rs.Open Sql,Conn,1,3
     If Rs("PassWord")<>PassWord Then Flag=2
     If Rs("PassWord")=PassWord And WebUrl<>"" And WebName<>"" Then
        Rs("Name")=WebName
        Rs("Url")=WebUrl
        StartDate=Rs("StartDate")
        If NewPsw=Confirm And NewPsw<>"" Then
           Rs("PassWord")=NewPsw
     	  PswMod=1
        End If
        Rs.Update
        Flag=1
     End If
     Rs.Close
     Conn.Close
     Set Rs=Nothing
     Set Conn=Nothing

Case "统计重置":
     Restart=0
     Sql="Select * from InfoList"
	 Rs.Open Sql,Conn,1,3
	 If Rs("PassWord")=PassWord Then
	    OldPasswd=Rs("PassWord")
		OldWebName=Rs("Name")
        OldWebUrl=Rs("Url")
		Rs.Delete
		Rs.Addnew
	    If WebName<>"" Then OldWebName=WebName		
        If WebUrl<>"" Then OldWebUrl=WebUrl
		Rs("Name")=OldWebName
		Rs("Url")=OldWebUrl
		WebName=Rs("Name")
		WebUrl=Rs("Url")
		StartDate=Cstr(Year(Date)&"-"&Month(Date)&"-"&Day(date))
		Rs("StartDate")=StartDate
		Rs("OldDay")=Cstr(Year(Date)&"-"&Month(Date)&"-"&Day(date))
        Rs("PassWord")=OldPasswd
		Restart=1
	 End If
     Rs.Update
	 Rs.Close
	 If Restart=1 Then
        Sql="Delete * from FAddress"
	    Conn.Execute(Sql)
        Sql="Delete * from FArea" 
		Conn.Execute(Sql)
		Sql="Delete * from FIpone"
		Conn.Execute(Sql)
		Sql="Delete * from FIptwo"
		Conn.Execute(Sql)
		Sql="Delete * from FBrowser"
		Conn.Execute(Sql)
		Sql="Delete * from FSystem"
		Conn.Execute(Sql)
		Sql="Delete * from FScreen"
		Conn.Execute(Sql)
		Sql="Delete * from FMozilla"
		Conn.Execute(Sql)
		Sql="Delete * from FRefer"
		Conn.Execute(Sql)
		Sql="Delete * from FWeburl"
		Conn.Execute(Sql)
		Sql="Delete * from FVisit"
		Conn.Execute(Sql)
		Sql="Delete * from StatDay"
		Conn.Execute(Sql)
		Sql="Delete * from StatMonth"
		Conn.Execute(Sql)
		Sql="Delete * from StatYear"
		Conn.Execute(Sql)
		Sql="Delete * from StatWeek"
		Conn.Execute(Sql)
		Sql="Delete * from Visitor"
		Conn.Execute(Sql)
	 End If

End Select


%>
<HTML>
<HEAD>
<TITLE>宏亮软件园网站统计分析系统</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" href="Info/Style.css">
<style type="text/css">
<!--
.Button {  background-color: #000099; height: 22px; color: #FFFFFF}
.style1 {color: #333333}
body {
	background-color: #FFFFFF;
}
-->
</style>
</HEAD>
<BODY onselectstart=window.event.returnValue=null style="background-color: #ffffff">
<CENTER>
<!-- #Include File=Header.asp-->
  <table width="560" border=1  bordercolor=#CDCDCD cellpadding=0 cellspacing=0 >
    <tbody> 
    <tr> 
      <td> 
        <table border=0 cellpadding=3 cellspacing=0 width="100%" bgcolor="#FFFFFF">
          <tbody> 
          <tr> 
            <td colspan=4 align="center" bgcolor="#DFF4FF"><span class="style1"> 修 改 网 站 信 息</span></td>
          </tr>
          <tr bgcolor="#CCCCCC"> 
            <td colspan="4" align=left bgcolor="#EEEEEE"><span class="style1">操作结果：</span></td>
          </tr>
		  <%
		  If Action="更改信息" Then
		  %>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="4" align=left bgcolor="#CCCCCC"> 
              <table width="40%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr valign="middle" align="center"> 
                  <td colspan="3"> <%
					If Flag=1 Then
                       Response.write("<br><br> <img src='Image/Success.gif'>&nbsp;&nbsp;&nbsp;修改成功！！！<br><br><br>")
					   Response.write("<div align='left'>网站名称："&WebName&"</div><br><br>")
					   Response.write("<div align='left'>网站网址："&WebUrl&"</div><br><br>")
				       Response.write("<div align='left'>开始日期："&StartDate&"</div><br><br>")
                       If PswMod=1 Then
					      Response.write("<div align='left'>新的密码："&NewPsw&"</div><br><br>")
					   End If
                    Else
					  Response.write("<br><br><img src='Image/Failure.gif'>&nbsp;&nbsp;&nbsp;修改失败！！！<br><br>")
					  If WebName="" Then Response.write("请输入网站名称.<br><br>")
                      If WebUrl="" Then Response.write("请输入网站网址.<br><br>")
					  If Flag=2 Then Response.write("请重新输入系统密码。<br><br>")
					     Response.write(" <a href='javascript:history.back();'>返回上页</a><br><br><br>")
					End If
					%> </td>
                </tr>
              </table>            </td>
          </tr>
		  <%
		  End if
          If Action="统计重置" Then
		  %>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="4" align=left bgcolor="#CCCCCC"> 
              <table width="40%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr valign="middle" align="center"> 
                  <td colspan="3"> 
				  <% If Restart=1 Then
				       Response.write("<br><br> <img src='Image/Success.gif'>&nbsp;&nbsp;&nbsp;统计重置成功！！！<br><br><br>")
				  	   Response.write("<div align='left'>网站名称："&WebName&"</div><br><br>")
					   Response.write("<div align='left'>网站网址："&WebUrl&"</div><br><br>")
				       Response.write("<div align='left'>开始日期："&StartDate&"</div><br><br>")
					 Else
					   Response.write("<br><br><img src='Image/Failure.gif'>&nbsp;&nbsp;&nbsp;重置失败！！！<br><br>")
					   Response.write("请重新输入密码。<br><br>")
					   Response.write(" <a href='javascript:history.back();'>返回上页</a><br><br><br>")
					 End If


                 %> 
                  </td>
                </tr>
              </table>            </td>
          </tr>

		  <%End If%>
          <tr align="right"> 
            <td colspan=4 bgcolor="#DFF4FF"> 
              <p>　</p>            </td>
          </tr>
          </tbody> 
        </table>
      </td>
    </tr>
    </tbody> 
  </table>
</CENTER>
</BODY>
</HTML>
