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

📄 all_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





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">
   
  
  
 <%
    keyword=request("keyword")
  w=request("w")
  if w="" then com="(name+city+zhiwu+mobile+fax+homephone+email+oicq+msn+kongzhi+content) like '%"& keyword &"%'" end if
  if w="1" then com="(name+city+zhiwu+mobile+fax+homephone+email+oicq+msn+kongzhi+content) like '%"& keyword &"%'" end if
  if w="2" then com=" name like'%"& keyword &"%'" end if
  if w="3" then com=" city like'%"& keyword &"%'" end if
  if w="4" then com=" zhiwu like'%"& keyword &"%'" end if
  if w="5" then com="(mobile+fax+homephone) like'%"& keyword &"%'" end if
  if w="6" then com=" email like'%"& keyword &"%'" end if          
  if w="7" then com=" kongzhi like'%"& keyword &"%'" end if
   if w="8" 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("cust_s")<>"" then 
 sql="select * from cust_user where "&com&" and cust_s = "&Request("cust_s")&" and vest_m ="&session("dd")&" order by id desc;"
   else 
   sql="select * from cust_user  where "&com&" and vest_m ="&mclass&" order by id desc;" 
   end if 
   
   else
   
      if Request("cust_s")<>"" then 
 sql="select * from cust_user where "&com&" and cust_s = "&Request("cust_s")&" and kongzhi='"&session("name")&"' and vest_m ="&session("dd")&" order by id desc;"
   else 
   sql="select * from cust_user  where "&com&" and vest_m ="&mclass&" and 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 
   %>
<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,"all_userlist.asp" 

  else 
			if (currentPage-1)*MaxPerPage<totalPut then 
				rs.move  (currentPage-1)*MaxPerPage 
				dim bookmark 
				bookmark=rs.bookmark
		
						 showContent 
				showpage totalput,MaxPerPage,"all_userlist.asp" 
				else 
				currentPage=1 
		
				  showContent 
			 showpage totalput,MaxPerPage,"all_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="table2" cellspacing="0" cellpadding="0">
		<tr>
			<td width="254"> </td>
			<td> </td>
		</tr>
		<tr>
			<td width="254">联系人信息</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="all_userlist.asp?mclass=<%=session("dd")%>&w=1&keyword=">模糊搜索</option>
	<option value="all_userlist.asp?mclass=<%=session("dd")%>&w=2&keyword=">搜索人名</option>
	<option value="userlist.asp?mclass=<%=session("dd")%>&y=2&keyword=">搜索单位</option>
	<option value="all_userlist.asp?mclass=<%=session("dd")%>&w=3&keyword=">搜索部门</option>
	<option value="all_userlist.asp?mclass=<%=session("dd")%>&w=4&keyword=">搜索职务</option>
    <option value="all_userlist.asp?mclass=<%=session("dd")%>&w=5&keyword=">搜索电话</option>
    <option value="all_userlist.asp?mclass=<%=session("dd")%>&w=6&keyword=">搜索邮件</option>
    <option value="all_userlist.asp?mclass=<%=session("dd")%>&w=7&keyword=">录入人名</option>
    <option value="all_userlist.asp?mclass=<%=session("dd")%>&w=8&keyword=">录入时间</option>
	</select> 
	<input type="submit" value="搜索" name="button"  ></td>
		</tr>
		<tr>
			<td width="254"> </td>
			<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="5%" bgcolor="#EBEBEB" height="25" align="center">性别</td>
		<td width="15%" 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>
			<%if session("chayue")="0" then%>
			
			<td width="10%" bgcolor="#EBEBEB" height="25" align="center">重要度</td>
		<td width="13%" bgcolor="#EBEBEB" height="25" align="center">录入人</td>
		
			<%else%>
		<td width="16%" bgcolor="#EBEBEB" height="25" align="center">电子邮件</td>
		<td width="7%" bgcolor="#EBEBEB" height="25" align="center">重要度</td>
				<%end if%>
		
		<%if session("quanxian")>=2 then%><td width="19%" 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
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=all_views.asp?id=<%=rs("id")%>&cust=<%=rs("cust_s")%>><%=rs("name")%><%=zw%></a></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="15%" bgcolor="#FFFFFF" height="25" align="center"><%	
		comid=rs("cust_s")
     	dim foldersql,folderrs,rsclass
     	rsclass=Request("sclass")
     	set folderrs=server.createobject("adodb.recordset")    
		       foldersql="select * from customer where id="&comid&" and vest_m ="&session("dd")&" "   
		    folderrs.open foldersql,conn,1,1 
		   
		   


 response.write folderrs("com_name") 
  

    folderrs.close
    set folderrs=nothing
%>
</td>
		

		<td width="8%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("city")%></td>
		
		
		
		<td width="15%" bgcolor="#FFFFFF" height="25" align="center"><%
		
		if rs("homephone") ="未知或无" and rs("mobile") ="未填"  then response.write "未知或无" end if
		if rs("homephone") ="未知或无" and rs("mobile") <>"未填" then response.write rs("mobile") end if
        if rs("homephone") <>"未知或无" and rs("mobile") ="未填" then response.write rs("homephone") end if
        if rs("homephone") <>"未知或无" and rs("mobile") <>"未填" then response.write rs("mobile") end if
		
		
		%></td>
		
<%if session("chayue")="0" then%>
			<td width="10%" bgcolor="#FFFFFF" height="25" align="center"><%=zy%></td>
			<td width="13%" bgcolor="#FFFFFF" height="25" align="center"><%=rs("kongzhi")%></td>
			<%else%>
		<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="7%" bgcolor="#FFFFFF" height="25" align="center"><%=zy%></td>
		<%end if%>

		
		<%if session("quanxian")>=2 then%><td width="19%" bgcolor="#FFFFFF" height="25" align="center"><a target="_self" href="all_views.asp?id=<%=rs("id")%>&cust=<%=rs("cust_s")%>">详细</a> | 
		<a target="_self" href="add_edit.asp?id=<%=rs("id")%>&cust=<%=rs("cust_s")%>">修改</a> | <a href="all_deltree.asp?mclass=<%=rs("vest_m")%>&id=<%=rs("id")%>&cust=<%=rs("cust_s")%>">删除</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=all_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 + -