|
showpage totalput,MaxPerPage,"manage.asp" showContent showpage totalput,MaxPerPage,"manage.asp" else currentPage=1 showpage totalput,MaxPerPage,"manage.asp" showContent showpage totalput,MaxPerPage,"manage.asp" end if end if rs.close end if set rs=nothing conn.close set conn=nothing
sub showContent dim i i=0
%> <div align="center"><center><table border="1" cellspacing="0" width="589" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0"> <tr> <td width="46" align="center" bgcolor="#D0D0D0" height="20"><strong>ID号</strong></td> <td width="400" align="center" bgcolor="#D0D0D0"><strong>文章标题</strong></td> <td width="69" align="center" bgcolor="#D0D0D0"><strong>修改</strong></td> <td width="68" align="center" bgcolor="#D0D0D0"><strong>删除</strong></td> </tr> <%do while not rs.eof%> <tr> <td height="23" width="46"><p align="center"><%=rs("articleid")%></td> <td width="400"><p align="center"><a href="javascript:popwin2(<%=rs("articleid")%>)"><%=rs("title")%></a></td>
"显示与修改删除的相关连接,具体程序在后面章节将有介绍 <td width="69"><p align="center"><a href="edit.asp?id=<%=rs("articleid")%>">修改</a></td> <td width="68"><p align="center"><a href="delete.asp?id=<%=rs("articleid")%>">删除</a></td> </tr> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %> </table> </center></div><% 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 "<form method=Post action="&filename&"?typeid="&typeid&">"
"显示增加文章相关连接,关于添加文章在本专题的第一、二节有介绍 response.write "<p align='center'><a href='addarticle.asp?typeid="&typeid&"'><font color='red'>增加文章</font></a> " if CurrentPage<2 then response.write "<font color='#000080'>首页 上一页</font> " else response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a> " response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a> " end if if n-currentpage<1 then response.write "<font color='#000080'>下一页 尾页</font>" else response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
|