📄 default.asp
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="home1.asp"-->
<!--#include file="inc/part_1.asp"-->
<script language="JavaScript">
<!--
function checkinput()
{
if (document.search.keyword.value=="")
{
alert("请输入想查询的内容!");
document.search.keyword.focus();
return false;
}
return true;
}
-->
</script>
<%
dim rs
MaxPerPage=rs("zu")
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
dim keyword
dim sql
if isempty(request("youid")) or request("youid")="" then
addtion=""
else
addtion="&youid=" & request("youid")
end if
keyword=trim(request("keyword"))
typename=request.Querystring("typename")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<!--#include file="home.asp"-->
<!--#include file="inc/part_2.asp"-->
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<%
sql="select * from type where type like '%"&keyword&"%' order by typeid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='type'> 还 没 有 任 何 贺 卡 分 类</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"Default.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"Default.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"Default.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<%do while not rs.eof%>
<tr>
<td width="20%"><a href="index.asp?typeid=<%=rs("typeid")&addtion%>"><img border="0" src="<%=rs("logo")%>"></a></td>
<td width="30%"><%=rs("jian")%></td>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
if rs.eof then exit do
%>
<td width="20%"><a href="index.asp?typeid=<%=rs("typeid")&addtion%>"><img border="0" src="<%=rs("logo")%>"></a></td>
<td width="30%"><%=rs("jian")%></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table><br>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td height="1" background="../images/hline.gif"></td></tr>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table width=100% height=30 cellspacing=0 cellpadding=0 border=0><tr><td>"
if CurrentPage<2 then
response.write "上一页 "
else
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)
response.write ">下一页</a>"
end if
response.write "</td><td align=right>页次: <font color=red><b>"&CurrentPage&"</b></font> / <font color=red><b>"&n&"</b></font> 页"
response.write " 共 <font color=red><b>"&totalnumber&"</b></font> 个分类</td></tr></table>"
end function
%>
</td>
</tr>
</table>
<!--#include file="inc/part_3.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -