⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_address.asp

📁 还是同学录 功能较为的简单点 挺好用的
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin_error.asp"-->
<!--#include file="md5.asp"-->
<title><%=sitename%>-后台管理</title>
<%
  if master="" then
      errinfo="<li>管理员没有登陆,请先 <a href='admin_login.asp'>登陆</a><br>"
      call errweb()
  else
%>
  <table width="<%=width%>" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="20%" align="center" valign="top"><%call menu()%></td>
      <td width="80%" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%" height="25">显示:<a href="?order=1">降序</a> <a href="?order=2">升序</a></td>
  </tr>
  <tr>
    <td width="100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="25%" align="center" height="25">联系人</td>
    <td width="25%" align="center" height="25">所属用户</td>
    <td width="35%" align="center" height="25">添加时间</td>
    <td width="15%" align="center" height="25">点击</td>
  </tr>
<%
  dim sql,i,totaluser,page,pages,order,orderlist
  order=request("order")
  select case order
  case "","1"
      orderlist=" order by id desc "
  case "2"
      orderlist=" order by id asc "
  end select
  set rs= Server.CreateObject("ADODB.Recordset")
  sql="select id,user,name,addtime,hits from address_list "&orderlist&""
  rs.open sql,conn,1,1
  if rs.eof and rs.bof then
      page=1
      pages=1
      totaluser=0
      response.write"<tr><td colspan='4'>数据库中没有联系人</td></tr>"
  else
      totaluser=rs.recordcount         '总的联系人数
      rs.pagesize=50                   '每页显示的条数
      pages=rs.pagecount               '总的找到页数
      page=request("page")             '当前页
      if page="" then
          page=1
      elseif page<1 then
          page=1
      end if
      page=cint(page)
      if page>pages then page=pages
      rs.absolutepage=page


      do while not rs.eof and i<rs.pagesize
          i=i+1
%>
  <tr>
    <td width="25%" align="center" height="25"><%=rs("name")%></td>
    <td width="25%" align="center" height="25"><%=rs("user")%></td>
    <td width="35%" align="center" height="25"><%=rs("addtime")%></td>
    <td width="15%" align="center" height="25"><%=rs("hits")%></td>
  </tr>
<%
          rs.movenext
      loop
  end if
  set rs=nothing
%>
</table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="25">
<%
  if pages>1 then
      response.write"<table align='center' cellspacing='0' cellpadding='0' border='0' width='100%'>"&_
                    "<form method='POST' action='?order="&order&"'><tr><td height='20' width='50%'>共<font color='red'>"&totaluser&"</font>人 <font color='red'>"&pages&"</font>页 第<font color='red'>"&page&"</font>页 "
      response.write" <input type='text' name='page' size='5' maxlength='4'> <input type='submit' value='GO' name='B1'></td></form><td align='right' width='50%' height='20'>"
      if page>1 then
          response.write"<a href='?order="&order&"&page=1'>首页</a> "&_
                        "<a href='?order="&order&"&page="&page-1&"'>上一页</a> "
      else
          response.write"首页 上一页 "
      end if
      if page<pages then
          response.write"<a href='?order="&order&"&page="&page+1&"'>下一页</a> "&_
                        "<a href='?order="&order&"&page="&pages&"'>尾页</a>"
      else
          response.write"下一页 尾页"
      end if
      response.write"</td></tr></table>"
  end if
%></td>
  </tr>
</table>
      </td>
    </tr>
</table>
<% 
  end if
  conn.close
  set conn=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -