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

📄 admin.asp

📁 在线交友模块:在线交友是指通过网络来结交朋友。利用网络资源的无限性实现跨地域的信息交流
💻 ASP
字号:
<%
if session("admin_pass")<>"ok" then
   response.redirect "adminlogin.asp"
   response.end
end if
px=request("px")
if px="" then px="j_date"
search_txt=request("search_txt")
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("friend/global.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs_lar = Server.CreateObject("ADODB.Recordset")

sql="select user_id,netname,sex,netcall,britherday,ip,renqi,home,date,photo from larchives"
if search_txt<>"" then
	sql=sql & " where netname like '%" & search_txt & "%'"
	sql=sql & " or sex like '%" & search_txt & "%'"
	sql=sql & " or netcall like '%" & search_txt & "%'"
	sql=sql & " or britherday like '%" & search_txt & "%'"
	sql=sql & " or ip like '%" & search_txt & "%'"
	sql=sql & " or renqi like '%" & search_txt & "%'"
	sql=sql & " or date like '" & search_txt & "'"
	sql=sql & " or home like '%" & search_txt & "%'"
	sql=sql & " or photo like '%" & search_txt & "%'"
end if
Select case px
       case "s_netname"
             sql=sql & " Order by  time   asc"
       case "s_sex"
             sql=sql & " Order by  sex    asc"
       case "s_britherday"
             sql=sql & " Order by  britherday    asc"
       case "s_netcall"
             sql=sql & " Order by  netcall asc"
       case "s_ip"
             sql=sql & " Order by  ip      asc"
       case "s_renqi"
             sql=sql & " Order by  renqi   asc"
       case "s_home"
             sql=sql & " Order by home     asc"
       case "s_date"
             sql=sql & " Order by date     asc"

       case "j_netname"
             sql=sql & " Order by  name   desc"
       case "j_sex"
             sql=sql & " Order by  sex    desc"
       case "j_britherday"
             sql=sql & " Order by  britherday    desc"
       case "j_netcall"
             sql=sql & " Order by netcall desc"
       case "j_ip"
             sql=sql & " Order by  ip     desc"
       case "j_renqi"
             sql=sql & " Order by  renqi  desc"
       case "j_home"
             sql=sql & " Order by home    desc"
       case "j_date"
             sql=sql & " Order by time    desc"
       case "j_photo"
             sql=sql & " Order by photo    desc"
End Select

rs_lar.open sql,conn,3,2
if rs_lar.eof and rs_lar.bof then str="此交友系统还没有一个网友!"
'分页设置
if str="" then
	rs_lar.PageSize=30
	pages=rs_lar.pagecount
	records=rs_lar.recordcount
	currentpage=request("currentpage")
	if currentpage="" or currentpage<1 then currentpage=1
	currentpage=cint(currentpage)
	if currentpage>pages then currentpage=pages
	rs_lar.absolutepage=currentpage
else
        currentpage=1
	records=0
	pages=1
end if
%>
<html>
<head>
<style>
<!--
.x:link      { color: white; text-decoration: none }
.x:visited   { color: white; text-decoration: none }
.x:active    { color: red; text-decoration: none }
.x:hover     { color: red;text-decoration:nome}
tr           { font-size: 9pt }
td           { font-size: 9pt }
body         { font-size: 9pt }
a:link       { color: blue; text-decoration: none }
a:visited    { color: blue; text-decoration: none }
a:active     { color: red; text-decoration: none }
a:hover      { color: red; text-decoration: none }
-->
</style>
</head>
<body leftMargin=0 topMargin=0>
<table border="0" width="405" cellspacing="0" cellpadding="3">
  <tr bgcolor="#9999FF">
    <td style="border-bottom-style: solid" bordercolor="#336699" width="129" height="30"><a href="index.asp" style="color:#ffffff"><font size="2"><b>
    <center>交友首页</center></b></font></a></td>
    <td style="border-bottom-style: solid" bordercolor="#336699" width="119" height="30"><font color="#FFFFFF"><b><a href="exitadmin.asp" class="x">退出管理</a></b></font></td>
    <td style="border-bottom-style: solid" bordercolor="#336699" width="41" height="30">&nbsp;</td>
    <td style="border-bottom-style: solid" bordercolor="#336699" width="92" height="30">&nbsp;</td>
  </tr>
</table>
<!------------------------------------------------------------------------------------------------------------------------------>
  <!-------------------------------------分页导航--------------------------------------->
  <table border="0" width="750">
    <tr>
      <td width="578" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
      <p align="left">
      <font size="2"><i><%if search_txt<>"" then%>以下是包含关键字<font color="#ff0000"><%=search_txt%></font>的所有网友<%else%>以下是所有网友的列表</i><%end if%></font>
      </p>
      </td>
    </tr>
    <tr>
      <td width="578">
      <font size="2">第<font color="red"><%=currentpage%></font>页&nbsp;<%if search_txt="" then%>已加入网友共<%else%>找到网友<%end if%><font color="blue"><%=Records%></font>位&nbsp;共<font color="blue"><%=Pages%></font>页</font>
      </td>
    </tr>
    <tr>
      <%if pages>1 then%>
      <td width="578">
      <font size="2">转到页码:[  
      <%for p=1 to pages%>  
      <a <%if currentpage=p then%> style="color:red"<%end if%> href="admin.asp?currentpage=<%=p%>&search_txt=<%=search_txt%>&px=<%=px%>"><%=p%></a>  
      <%if p/30=0 then%>  
      <%end if%>  
      <%next%>  
      ]</font>  
      </td>  
      <%end if%>  
    </tr>  
  </table>  
  <!------------------------------------------------------------------------------------------------------------------------->  
  <form name="form1">  
    <table border="0" width="750" cellspacing="0">  
        <tr bordercolor="#FF00FF" bgcolor="#9966FF">  
        <td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">网名<a title="按网名升序排列" <%if px="s_netname" then%> style="color:red"<%end if%> href="admin.asp?px=s_netname&search_txt=<%=search_txt%>">↑</a><a title="按网名降序排列" <%if px="j_netname" then%> style="color:red"<%end if%> href="admin.asp?px=j_netname&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">性别<a title="按性别升序排列" <%if px="s_sex" then%> style="color:red"<%end if%> href="admin.asp?px=s_sex&search_txt=<%=search_txt%>">↑</a><a title="按性别降序排列" <%if px="j_sex" then%> style="color:red"<%end if%> href="admin.asp?px=j_sex&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="116" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">来自<a title="按籍贯升序排列" <%if px="s_home" then%> style="color:red"<%end if%> href="admin.asp?px=s_home&search_txt=<%=search_txt%>">↑</a><a title="按籍贯降序排列" <%if px="j_home" then%> style="color:red"<%end if%> href="admin.asp?px=j_home&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="80" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">生日<a title="按生日升序排列" <%if px="s_britherday" then%> style="color:red"<%end if%> href="admin.asp?px=s_britherday&search_txt=<%=search_txt%>">↑</a><a title="按生日降序排列" <%if px="j_britherday" then%> style="color:red"<%end if%> href="admin.asp?px=j_britherday&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="99" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">网络寻呼机<a title="按网络传呼机号码升序排列" <%if px="s_netcall" then%> style="color:red"<%end if%> href="admin.asp?px=s_netcall&search_txt=<%=search_txt%>">↑</a><a title="按网络传呼机号码降序排列" <%if px="j_netcall" then%> style="color:red"<%end if%> href="admin.asp?px=j_netcall&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">登记IP<a title="按登记IP升序排列" <%if px="s_ip" then%> style="color:red"<%end if%> href="admin.asp?px=s_ip&search_txt=<%=search_txt%>">↑</a><a title="按登记IP降序排列" <%if px="j_ip" then%> style="color:red"<%end if%> href="admin.asp?px=j_ip&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">登记时间<a title="按登记时间升序排列" <%if px="s_date" then%> style="color:red"<%end if%> href="admin.asp?px=s_date&search_txt=<%=search_txt%>">↑</a><a title="按登记时间降序排列" <%if px="j_date" then%> style="color:red"<%end if%> href="admin.asp?px=j_date&search_txt=<%=search_txt%>">↓</a></font></td>  
        <td width="55" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">人气<a title="按人气升序排列" <%if px="s_renqi" then%> style="color:red"<%end if%> href="admin.asp?px=s_renqi&search_txt=<%=search_txt%>">↑</a><a title="按人气降序排列" <%if px="j_renqi" then%> style="color:red"<%end if%> href="admin.asp?px=j_renqi&search_txt=<%=search_txt%>">↓</a></font></td>  
  

<td width="55" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">照片<a title="按照片数升序排列" <%if px="s_photo" then%> style="color:red"<%end if%> href="admin.asp?px=s_photo&search_txt=<%=search_txt%>">↑</a><a title="按照片数降序排列" <%if px="j_photo" then%> style="color:red"<%end if%> href="admin.asp?px=j_photo&search_txt=<%=search_txt%>">↓</a></font></td>  
               


<td width="44" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">删除</font></td>  
      </tr>  
      <%linenumber=rs_lar.pagesize%>  
      <%do while (not rs_lar.eof) and (line<linenumber)%>  
      <tr>  
        <td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><a href="adminread.asp?user_id=<%=rs_lar("user_id")%>" title="查看网友<%=rs_lar("netname")%>的祥细资料"><%=rs_lar("netname")%></a></td>  
        <td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("sex")%></td>  
        <td width="116" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("home")%></td>  
        <td width="80" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("britherday")%></td>  
        <td width="99" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("netcall")%></td>  
        <td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("ip")%></td>  
        <td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("date")%></td>  
        <td width="55" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><a href="setrenqi.asp?user_id=<%=rs_lar("user_id")%>" target=_blank title=调整><%=rs_lar("renqi")%></td>  
   <td width="55" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><%=rs_lar("photo")%></td>  
             

<td width="44" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#EEEEEE"><a href="deluser.asp?user_id=<%=rs_lar("user_id")%>">[删除]</a></td>  
      </tr>  
      <%rs_lar.movenext%>  
      <%line=line+1%>  
      <%loop%>  
      <%rs_lar.close%>  
    </table>  
</form>  
  <!-------------------------------------分页导航--------------------------------------->  
  <table align="center" width="750">  
    <tr>  
      <td>  
      <font size="2">  
      <%if currentpage>1 then%>  
      <a href="admin.asp?currentpage=<%=currentpage-1%>&search_txt=<%=search_txt%>&px=<%=px%>"><font size="2">[上一页]</font></a>  
      <%end if%>  
      <%if currentpage<pages then%>  
      <a href="admin.asp?currentpage=<%=currentpage+1%>&search_txt=<%=search_txt%>&px=<%=px%>">[下一]</a>  
      <%end if%>  
      <%if currentpage>1 then%>  
      <a href="admin.asp?currentpage=1&search_txt=<%=search_txt%>&px=<%=px%>">[最首]</a>  
      <%end if%>  
      <%if currentpage<pages then%>  
      <a href="admin.asp?currentpage=<%=pages%>&search_txt=<%=search_txt%>&px=<%=px%>">[最末]</a>  
      <%end if%>  
      </font>  
      </td>  
    </tr>  
  </table>  
  <!-------------------------------------------------------------------------------------------------------------------------><!------------------------------------------------------------------------------------------------------------------------->  
<form>  
  <table border="0" width="100%" cellspacing="0" height="27">  
    <tr>  
      <td width="100%" height="13">      <p align="center">  
      关键字<input type="text" name="search_txt" size="8"><input type="submit" value="搜索" name="B1">
      </p>  
      </td>  
   </tr>  
    <tr>  
      <td width="100%" height="12">  
      <p align="center">关键字为空列出所有网友  
      </td>  
    </tr>  
  </table>  
</form>  
</body>  
</html>

⌨️ 快捷键说明

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