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

📄 userlist.asp

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




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">
  
 
  
  
 <%
 dim com

      keyword=request("keyword")
  y=request("y")
  if y="" then com="(com_name+com_diqu+com_city+com_shen+com_phone+com_fax+com_email+com_address+com_zip+com_fuzeren+com_zczj+com_setup+com_touzi+com_hangye+com_porduct+com_chanzhi+com_web+com_rzzk+com_kongzhi+content) like '%"& keyword &"%'" end if
  if y="1" then com="(com_name+com_diqu+com_city+com_shen+com_phone+com_fax+com_email+com_address+com_zip+com_fuzeren+com_zczj+com_setup+com_touzi+com_hangye+com_porduct+com_chanzhi+com_web+com_rzzk+com_kongzhi+content) like '%"& keyword &"%'" end if
  if y="2" then com=" com_name like'%"& keyword &"%'" end if
  if y="3" then com=" (com_diqu+com_city+com_shen) like'%"& keyword &"%'" end if
  if y="6" then com=" com_phone like'%"& keyword &"%'" end if          
  if y="7" then com=" com_fax like'%"& keyword &"%'" end if
  if y="8" then com=" com_kongzhi like'%"& keyword &"%'" end if
   if y="9" then com=" time like'%"& keyword &"%'" end if
  '-------------------------------------------------------------------------
   MaxPerPage=int(session("waifenye"))
   dim totalPut
   dim CurrentPage 
   dim TotalPages 
   dim i,j 
    if session("chayue")="0" then
   
   if Request("sclass")<>"" then 
 sql="select * from customer where  "&com&" and vest_s = "&Request("sclass")&"and vest_m ="&session("dd")&" order by id desc;"
   else 
   sql="select * from customer  where  "&com&"     and  vest_m ="&mclass&" order by id desc;" 


   end if 
   
   else
   
    if Request("sclass")<>"" then 
 sql="select * from customer where "&com&" and vest_s = "&Request("sclass")&"and vest_m ="&session("dd")&" and com_kongzhi ='"&session("name")&"' order by id desc;"
   else 
   sql="select * from customer  where "&com&"  and vest_m ="&mclass&" and com_kongzhi ='"&session("name")&"' order by id desc;" 
   end if 
   end if
   
   
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 
  if rs.eof and rs.bof then 
  response.write "<p align='center'>不 存 在 的 客 户 资 料,<a href=vbscript:history.back()>点此返回</a>!</p>" 
   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,"userlist.asp" 

  else 
			if (currentPage-1)*MaxPerPage<totalPut then 
				rs.move  (currentPage-1)*MaxPerPage 
				dim bookmark 
				bookmark=rs.bookmark
		
						 showContent 
				showpage totalput,MaxPerPage,"userlist.asp" 
				else 
				currentPage=1 
		
				  showContent 
			 showpage totalput,MaxPerPage,"userlist.asp" 
			end if 
 end if 
   rs.close 
   end if 
	
   set rs=nothing  
   sub showContent 
  dim i 
 i=0
 %>  <form onsubmit="window.location=this.field.options[this.field.selectedIndex].value+this.keyword.value; return false;">
		<table border="0" width="80%" id="table3" cellspacing="0" cellpadding="0">
		<tr>
			<td width="823" colspan="2"> </td>
		</tr>
		<tr>
			<td width="367">客户列表<%if session("quanxian")>=2 then%> - <A target="mainFrame" HREF="step2.asp?mclass=<%=session("dd")%>">增加新客户</a><%end if%></td>
			<td>
	<p align="right">
	<span style="font-size: 9pt">搜索<font size=2>:</font><font size=2 color=ff0000><input  type="text" name="keyword" onFocus='this.select();' style="padding: 1px" size="20"> </font></span>
	<select name="field" size="1">

	<option value="userlist.asp?mclass=<%=session("dd")%>&y=1&sclass=<%=Request("sclass")%>&keyword=">模糊搜索</option>
	<option value="all_userlist.asp?mclass=<%=session("dd")%>&w=2&sclass=<%=Request("sclass")%>&keyword=">搜联系人</option>
	<option value="userlist.asp?mclass=<%=session("dd")%>&y=2&sclass=<%=Request("sclass")%>&keyword=">搜单位名</option>
	<option value="userlist.asp?mclass=<%=session("dd")%>&y=3&sclass=<%=Request("sclass")%>&keyword=">搜索地区</option>
    <option value="userlist.asp?mclass=<%=session("dd")%>&y=6&sclass=<%=Request("sclass")%>&keyword=">搜索电话</option>
    <option value="userlist.asp?mclass=<%=session("dd")%>&y=7&sclass=<%=Request("sclass")%>&keyword=">搜索传真</option>
    <option value="userlist.asp?mclass=<%=session("dd")%>&y=8&sclass=<%=Request("sclass")%>&keyword=">录入人名</option>
        <option value="userlist.asp?mclass=<%=session("dd")%>&y=9&sclass=<%=Request("sclass")%>&keyword=">录入时间</option>
	</select> 
	<input type="submit" value="搜索" name="button"  ></td>
		</tr>
		<tr>
			<td width="367"> </td>
			<td width="456">
	 </td>
		</tr>
	</table>
  <table border="0" width="80%" cellspacing="1" cellpadding="0" height="37" bgcolor="#DADADA" id="table1">
	<tr>
		<td style="cursor: hand" width="22%" bgcolor="#EBEBEB" height="25" align="center">单位</td>
		
		<td  style="cursor: hand" width="10%" bgcolor="#EBEBEB" height="25" align="center">省份城市</td>
		
		<td  style="cursor: hand" width="10%" bgcolor="#EBEBEB" height="25" align="center">区域</td>
		
		
		<td  style="cursor: hand" width="15%" bgcolor="#EBEBEB" height="25" align="center">电话</td>
		<%if session("chayue")="0" then%>
		<td  style="cursor: hand" width="7%" bgcolor="#EBEBEB" height="25" align="center">重要度</td>
		<td  style="cursor: hand" width="15%" bgcolor="#EBEBEB" height="25" align="center">录入人</td>
		<%else%>
		<td style="cursor: hand"  width="15%" bgcolor="#EBEBEB" height="25" align="center">传真</td>
		<td style="cursor: hand"  width="7%" bgcolor="#EBEBEB" height="25" align="center">重要度</td>
		<%end if%>
	
		
		<%if session("quanxian")>=2 then%>
		<td  style="cursor: hand" width="20%" bgcolor="#EBEBEB" height="25" align="center">操作</td>
		<%end if%>
	</tr>
	                 
   	<%
      
		
