天枫常用的ASP函数封装如下(16)
constellation="<img src=images/Constellation/d.gif title='天秤座 Libra'>"
elseif MyConstellation < 1122 then
constellation="<img src=images/Constellation/e.gif title='天蝎座 Scorpio'>"
elseif MyConstellation < 1222 then
constellation="<img src=images/Constellation/f.gif title='射手座 Sagittarius'>"
elseif MyConstellation > 1221 then
constellation="<img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
end if
end if
End Function
'=================================================
'函数名:autopage
'作 用:长文章自动分页
'参 数:id,content,urlact
'=================================================
Function AutoPage(content,paramater,pagevar)
contentStr=split(content,pagevar)
pagesize=ubound(contentStr)
if pagesize>0 then
If Int(Request("page"))="" or Int(Request("page"))=0 Then
pageNum=1
Else
pageNum=Request("page")
End if
if pageNum-1<=pagesize then
AutoPage=AutoPage&contentStr(pageNum-1)
AutoPage=AutoPage&"<div style=""margin-top:10px;text-align:right;padding-right:15px;""><font color=blue>页码:</font><font color=red>"
For i=0 to pagesize
if i=pageNum-1 then
AutoPage=AutoPage&"[<font color=red>"&i+1&"</font>] "
else
if instr(paramater,"?")>0 then
AutoPage=AutoPage&"<a href="""¶mater&"&page="&i+1&""">["&(i+1)&"]</a>"
else
AutoPage=AutoPage&"<a href="""¶mater&"?page="&i+1&""">["&(i+1)&"]</a>"
end if
end if
Next
AutoPage=AutoPage&"</font></div>"
else
AutoPage=AutoPage&"非法操作!页号超出!<a href=javascript:history.back(-1)><u>返回</u></a>"
内容版权声明:除非注明,否则皆为本站原创文章。