首页|操作系统|软件开发|网页制作|媒体动画|数据库|ASP教程|ASP.NET教程|PHP教程|JSP教程|XML教程|建站资料|软件学院|行业资讯|平面设计|网络安全|晒IT论坛|IT人才
  位置: 晒IT >> ASP教程 >> ASP实例教程 >> 正文
 
 
ASP进阶之文章在线管理更新(10)
ASP进阶之文章在线管理更新(10)
 
 

           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>&nbsp;"
  if CurrentPage<2 then
    response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  else
    response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "<font color='#000080'>下一页 尾页</font>"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
  • 上一篇: ASP进阶之文章在线管理更新(11)
  • 下一篇: ASP进阶之文章在线管理更新(9)
  •  告诉好友  打印此文 关闭窗口 返回顶部
     
    热点文章
     
     
    推荐文章
     
     
    相关文章

    | 设为首页 | 加入收藏 | 联系我们 | 友情链接 | 诚聘英才 |
    Copyright© 2008 ShaiIT.Com .All Rights Reserved
    下载alexa工具,提升您的网站排名