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

📄 admin.asp

📁 不错的ASP整站源代码。在IIS环境下运行都没有问题
💻 ASP
字号:
<!--#include file="security.asp"-->
<!--#include file=conn.asp -->
<%
px=request("px")
if px="" then px="j_date"
search_txt=request("search_txt")

Set rs_lar = Server.CreateObject("ADODB.Recordset")
sql="select * 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 lar_id     asc"
       case "s_article"
             sql=sql & " Order by huoli     asc"
       case "j_article"
             sql=sql & " Order by huoli     desc"    
       case "s_piaoshu"
             sql=sql & " Order by piaoshu     asc"
       case "j_piaoshu"
             sql=sql & " Order by piaoshu     desc"  
       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 lar_id    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=10
	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><title>会员管理</title>
<link rel="stylesheet" href="../inc/style.css">
</head>
<body leftMargin=0 topMargin=10>
<center>
<table border="0" width="100%">
    <tr>
      <td>
      <%if search_txt<>"" then%>以下是包含关键字<font color="#ff0000"><%=search_txt%></font>的所有网友<%else%>以下是所有网友的列表<%end if%>
      </td>
    </tr>
    <tr>
      <td>
      第 <font color="red"><%=currentpage%></font> 页&nbsp;<%if search_txt="" then%>已加入网友共<%else%>找到网友<%end if%> <font color="Red"><%=Records%></font> 位&nbsp;共 <font color="red"><%=Pages%></font> 页
      </td>
    </tr>
    <tr>
      <%if pages>1 then%>
      <td>
      转到页码:[  
      <%for p=1 to pages%>  
      <a <%if currentpage=p then%> style="color:black"<%end if%> href="admin.asp?currentpage=<%=p%>&search_txt=<%=search_txt%>&px=<%=px%>"><%=p%></a>  
      <%if p/30=0 then%>  
      <%end if%>  
      <%next%>  
      ] 
      </td>  
      <%end if%>  
    </tr>  
  </table>  
  <!------------------------------------------------------------------------------------------------------------------------->  
  <form name="form1">    
  <table border="0" cellspacing="1" cellpadding="2" bgcolor="#000000" width="99%">
    <tr bgcolor="#DDDDDD"> 
      <td align="center" ><font color="#000000">网名<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 align="center" ><font color="#000000">性别<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 align="center" ><font color="#000000">来自<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 align="center" ><font color="#000000">生日<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 align="center" ><font color="#000000">呼机<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 align="center" ><font color="#000000">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 align="center" ><font color="#000000">登记<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 align="center"><font color="#000000">人气<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 align="center"><font color="#000000">照片<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 align="center"><font color="#000000">文章<a title="按照片数升序排列" <%if px="s_photo" then%> style="color:red"<%end if%> href="admin.asp?px=s_article&search_txt=<%=search_txt%>">↑</a><a title="按照片数降序排列" <%if px="j_photo" then%> style="color:red"<%end if%> href="admin.asp?px=j_article&search_txt=<%=search_txt%>">↓</a></font></td>
      <td align="center"><font color="#000000">登陆</font></td>
      <td align="center"><font color="#000000">得票<a title="按照片数升序排列" <%if px="s_photo" then%> style="color:red"<%end if%> href="admin.asp?px=s_piaoshu&search_txt=<%=search_txt%>">↑</a><a title="按照片数降序排列" <%if px="j_photo" then%> style="color:red"<%end if%> href="admin.asp?px=j_piaoshu&search_txt=<%=search_txt%>">↓</a></font></td>
      <td align="center"><font color="#000000">删除</font></td>
    </tr>
    <%linenumber=rs_lar.pagesize%>
    <%do while (not rs_lar.eof) and (line<linenumber)%>
    <tr bgcolor="#FFFFFF"> 
      <td><a href="adminread.asp?user_id=<%=rs_lar("user_id")%>" title="查看网友<%=rs_lar("netname")%>的祥细资料"><%=rs_lar("netname")%></a></td>
      <td align="center"><%=rs_lar("sex")%></td>
      <td><%=rs_lar("home")%></td>
      <td><%=rs_lar("britherday")%></td>
      <td><%=rs_lar("netcall")%></td>
      <td><%=rs_lar("ip")%></td>
      <td><%=rs_lar("date")%></td>
      <td>&nbsp;<a href="setrenqi.asp?user_id=<%=rs_lar("user_id")%>" title=调整><%=rs_lar("renqi")%></a></td>
      <td>&nbsp;<a href="readphoto.asp?user_id=<%=rs_lar("user_id")%>"><%=rs_lar("photo")%></a></td>
      <td>&nbsp;<%=rs_lar("huoli")%></td>
      <td>&nbsp;<%=rs_lar("logintimes")%></td>
      <td>
      <% if rs_lar("shenqing")=true then %>
      <a href="setstatus.asp?user_id=<%=rs_lar("user_id")%>" title=调整>√</a>
      <% else %>
      <a href="setstatus.asp?user_id=<%=rs_lar("user_id")%>" title=调整>×</a>
      <% end if %>
      <a href="piaoshu.asp?user_id=<%=rs_lar("user_id")%>" title=调整><%=rs_lar("piaoshu")%></a>
      </td>
      <td align="center"><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%>">上一页</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="15" class="put"><input type="submit" value="搜索" name="B1" class="put1"><a href="search.asp">[高级搜索]</a>  
      </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 + -