谁知道ASP这代码什么意思

来源:百度知道 编辑:UC知道 时间:2024/05/12 16:13:27
<%
dim page
page=cint(request("page"))
PerPageSize = News_PerPageSize

if page="" or clng(page)<1 then
page=1
end if

if trim(request("id"))="" then
sql="select * from news where articlelanguage=1 and dtitleid=43 order by articleid desc"
else
sql="select * from news where articlelanguage=1 and dtitleid="&trim(request("id"))&" order by articleid desc"
end if

aa=trim(request("id"))

set rd=server.CreateObject("adodb.recordset")
rd.open sql,conn,1,1
rd.PageSize = PerPageSize
totalfilm=rd.recordcount
pgnum=rd.Pagecount

if clng(page) > pgnum then
page=pgnum
end if

if pgnum>0 then
rd.AbsolutePage=page
end if

if aa=""

<%
dim page
page=cint(request("page"))
PerPageSize = News_PerPageSize
'接收变量
if page="" or clng(page)<1 then
page=1
end if
'如接收为空或不合法把变量设置1
if trim(request("id"))="" then
sql="select * from news where articlelanguage=1 and dtitleid=43 order by articleid desc"
'如接收到的ID号为空SQL命令为上行
else
sql="select * from news where articlelanguage=1 and dtitleid="&trim(request("id"))&" order by articleid desc"
''如接收到的ID号不为空SQL命令是上行的
end if

aa=trim(request("id"))

set rd=server.CreateObject("adodb.recordset")
rd.open sql,conn,1,1 '执行上面的SQL命令
rd.PageSize = PerPageSize
'设置一页记录数量
totalfilm=rd.recordcount
pgnum=rd.Pagecount

if clng(page) > pgnum then
page=pgnum
end if

if pgnum>0 then
rd.Absolut