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

📄 userlist.asp

📁 青岛dj站程序,带后台管理 名字和密码都是:admin
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request("page")) then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
%>
<!--#include file="top.asp"-->

<div align="center">
  <center>
  <table width="773" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#30393D" id="AutoNumber1" style="border-collapse: collapse">
    <tr>
      <td width="5" background="images/line_bg02.gif" height="1">
      <img border="0" src="images/line_bg02.gif"></td>
      <td width="741" height="1">
      <div align="center">
        <center>
     <table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td width="70%" valign="top" align="center" bgcolor="#0D5777">


<form name=form1 method=post action=usersearch.asp>     
     <p align="right">搜索: 
        <select name="stype" size="1">
          <option value="username" selected>注 册 名</option>
		  <option value="truename">真实姓名</option>
		  <option value="email">电子信箱</option>
		  <option value="oicq">OICQ</option>
		  <option value="Address">所在地区</option>
        </select>
        <input size=10 type="text" value="输入关键字" onClick="Javascript:this.value=''" onFocus=this.select() onMouseOver=this.focus() name=keyword maxlength="30">
        <input type="submit" align="absmiddle" width="20" height="20" title="查询" id=Image1 name=Image1 value="搜索">
     </p>
    
    </td>
          </tr>
        </form>



</td>
  </tr>
  <tr>
    <td width="70%" valign="top" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from user order by id desc" 
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	response.write "<p align='center'>暂时没有用户注册</p>" 
else 
	MaxPerPage=20
	PageUrl="UserList.asp"
	totalPut=rs.recordcount 
	if currentpage<1 then currentpage=1
	if (currentpage-1)*MaxPerPage>totalput then 
		if (totalPut mod MaxPerPage)=0 then 
			currentpage= totalPut \ MaxPerPage 
		else 
			currentpage= totalPut \ MaxPerPage + 1 
		end if 
	end if 
	if currentPage=1 then 
		showpage totalput,MaxPerPage,PageUrl
		showContent 
		showpage totalput,MaxPerPage,PageUrl
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move  (currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark 
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		else 
			currentPage=1 
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		end if 
	end if 
end if 
rs.close 
			
sub showContent 
%>
            <table border="1" width="740" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#111111">
              <tr>
                <td width="46" height=22 align=center bgcolor="#0D5777">
                ID</td>
                <td width="74" height=22 align=center bgcolor="#0D5777">
                用户名</td>
                <td width="75" height=22 align=center bgcolor="#0D5777">
                真实姓名</td>
                <td width="36" height=22 align=center bgcolor="#0D5777">
                性别</td>
                <td width="151" height=22 align=center bgcolor="#0D5777">
                信箱</td>
                <td width="70" height=22 align=center bgcolor="#0D5777">
                OICQ</td>
                <td width="99" height=22 align=center bgcolor="#0D5777">
                主页</td>
                <td width="60" height=22 align=center bgcolor="#0D5777">
                积分</td>
                <td width="72" height=22 align=center bgcolor="#0D5777">
                发短消息</td>
                <td width="46" height=22 align=center bgcolor="#0D5777">
                资料</td>
              </tr>
<%
do while not rs.eof
	i=i+1
%>
              <tr>
                <td align=center width="46"><%=totalPut-(i+MaxPerPage*(currentpage-1)-1)%> </td>
                <td align=center width="74"><a href="javascript:open_window('userinf.asp?id=<%=rs("id")%>','UserInfo','width=500,height=480')"><%=rs("UserName")%></a>
                <%if DateValue(rs("addDate"))=date() then%>
                    <img src="images/new.gif"> 
                    <%end if%>
                    </td>
                <td align=center width="75"><%=rs("TrueName")%> </td>
                <td align=center width="36"><%if rs("sex")=1 then%>男<%else%><font color="<%=AlertFColor%>">女</font><%end if%></td>
                <td align=center width="151"><%=rs("Email")%> </td>
                <td align=center width="70"><%=rs("oicq")%> </td>

                <td align=center width="99"><a href=http://<%=rs("userweburl")%>><%=rs("userwebname")%></a> </td>
                <td align=center width="60"><%=rs("points")%> </td>
                <td align=center width="72">
                <a href="javascript:open_window('messager.asp?action=new&touser=<%=rs("UserName")%>','messanger','width=420,height=290')"><font color="#FF0000">
          给</font> 
            <%=rs("UserName")%> <font color="#FF0000">发短消息</font></a></td>
                <td align=center width="46">
                <input title="查看用户的祥细资料" style="border:0px solid #1A8CFF; FONT-SIZE: 12px; COLOR: #828F9B; BACKGROUND-COLOR: #171A1C; TEXT-DECORATION: underline" type=button name="Look" value="查看" onclick="javascript:open_window('userinf.asp?id=<%=rs("id")%>','UserInfo','width=500,height=480')"><font color="#FF0000"><a href="javascript:open_window('userinf.asp?id=<%=rs("id")%>','UserInfo','width=500,height=480')">
</font></td>
              </tr>
<%
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
            </table>
<%
end sub 

function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>?classid=<%=classid%>">
  <center>
  <p>共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>位用户
<%if CurrentPage<2 then%> &nbsp;首页 上一页&nbsp;
<%else%> &nbsp;<a href="<%=filename%>?page=1&classid=<%=classid%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>">
  上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%> 下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>">
  下一页</a>
  <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>">
  末页</a>
<%end if%> &nbsp;页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页 
  转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>           
  <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>
  第<%=i%>页</option>   
<%next%>   
  </select> </p>
</form>        
<%end function%>
    </td>
  </tr>
  </table></center>
      </div>
      </td>
      <td width="5" height="1">&nbsp;      </td>
    </tr>
    <tr>
      <td width="750" height="7" colspan="3">&nbsp;      </td>
    </tr>
  </table>
  </center>
</div>
<div align="center">
<!--#include file="friendsite.asp"-->
</div>
<%
set rs=nothing
conn.close
set conn=nothing%></body></html>

⌨️ 快捷键说明

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