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

📄 memberlist.asp

📁 人民医院眼科全站
💻 ASP
字号:
<!--#include file="../include/bkconn.asp"-->
<!--#include file="checkUser.asp"-->
<%
dim rs,sql
dim page,maxPerPage,namestatus
maxPerPage=10 '每页显示的记录数
myKeyword=Request("myKeyword")
page=Request("page")
namestatus=request("namestatus")

Function selected(firstval,secondval)    
 If firstval=secondval then    
     selected="selected"    
 End if    
End Function 

if (page="" or isempty(page)) then page=1
thisUrl="memberList.asp?myKeyword="&myKeyword&"&"&"namestatus="&namestatus
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
sql="select * from member where 1=1"
if not (myKeyword="" or isempty(myKeyword) ) then
	if namestatus="name" then
	sql=sql&" and name like '%"&myKeyword&"%' "
	else
	sql=sql&" and memberid like '%"&myKeyword&"%'"
	end if
end if
sql=sql&" and class not in (-1) order by class desc,id"
'response.write sql
'response.End
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>会员管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../main.css" type="text/css">
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
	this.document.location="<%=thisUrl%>";}
if(i==2){
	this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
	this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
	this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}

//-->
</script>
</head>

<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="0">
<div align="center"><br>
  会员管理 </div>
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
  <tr> 
    <form method="post" action="memberList.asp" name="form1">
      <td colspan="6" bgcolor="#4296E7"> <div align="right"><font color="#FFFFFF">关键词</font> 
          <input type="text" name="myKeyword" size="16" value="<%=myKeyword%>">
          <select name="namestatus" >
            <option value="memberid" <%=selected(namestatus,"memberid")%> >会员帐号</option>
            <option value="name" <%=selected(namestatus,"name")%> >会员姓名</option>
          </select>
          <input type="submit" name="Submit" value="搜索">
        </div></td>
    </form>
  </tr>
  <tr bgcolor="#5EA5E6"> 
    <td width="13%" nowrap> <div align="center"><font color="#FFFFFF"> 会员帐号</font></div></td>
    <td width="15%" nowrap> <div align="center"><font color="#FFFFFF">会员姓名</font></div></td>
    <td width="5%" nowrap> <div align="center"><font color="#FFFFFF">性别</font></div></td>
    <td width="20%" nowrap> <div align="center"><font color="#FFFFFF">EMAIL</font></div></td>
    <td width="23%" nowrap> <div align="center"><font color="#FFFFFF">电话</font></div></td>
    <td width="8%" nowrap> <div align="center"><font color="#FFFFFF">会员等级</font></div></td>
  </tr>
  <%
		dim rsID
		i=1
		if not (rs.eof or err) then rs.move (page-1)*maxPerPage
		do while not (rs.eof or err) 
		rsID=rs("id")
%>
  <tr title="点击查看具体信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?id=<%=rs("id")%>'"> 
    <td width="13%"><%=rs("memberID")%>&nbsp;</td>
    <td width="15%"><%=rs("name")%>&nbsp;</td>
    <td width="5%"><%=rs("sex")%>&nbsp;</td>
    <td width="20%"><%=rs("email")%>&nbsp;</td>
    <td width="23%"><%=rs("phone")%>&nbsp;</td>
    <td width="8%"> <div align="center"> 
        <%if rs("class")=1 then
	  response.write "VIP会员"
	  elseif rs("class")=0 then
	  response.write "普通会员"
	  end if%>
      </div></td>
  </tr>
  <%
		i=i+1
		if i>maxPerPage then exit do
		rs.moveNext
		loop
%>
  <tr bgcolor="#4296E7"> 
    <td colspan="6"> <div align="right"><font color=#FFFFFF><%=rs.recordCount%> 
        项 第<%=page%>/<%=rs.pageCount%> 页 </font> 
        <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
        <input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
        <input type="submit" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
        <input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
        <input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
        <input type="submit" name="Submit5" value="下页" disabled>
        <input type="submit" name="Submit6" value="末页" disabled>
        <%end if%>
      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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