do while not rs.EOF

	if rs("zy")="0" then
		zy= "初步"
		end if
		if rs("zy")="1" then
		zy= "一般"
		end if
		if rs("zy")="2" then
		zy="<font color=#FF0000>重要</font>"
	 
	    end if
	    com_shen=rs("com_shen")
	    com_city=rs("com_city")
	    
	    if com_shen="未填" then com_shen="" end if
		if com_city="未填" then com_city="" end if
		
		if com_shen="" and com_city="" then com_shen="未知" end if
   %>        
	<tr>
		<td width="22%" bgcolor="#FFFFFF" height="25" align="center"><a href=c_userlist.asp?mclass=<%=rs("vest_m")%>&sclass=<%=rs("vest_s")%>&cust_s=<%=rs("id")%> target="_self" ><%=rs("com_name")%></a></td>
		

		<td width="10%" bgcolor="#FFFFFF" height="25" align="center"><%=com_shen%><%=com_city%></td>
		

		<td width="10%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("com_diqu")%></td>
		
		
		
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("com_phone")%></td>
		<%if session("chayue")="0" then%>
		<td width="7%" bgcolor="#FFFFFF" height="25" align="center"><%=zy%></td>
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("com_kongzhi")%></td>
		<%else%>
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("com_fax")%></td>	
		<td width="7%" bgcolor="#FFFFFF" height="25" align="center"><%=zy%></td>
        <%end if%>
	
		

		
		<%if session("quanxian")>=2 then%><td width="20%" bgcolor="#FFFFFF" height="25" align="center"><a href=c_userlist.asp?mclass=<%=rs("vest_m")%>&sclass=<%=rs("vest_s")%>&cust_s=<%=rs("id")%> target="_self" >详细</a> | 
		<a target="_self" href="edit.asp?mclass=<%=rs("vest_m")%>&sclass=<%=rs("vest_s")%>&id=<%=rs("id")%>">修改</a> | <a href="deltree.asp?mclass=<%=rs("vest_m")%>&sclass=<%=rs("vest_s")%>&id=<%=rs("id")%>">删除</a></td><%end if%>
	</tr><% i=i+1
			    if i>=MaxPerPage then exit do
			    rs.MoveNext   
        		loop
                %>
	</table>
	</form>
	<%end sub%>
  
  

  
  
  
 	</div>
</body>

</html>
<%  
function getfolderm()  
dim tmprs,tmpid,tmpsql
set tmprs=server.createobject("adodb.recordset")
tmpsql="Select * from mclass where mclass_id = "&mclass&" "
tmprs.open tmpsql,conn,1,1
getfolderm="<a target=mainFrame href=admin.asp>"&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="&nbsp;-&nbsp;<font color=#FF5B5B>"&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"">"&getfolderm()&"</a>"&getfolders()&"</font>&nbsp;|&nbsp;合计<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&"&sclass="&sclass&">第一页</a>&nbsp;" 
response.write "<a href="&filename&"?page="&CurrentPage-1&"&mclass="&mclass&"&sclass="&sclass&">前一页</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&"&sclass="&sclass&">" 
response.write "后一页</a>&nbsp;"   
  response.write "<a href="&filename&"?page="&n&"&mclass="&mclass&"&sclass="&sclass&">最后页</a>" 
  end if 
Response.Write "</td></tr></table></div>"
end function  
 set rs=nothing	


%>

⌨️ 快捷键说明

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