<%
sql="select * from learning where title like '%"&keyword&"%' and typeid="+cstr(typeid)+" order by articleid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write " 沒有或沒有找到任何文章 "
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
showpage totalput,MaxPerPage,"index.asp"
showContent
showpage totalput,MaxPerPage,"index.asp"
else
if (currentPage-1)*MaxPerPage
職 位 名 稱 |
發布日期 |
點擊 |
<%do while not rs.eof%>
)" class="heizi"><%=rs("title")%> |
<%=rs("dateandtime")%> |
<%=rs("hits")%> |
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<%
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
end function
%> |
|
|