<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connzd.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("PUsername") <> "") then
Recordset1__MMColParam = Request.QueryString("PUsername")
End If
%>
<%
if(Request.QueryString("PUsername") <> "") then
Command2__MMColParam = Request.QueryString("PUsername")
%>
<%
if(Request.QueryString("PUsername") <> "") then
Command1__MMColParam = Request.QueryString("PUsername")
if(Request.ServerVariables("REMOTE_ADDR") <> "") then
Command1__USR_IP = Request.ServerVariables("REMOTE_ADDR")
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_connzd_STRING
Recordset1_cmd.CommandText = "SELECT * FROM PUser WHERE PUsername = ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 50, Recordset1__MMColParam) ' adVarChar
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_connzd_STRING
Command2.CommandText = "UPDATE PUser SET Phit =Phit+1 WHERE PUsername = '" + Replace(Command2__MMColParam, "'", "''") + "' "
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_connzd_STRING
Command1.CommandText = "INSERT INTO countip (PUsername, PIP) VALUES ('" + Replace(Command1__MMColParam, "'", "''") + "','" + Replace(Command1__USR_IP, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
Dim Recordset3__MMColParam
Recordset3__MMColParam = "1"
If (Request.QueryString("PUsername") <> "") then
Recordset3__MMColParam = Request.QueryString("PUsername")
End If
%>
<%
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_connzd_STRING
Recordset3.Source = "SELECT * FROM countip WHERE PUsername = '" + Replace(Recordset3__MMColParam, "'", "''") + "' AND Ptime=date()-1"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
Recordset3_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request.QueryString("PUsername") <> "") then
Recordset2__MMColParam = Request.QueryString("PUsername")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_connzd_STRING
Recordset2.Source = "SELECT * FROM countip WHERE PUsername = '" + Replace(Recordset2__MMColParam, "'", "''") + "' AND Ptime=date()"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset3_total
Dim Recordset3_first
Dim Recordset3_last
' set the record count
Recordset3_total = Recordset3.RecordCount
' set the number of rows displayed on this page
If (Recordset3_numRows < 0) then
Recordset3_numRows = Recordset3_total
else
if (Recordset3_numRows = 0) then
Recordset3_numRows = 1
End If
' set the first and last displayed record
Recordset3_first = 1
Recordset3_last = Recordset3_first + Recordset3_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset3_total <> -1) then
If (Recordset3_first > Recordset3_total) then
Recordset3_first = Recordset3_total
End If
If (Recordset3_last > Recordset3_total) then
Recordset3_last = Recordset3_total
End If
If (Recordset3_numRows > Recordset3_total) then
Recordset3_numRows = Recordset3_total
End If
End If
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset2_total
Dim Recordset2_first
Dim Recordset2_last
' set the record count
Recordset2_total = Recordset2.RecordCount
' set the number of rows displayed on this page
If (Recordset2_numRows < 0) then
Recordset2_numRows = Recordset2_total
else
if (Recordset2_numRows = 0) then
Recordset2_numRows = 1
End If
' set the first and last displayed record
Recordset2_first = 1
Recordset2_last = Recordset2_first + Recordset2_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset2_total <> -1) then
If (Recordset2_first > Recordset2_total) then
Recordset2_first = Recordset2_total
End If
If (Recordset2_last > Recordset2_total) then
Recordset2_last = Recordset2_total
End If
If (Recordset2_numRows > Recordset2_total) then
Recordset2_numRows = Recordset2_total
End If
End If
%>
<%
' *** Recordset Stats: if wedo
n't know the record count, manually count them
If (Recordset2_total = -1) then
' count the total records by iterating through the recordset
Recordset2_total=0
While (Not Recordset2.EOF)
Recordset2_total = Recordset2_total + 1
Recordset2.MoveNext
Wend
' reset the cursor to the begin
ning
If (Recordset2.CursorType > 0) then
Recordset2.MoveFirst
else
Recordset2.Requery
End If
' set the number of rows displayed on this page
If (Recordset2_numRows < 0 Or Recordset2_numRows > Recordset2_total) then
Recordset2_numRows = Recordset2_total
End If
' set the first and last displayed record
Recordset2_first = 1
Recordset2_last = Recordset2_first + Recordset2_numRows - 1
If (Recordset2_first > Recordset2_total) then
Recordset2_first = Recordset2_total
End If
If (Recordset2_last > Recordset2_total) then
Recordset2_last = Recordset2_total
End If
End If
%>
<%
' *** Recordset Stats: if wedo
n't know the record count, manually count them
If (Recordset3_total = -1) then
' count the total records by iterating through the recordset
Recordset3_total=0
While (Not Recordset3.EOF)
Recordset3_total = Recordset3_total + 1
Recordset3.MoveNext
Wend
' reset the cursor to the begin
ning
If (Recordset3.CursorType > 0) then
Recordset3.MoveFirst
else
Recordset3.Requery
End If
' set the number of rows displayed on this page
If (Recordset3_numRows < 0 Or Recordset3_numRows > Recordset3_total) then
Recordset3_numRows = Recordset3_total
End If
' set the first and last displayed record
Recordset3_first = 1
Recordset3_last = Recordset3_first + Recordset3_numRows - 1
If (Recordset3_first > Recordset3_total) then
Recordset3_first = Recordset3_total
End If
If (Recordset3_last > Recordset3_total) then
Recordset3_last = Recordset3_total
End If
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style9 {font-size: 10px}
.style11 {color: #CC6600;
font-family: "迷你简娃娃篆";
font-size: 14px;
}
body,td,th {
font-family: 迷你简娃娃篆;
font-size: 14px;
color: #FF6600;
}
.abc {
font-family: "迷你简娃娃篆";
font-size: 14px;
color: #FF3300;
text-decoration: blink;
border-top-color: #FF6600;
border-right-color: #FF6600;
border-bottom-color: #FF6600;
border-left-color: #FF6600;
}
-->
</style>
</head>
<body>
<% If Not Recordset1.EOF Or Not Recordset1.BOF then
%>
<table width="150" height="170" border="0" cellspacing="0">
<tr>
<td>
<td align="right" valign="bottom" background="images/<%=(Recordset1.Fields.Item("PStyle").Value)%>" ><br>
今天浏览<br>
<%=(Recordset2_total)%><br>
昨天浏览<br>
<%=(Recordset3_total)%><br>
总浏览<br>
<%=(Recordset1.Fields.Item("Phit").Value)%></td>
</tr>
</table>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>