-
<%
Function RegExp_Execute(patrn, strng)
Dim regEx, Match, Matches,values '建立变量。
Set regEx = New RegExp '建立正则表达式。
regEx.Pattern = patrn '设置模式。
regEx.IgnoreCase = true '设置是否区分字符大小写。
regEx.Global = True '设置全局可用性。
Set Matches = regEx.Execute(strng) '执行搜索。
For Each Match in Matches '遍历匹配集合。
values=values&Match.Value&","
Next
RegExp_Execute = values
End Function
function nohtml(str)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\<.[^\<]*\>)"
str=re.replace(str,"")
re.Pattern="(\<\/[^\<]*\>)"
str=re.replace(str,"")
re.Pattern="( )"
str=re.replace(str,"")
nohtml=str
set re=nothing
end function
Set rs = Server.CreateObject("ADODB.Recordset")
maxannounce=15
if not isempty(request("page")) then
currentpage=cint(request("page"))
else
currentpage=1
end if
if request.QueryString("sortid")="" then
sql="select * from pro order by id desc"
else
if request.QueryString("classid")="" then
sql="select * from pro where sortid="&request.QueryString("sortid")&" order by id desc"
else
sql="select * from pro where sortid="&request.QueryString("sortid")&" and classid="&request.QueryString("classid")&" order by id desc"
end if
end if
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
totalannounce=rs.recordcount
if currentpage<>1 then
if (currentpage-1)*maxannounce
- " target="_blank">
<%if b="" then%>
No Preview Pic
<%else%>
"><%end if%>
<%=rs("title")%>
<% Rs.movenext
j=j+1
loop
'end if%>
总共:<%=totalAnnounce%>,页数:<%=currentpage%>/<%=n%>
[
<%if currentpage>1 then%>
&classid=<%=request.querystring("classid")%>&page=1" class="a1">
<%end if%>
首页
<%if currentpage>1 then%>
<%end if%>
] [
<%if currentpage>1 then%>
&classid=<%=request.querystring("classid")%>&page=<%=currentpage-1%>" class="a1">
<%end if%>
上一页
<%if currentpage>1 then%>
<%end if%>
] [
<%if n-currentpage>0 then%>
&classid=<%=request.querystring("classid")%>&page=<%=currentpage+1%>" class="a1">
<%end if%>
下一页
<%if n-currentpage>0 then%>
<%end if%>
] [
<%if n-currentpage>0 then%>
&classid=<%=request.querystring("classid")%>&page=<%=n%>" class="a1">
<%end if%>
尾页
<%if n-currentpage>0 then%>
<%end if%>
]



