<!-- #include file="ConnStatData.asp" -->
<!-- #Include File="CheckAdmin.asp"-->
<%
Action=Request.Form("Rereg")
WebName=Request.Form("WebName")
WebUrl=Request.Form("WebUrl")
PassWord=Request.Form("PassWord")
Select Case Action
Case "更改信息":
     Flag=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")
        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="../admin/images/admin.css">
</HEAD>
<%
if Instr(session("AdminPurview"),"|40,")=0 then 
    response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限！</font></div>")
  response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<div align="center">
  <table width="95%" border="0" align="center" cellpadding="3" cellspacing="1"  class="tableborder">
      <tr>
        <th colspan="8">网站流量统计：包括年，月，日，IP，浏览器类型等非常详细的分析报表</th>
      </tr>
      <tr>
        <td align="center" class="forumrow"><a href="Infolist.asp">统计概况</a></td>
        <td align="center" class="forumrow"><a href="FVisitor.asp">最近访问</a></td>
        <td align="center" class="forumrow"><a href="StatYear.asp">年 报 表</a></td>
        <td align="center" class="forumrow"><a href="StatMonth.asp">月 报 表</a></td>
        <td align="center" class="forumrow"><a href="StatWeek.asp">周 报 表</a></td>
        <td align="center" class="forumrow"><a href="StatDay.asp">日 报 表</a></td>
        <td align="center" class="forumrow"><a href="History.asp">历史报表</a></td>
        <td align="center" class="forumrow"><a href="Rereg.asp">修改信息</a></td>
      </tr>
      <tr>
        <td align="center" class="forumrow"><a href="FArea.asp">地区分析</a></td>
        <td align="center" class="forumrow"><a href="FAddress.asp">地址分析</a></td>
        <td align="center" class="forumrow"><a href="FIptwo.asp">IP 地 址</a></td>
        <td align="center" class="forumrow"><a href="Fweburl.asp">链接页面</a></td>
        <td align="center" class="forumrow"><a href="FCounter.asp">访问次数</a></td>
        <td align="center" class="forumrow"><a href="FSystem.asp">操作系统</a></td>
        <td align="center" class="forumrow"><a href="FBrowser.asp">浏 览 器</a></td>
        <td align="center" class="forumrow"><a href="FScreen.asp">屏幕大小</a></td>
      </tr>
  </table>
  <br>
  <table width="95%" border=0 align="center" cellpadding=3 cellspacing=1 class="tableborder" >
    <tbody>
      <tr>
        <th>修改网站信息或统计清零</th>
      </tr>

      <%
		  If Action="更改信息" Then
		  %>
      <tr bgcolor="#FFFFFF">
        <td align=left class="forumrow"><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><div align='left'>操作状态：<img src='Images/Success.gif' align='absmiddle'>&nbsp;修改成功</div><br>")
					   Response.write("<div align='left'>网站名称："&WebName&"</div><br>")
					   Response.write("<div align='left'>网站网址："&WebUrl&"</div><br>")
				       Response.write("<div align='left'>开始日期："&StartDate&"</div><br>")
					   Response.write("<div align='left'>继续操作：<a href='Rereg.asp'>返回查看</a></div><br>")				   
                    Else
					   Response.write("<br><br><div align='left'>操作状态：<img src='Images/Failure.gif' align='absmiddle'>&nbsp;修改失败</div><br>")
					   If WebName="" Then Response.write("<div align='left'>网站名称：未输入</div><br>")
                       If WebUrl="" Then Response.write("<div align='left'>网站网址：未输入</div><br>")
					   If Flag=2 Then Response.write("<div align='left'>确 认 码：不正确或未输入</div><br>")
					   Response.write("<div align='left'>继续操作：<a href='javascript:history.back();'>返回重新输入</a></div><br>")
					End If
					%>              </td>
            </tr>
        </table></td>
      </tr>
      <%
		  End if
          If Action="统计重置" Then
		  %>
      <tr bgcolor="#FFFFFF">
        <td align=left class="forumrow"><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><div align='left'>操作状态：<img src='Images/Success.gif' align='absmiddle'>&nbsp;统计重置成功</div><br>")
					   Response.write("<div align='left'>网站名称："&WebName&"</div><br>")
					   Response.write("<div align='left'>网站网址："&WebUrl&"</div><br>")
				       Response.write("<div align='left'>开始日期："&StartDate&"</div><br>")
					   Response.write("<div align='left'>继续操作：<a href='Rereg.asp'>返回查看</a></div><br>")
					 Else
					   Response.write("<br><br><div align='left'>操作状态：<img src='Images/Failure.gif' align='absmiddle'>&nbsp;统计重置失败</div><br>")
					   Response.write("<div align='left'>确 认 码：不正确或未输入</div><br>")
					   Response.write("<div align='left'>继续操作：<a href='javascript:history.back();'>返回重新输入</a></div><br>")
					 End If


                 %>              </td>
            </tr>
        </table></td>
      </tr>
      <%End If%>
    </tbody>
  </table>
  <br>
</div>
</BODY>
</HTML>