|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用cdonts,可以发送、查看邮件,实现webmail的功能。结合wsh,可以实现对nt主机的管理,如nt用户管理、iis虚拟主机设置、exchange邮箱设置等等,就像管理本地机一样方便。模块化分页
1.查询语句块
<%
获得以后文件名
temp=Split(request.ServerVariables("URL"),"/")
fy=temp(UBound(temp))
setrs=server.createobject("adodb.recordset")
ifnotisempty(request("page"))then
pagecount=cint(request("page"))
else
pagecount=1
endif
sql="select查询语句"
rs.opensql,conn,1,1
rs.pagesize=10分页纪录数
ifpagecount>rs.pagecountorpagecount<=0then
pagecount=1
endif
ifrs.eofandrs.bofthen%>
<divalign="center"class="001"><br>
对不起,没有切合搜刮前提的纪录!<br>
</div>
2.显现纪录块
<%
else
rs.AbsolutePage=pagecount
dowhilenotrs.eof%>
显现的纪录
<%i=i+2
rs.movenext
ifi>=rs.PageSizethenexitdo
loop
www.ckuyun.com
%>
3.
分页效果
<tablewidth="778"border="0"align="center"cellpadding="0"cellspacing="0">
<tralign="center">
<%ifrs.pagecount=1then%>
<tdheight="35"colspan="4"class=001><fontcolor="#000000">共有[<fontcolor="#ff0000"><%=rs.recordcount%></font>]条信息以后显现第<fontcolor="red">1~<%=rs.recordcount%></font>条</font></td>
</tr>
<tr>
<%else%>
<tdwidth="19%"height="35"align="center"valign="middle"class=001><fontcolor="#000000">
<%page_start=(pagecount-1)*rs.pagesize
ifpagecount=1thenpage_start=1
page_end=rs.pagesize*pagecount
ifpagecount*rs.pagesize=>rs.recordcountthenpage_end=rs.recordcountendif%>
共有[<fontcolor="#ff0000"><%=rs.recordcount%></font>]信息</font></td>
<tdwidth="58%"height="30"align="center"class="fy"><fontcolor="#000000">
<%
ifpagecount>5andpagecount<rs.PageCount-5andrs.pagecount>10then
qizu=pagecount-4
min=pagecount+5
response.write"<ahref="&source&"?page=1&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>首页</font></a>"
response.write"<ahref="&source&"?page="+cstr(pagecount-1)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>上一页</font></a>"
foripage=qizutomin
ifipagepagecountthen
response.write"<ahref="&source&"?page="+cstr(ipage)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&cityid="&cityid&"><fontcolor=0000BE>"+cstr(ipage)+"</font></a>"
else
response.write"<fontcolor=#FF0000>"&ipage&"</font>"
endif
next
response.write"<ahref="&source&"?page="+cstr(pagecount+1)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>下一页</font></a>"
response.write"<ahref="&source&"?page="+cstr(rs.PageCount)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>尾页</font></a>"
endif
ifrs.PageCount<11then
foripage=1tors.PageCount
ifipagepagecountthen
response.write"<ahref="&source&"?page="+cstr(ipage)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&cityid="&cityid&"><fontcolor=0000BE>"+cstr(ipage)+"</font></a>"
else
response.write"<fontcolor=#FF0000>"&ipage&"</font>"
endif
next
endif
ifpagecount<6andrs.PageCount>10then
foripage=1to10
ifipagepagecountthen
response.write"<ahref="&source&"?page="+cstr(ipage)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&cityid="&cityid&"><fontcolor=0000BE>"+cstr(ipage)+"</font></a>"
else
response.write"<fontcolor=#FF0000>"&ipage&"</font>"
endif
next
response.write"<ahref="&source&"?page="+cstr(rs.PageCount)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>尾页</font></a>"
endif
ifpagecount>rs.PageCount-6andrs.PageCount>10then
response.write"<ahref="&source&"?page=1&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&title="&title&"&cityid="&cityid&">
<fontcolor=0000BE>首页</font></a>"
foripage=rs.PageCount-9tors.PageCount
ifipagepagecountthen
response.write"<ahref="&source&"?page="+cstr(ipage)+"&sortid="&sortid&"&typeid="&typeid&"&qylb="&qylb&"&cityid="&cityid&"><fontcolor=0000BE>"+cstr(ipage)+"</font></a>"
else
response.write"<fontcolor=#FF0000>"&ipage&"</font>"
endif
next
endif
%>
</font></td><formname=go2toformmethod=Postaction=<%=fy%>>
<tdwidth="13%"align="center"valign="middle"class="fy">
<inputtype=hiddenname=sortidvalue="<%=sortid%>"><inputtype=hiddenname=typeidvalue="<%=typeid%>"><inputtype=hiddenname=qylbvalue="<%=qylb%>"><inputtype=hiddenname=titlevalue="<%title%>"><inputtype=hiddenname=cityidvalue="<%=cityid%>"><fontcolor=000064>转到第<inputtype=textname=pagesize=2maxLength=3>
页</font>
</td>
<tdwidth="10%"align="center"valign="middle"class="fy"><inputname="image"type=imageonClick=check()value=确定src=http://edu.cnzz.cn/images/button_h.jpg></td>
</form>
<tr>
<tdheight="20"colspan="6"valign="bottom"><fontcolor="#000000"></font></td>
</tr>
<%endif%>
<%endif%>
</table>
asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关. |
|