%
server.Execute "/NoHACK1.asp"
dim sql, rs, i, PlayTop(6)
dim ToPage, NowPage, Ipage, Hp
dim PlayServerID, Day1, ServerList(), Day2
PlayServerID = ReqNum(Request("SID"))
Day1 = Request("Day1")
'----初值
if PlayServerID = "" then PlayServerID = "1"
Day1=Request("Day1")
if Day1 = "" then
Day1 = CStr(DatePart("yyyy",now())) & "/" & Right("0" & CStr(DatePart("m",now())),2)
else
Day2= split(Day1,"/")
for i = 0 to ubound(Day2)
ReqNum(Day2(i))
next
Day1 = Day2(0) & "/" & Right("0" & Day2(1),2)
end if
'----撈出現有已開放Server
sql = "select ServerID from TOP_NowServer where ServerOP='Y' order by autoid"
Set rs = GetRecordset( sql )
if not(rs.BOF and rs.EOF) then
Redim ServerList(rs.recordcount)
for i = 1 to UBound(ServerList)
ServerList(i) = rs(0).value
rs.movenext
next
end if
rs.close
set rs = nothing
'----撈人氣最高的資料置入PlayTop array
sql = "SELECT top 1 * from ST_Portrait where G_Playserver='" & ServerList(PlayServerID) & "' and G_Op='Y' order by G_Count desc"
set rs = GetRecordset(sql)
if not(rs.BOF and rs.EOF) then
PlayTop(1) = CStr(rs("AutoID"))
PlayTop(2) = rs("G_Pic")
PlayTop(3) = rs("G_Playname")
PlayTop(4) = rs("G_Playserver")
PlayTop(5) = CStr(rs("G_Count"))
PlayTop(6) = rs("G_Ex")
else
for i = 1 to 6
PlayTop(i) = ""
next
end if
rs.close : set rs = nothing
'----撈全部
sql = "SELECT * from ST_Portrait where convert(char(7),AddTime,111)='" & Day1 & "' and G_Playserver='" & ServerList(PlayServerID) & "' and G_Op='Y' order by AddTime desc , AutoID desc"
set rs = GetRecordset(sql)
Hp = "portrait.asp"
rs.PageSize = 3
'----分頁處理
ToPage = ReqNum(request.QueryString("ToPage"))
if ToPage = "" then
NowPage = 1
else
NowPage = CInt(ToPage)
end if
if NowPage > rs.PageCount then
NowPage = rs.PageCount
elseif NowPage < 1 then
NowPage = 1
end if
if not (rs.bof and rs.eof) then rs.AbsolutePage = NowPage
%>
<%
dim p, O, R, Q, S
IF ToPage = empty or ToPage = "" Then
P = 1
else
P = Cint(ToPage)
End If
O = P + 5
R = O + 1
Q = P - 5
S = Q - 1
If O > rs.PageCount Then O = rs.PageCount
If R > rs.PageCount Then R = rs.PageCount
If Q < 1 Then Q = 1
If S < 1 Then S = 1
%>