%
Dim Page
Dim PageSize
Dim AbsolutePosition
dim cid,fromname
PageSize = 5
set conn = GetSQLServerConnection()
cid = request("cid")
if cid <> "" then
set rs = GetSQLServerRecordset(conn, "select * from ValentineMsgBoard where cid="&cid)
if ( rs.recordcount > 0 ) then
fromname = rs("fromname")
end if
end if
SQL = "Select * from ValentineMsgBoard order by PostDate desc"
set rs = GetSQLServerRecordset(conn, SQL)
rs.PageSize = PageSize
If Request("Page") = "" or CInt(Request("Page")) < 1 then
Page = 1
AbsolutePosition = 1
ElseIf CInt(Request("Page")) > rs.PageCount then
Page = rs.PageCount
AbsolutePosition = ((Page-1) * 5) + 1
Else
Page = Request("Page")
AbsolutePosition = ((Page-1) * 5) + 1
End If
%>
YOUTH-ONLINE.COM [Teen天情人節]
<% Function Formatnumber(num)
If clng(num) < 10 Then
FormatNumber = "00" & num
Elseif clng(num) < 100 then
FormatNumber = "0" & num
else
FormatNumber = num
End If
End Function
%>