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

📄 system_userlist.asp

📁 矮子多用户版客户管理系统2.0Bate2
💻 ASP
字号:
<!--#include file="conn.asp" --> 
<%
dim filename,download
mclass=request("mclass")
dd=session("dd")



if session("name")="" or session("dd")=""  or int(dd)<>int(mclass) then
response.write "SORRY <br>"
response.write "数据在携带中出现意外!<br>"
response.write "<a href=login.asp>回去重来</a>"
response.end
end if

if session("quanxian")<"3"  then
response.write "SORRY <br>"
response.write "您的权限不够!请勿尝试非法访问!<br>"
response.end
end if




filename="userlist.asp"
dim msearchword
msearchword=Request("search")
vestid=Request("id")
   if not isempty(request("page")) then
 currentPage=cint(request("page"))
   else
 currentPage=1
   end if
if mclass="" then
mclass="1"
end if

%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>客户管理系统</title>
</head>
<STYLE type=text/css>
BODY {	FONT-FAMILY: "宋体","Arial Narrow","Times New Roman"; FONT-SIZE: 9pt}
TD {	FONT-FAMILY: "宋体","Arial Narrow","Times New Roman"; FONT-SIZE: 9pt; line-height: 150%}
a:link {  color: #3366FF; text-decoration: none}
a:visited {  color: #3366FF; text-decoration: none}
a:hover {  color: #FF0080; text-decoration: underline}
.p1 {	FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
.p2 {	COLOR: #c0c0c0; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
input {  font-family: "宋体"; font-size: 9pt;color:#0000FF}

</STYLE>
<body>


  
  
  
  
  <div align="center">
   
  
  
 <%
 dd=session("dd")
  const MaxPerPage=12
   dim totalPut
   dim CurrentPage 
   dim TotalPages 
   dim i,j 

 sql="select * from mclass where user_id ="&dd&"  order by mclass_id desc; "
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 
  if rs.eof and rs.bof then 
   %>
  还没有任何一个用户!
   <%
   else 
totalPut=rs.recordcount 
 totalPut=rs.recordcount 
 if currentpage<1 then 
currentpage=1 
 end if 
 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

 showContent 
   showpage totalput,MaxPerPage,"system_userlist.asp" 

  else 
			if (currentPage-1)*MaxPerPage<totalPut then 
				rs.move  (currentPage-1)*MaxPerPage 
				dim bookmark 
				bookmark=rs.bookmark
		
						 showContent 
				showpage totalput,MaxPerPage,"system_userlist.asp" 
				else 
				currentPage=1 
		
				  showContent 
			 showpage totalput,MaxPerPage,"system_userlist.asp" 
			end if 
 end if 
   rs.close 
   end if 
	
   set rs=nothing  
   sub showContent 
  dim i 
 i=0
 %> 
		<table border="0" width="80%" id="table2" cellspacing="0" cellpadding="0">
		<tr>
			<td> </td>
		</tr>
		<tr>
			<td>用户列表 - <a href="user_add.asp">增加用户</a></td>
		</tr>
		<tr>
			<td> </td>
		</tr>
	</table>
  <table border="0" width="80%" cellspacing="1" cellpadding="0" height="37" bgcolor="#DADADA" id="table1">
	<tr>
		<td width="15%" bgcolor="#EBEBEB" height="25" align="center">用户名</td>
		
		
		<td width="10%" bgcolor="#EBEBEB" height="25" align="center">姓名</td>
		
		
		<td width="5%" bgcolor="#EBEBEB" height="25" align="center">性别</td>
		
		<td width="8%" bgcolor="#EBEBEB" height="25" align="center">部门</td>
		
		
		<td width="15%" bgcolor="#EBEBEB" height="25" align="center">电话</td>
		
		<td width="16%" bgcolor="#EBEBEB" height="25" align="center">电子邮件</td>
		
		<td width="12%" bgcolor="#EBEBEB" height="25" align="center">权限</td>
		
		
		<td width="19%" bgcolor="#EBEBEB" height="25" align="center">操作</td>
	</tr>
	                 
   	<%
    
do while not rs.EOF


zw=rs("zhiwu")
   	if rs("zhiwu") ="未填" then	
   	zw="" 
   	else
   	zw=rs("zhiwu")
   	end if
   %>        
	<tr>
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><input type="hidden" name="time" value="<%=i+1%>"><a href=system_views.asp?id=<%=rs("mclass_id")%>><%=rs("name")%></a></td>
		

		
		<td width="10%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("ming")%><%=zw%>
</td>
		

		
		<td width="5%" bgcolor="#FFFFFF" height="25" align="center"><%

		if rs("sex") ="0" then
		response.write"男"
		else
		response.write"女"
		end if
		
		
		
	
		%></td>
		

		<td width="8%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("bumen")%></td>
		
		
		
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><%
		
		if rs("phone") ="未填" and rs("mobile") ="未填"  then response.write "未知或无" end if
		if rs("phone") ="未填" and rs("mobile") <>"未填" then response.write rs("mobile") end if
        if rs("phone") <>"未填" and rs("mobile") ="未填" then response.write rs("phone") end if
        if rs("phone") <>"未填" and rs("mobile") <>"未填" then response.write rs("mobile") end if
		
		
		%></td>
		

		<td width="16%" bgcolor="#FFFFFF" height="25" align="center"><% if rs("email")="未填" then%><%=rs("email")%><%else%><a href="mailto:<%=rs("email")%>"><%=rs("email")%></a><%end if%></td>
		

		<td width="12%" bgcolor="#FFFFFF" height="25" align="center"><%

		if rs("quanxian") ="1" then response.write"只读权限" end if
		if rs("quanxian") ="2" then response.write"读写权限" end if
		if rs("quanxian") ="3" then response.write"超级管理" end if
		if rs("quanxian") ="0" then response.write"<font color=#FF0000>账户停用</font>" end if
	
		%></td>
		

		
	<td width="19%" bgcolor="#FFFFFF" height="25" align="center"><%if rs("user_id")=rs("mclass_id") or rs("name")=session("name") then%><font color="#D3D1D1">该用户禁止操作</font><%else%><a target="_self" href="system_views.asp?id=<%=rs("mclass_id")%>">详细</a> | 
		<a target="_self" href="system_edit.asp?id=<%=rs("mclass_id")%>">修改</a> | <a href="system_deltree.asp?id=<%=rs("mclass_id")%>">删除</a><%end if%></td>
	</tr><% i=i+1
			    if i>=MaxPerPage then exit do
			    rs.MoveNext   
        		loop
                %>
	</table>
	<table border="0" width="80%" id="table2" cellspacing="0" cellpadding="0">
		<tr>
			<td> </td>
		</tr>
	</table>
	<%end sub%>
  
  

  
  
  
 	</div>
</body>


</html>
<%  

function getfolderm()  
dim tmprs,tmpid,tmpsql
set tmprs=server.createobject("adodb.recordset")
tmpsql="Select * from mclass where user_id = "&mclass&" "
tmprs.open tmpsql,conn,1,1
getfolderm="<a target=mainFrame href=system_userlist.asp?mclass="&session("dd")&"&sclass="&com_vest&">"&tmprs("mclass_folder")&"</a>"
	set tmprs=nothing  
	if isnull(getfolderm) then getfolderm="查看详细资料"
end function
function getfolders()  
if request("sclass")<>"" then
dim tmprss,tmpids,tmpsqls
set tmprss=server.createobject("adodb.recordset") 
tmpsqls="Select * from sclass where sclass_id = "&request("sclass")&" "
tmprss.open tmpsqls,conn,1,1
getfolders=tmprss("sclass_folder")
	set tmprss=nothing   
	if isnull(getfolders) then getfolders="查看详细资料" 
 end if
end function   
	function showpage(totalnumber,maxperpage,filename)   
dim n 
  if totalnumber mod maxperpage=0 then 
n= totalnumber \ maxperpage 
  else 
n= totalnumber \ maxperpage+1 
  end if 
	Response.Write "<font style=""font-size:9pt""><div align=""center""><table border=0 cellpadding=0 cellspacing=0 width=""80%"" ><tr><td width=""50%""  valign=middle>" 
	Response.Write "<font class=3dfont size=2><p align=""left"">合计<font color=#008000><b>"&totalnumber&"</b></font>个用户</td><td width=""50%"" valign=middle>"
	Response.Write "<font class=3dfont size=2><p align=right>&nbsp;&nbsp;&nbsp;第<font color=#008000><b>"&currentpage&"</b></font>页 | 共<font color=#008000><b>"&n&"</b></font>页&nbsp;|&nbsp;"


   if CurrentPage<2 then 
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">第一页</a>&nbsp;"   
  response.write "<font color=#6A6A6A><font style=""font-size:9pt"">前一页</a>&nbsp;" 
   else
response.write "<a href="&filename&"?page=1&mclass="&mclass&">第一页</a>&nbsp;" 
response.write "<a href="&filename&"?page="&CurrentPage-1&"&mclass="&mclass&">前一页</a>&nbsp;" 
  end if  
  if n-currentpage<1 then  
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">后一页</a>&nbsp;"   
  response.write "<font color=#6A6A6A><font style=""font-size:9pt"">最后页</a>" 
  else 
response.write "<a href="&filename&"?page="&CurrentPage+1&"&mclass="&mclass&">" 
response.write "后一页</a>&nbsp;"   
  response.write "<a href="&filename&"?page="&n&"&mclass="&mclass&">最后页</a>" 
  end if 
Response.Write "</td></tr></table></div>"
end function  
 set rs=nothing	


%>

⌨️ 快捷键说明

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