<% 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()
%>
<html>
<head>
<title>访问者地区统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<link href="../../CSS/css.css" rel="stylesheet">
<script src="../JS/PublicJS.js" language="JavaScript"></script>
<body bgcolor="#FFFFFF">
<p align="center"><strong>访问者地区统计</strong></p>
<%
Dim RsAreaObj,Sql
Set RsAreaObj = Server.CreateObject("ADODB.RecordSet")
Sql="Select Area From FlowStatistic"
RsAreaObj.Open Sql,Conn,3,3
Dim AreaType
Dim NumIn,NumOut,NumOther
NumIn=0
NumOut=0
NumOther=0
Do While not RsAreaObj.Eof
	AreaType= RsAreaObj("Area")
	Select Case AreaType
	Case "局域网内部网"
		NumIn=NumIn+1
	Case "未知区域"
		NumOther=NumOther+1
	Case Else
		NumOut=NumOut+1
	End Select
	RsAreaObj.MoveNext
Loop
%>
<%
Dim AllNum
AllNum=NumIn+NumOut+NumOther
%>
<table width=96% border=0 cellpadding=2>
	<tr>
		<td align=center>访问者地区统计图表</td>
	</tr>
	<tr>
		<td align=center>
			<table align=center>
				<tr valign=bottom >
					<td nowap>内部网</td>
					<td align=left background=../images/tu_back_2.gif valign=middle width=150><img src=../images/bar2.gif width="
					<% if AllNum<>0 then
						response.Write(150*NumIn/AllNum)
						else
						Response.Write(0)
						end if
					%>
					" height=15></td>
					<td nowap><% =NumIn %></td>
				</tr>
				<tr valign=bottom >
					<td nowap>外部网</td>
					<td align=left background=../images/tu_back_2.gif valign=middle width=150><img src=../images/bar2.gif width="
					<% if AllNum<>0 then
						Response.Write(150*NumOut/AllNum)
						else
						Response.Write(0)
						end if
					 %>
					" height=15></td>
					<td nowap><% =NumOut %></td>
				</tr>
				<tr valign=bottom >
					<td align="right" nowap>未知</td>
					<td align=left background=../images/tu_back_2.gif valign=middle width=150><img src=../images/bar2.gif width="
					<% if AllNum<>0 then
					    response.Write(150*NumOther/AllNum)
						else
						Response.Write(0)
						end if
					 %>
					" height=15></td>
					<td nowap><% =NumOther %></td>
				</tr>
				<tr valign=cente>
					<td align=right nowap>共</td>
					<td align=left background=../images/tu_back_2.gif valign=middle width=150><img src=../images/bar2.gif width="150" height=15></td>
					<td nowap><% = AllNum %></td>
			</table><br>
		</td>
	</tr>
</table>