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

📄 sk_crm_client_list.asp

📁 为你节约成本,让你的企业在信息时代助上一臂之力!!! 真正做到无纸办公,全自动化信息办公,不受地点的限制,只要你能上网就能随时随地掌握公司动向.
💻 ASP
字号:
<!--#include file="conn.asp" --> 
<%
dim filename,download
SK_mclass=request("SK_mclass")
SK_sclass=request("SK_sclass")
dd=session("dd")

if session("name")="" or session("dd")=""  or int(dd)<>int(SK_mclass) then
Response.Write("<script>alert(""非法登陆,请确认密码的正确性!\n或者已经被管理员锁定!"");history.back();</script>")
response.end
end if

filename="SK_CRM_client_list.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 SK_mclass="" then
SK_mclass="1"
end if

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.2993" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0">
<LINK href="images/style.css" type=text/css rel=stylesheet>

<TABLE cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
  <TR>
    <TD class=td>
<DIV align=left>&nbsp;您现在的位置:CRM &gt;&gt; 公司管理 &gt;&gt; 公司列表</DIV></TD></TR></TBODY></TABLE>
<TABLE borderColor=#ffffff cellSpacing=0 borderColorDark=#ffffff cellPadding=3 width="100%" borderColorLight=#dfdfdf border=1>
  <TBODY>
  <TR>
    <TD height=30><B>
<%
dim com
keyword=request("keyword")
y=request("y")
if y="" then com="(com_name+com_diqu+com_address+com_email+com_phone+com_fuzeren+com_kongzhi+time) like '%"& keyword &"%'" end if
  if y="1" then com="(com_name+com_diqu+com_address+com_emai+com_phonel+com_fuzeren+com_kongzhi+time) like '%"& keyword &"%'" end if
  if y="2" then com=" com_name like'%"& keyword &"%'" end if
  if y="3" then com=" com_diqu like'%"& keyword &"%'" end if
  if y="4" then com=" com_address like'%"& keyword &"%'" end if
  if y="6" then com=" com_phone like'%"& keyword &"%'" end if          
  if y="7" then com=" com_email 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,zm,m
      if session("chayue")="0" then
   
   if Request("SK_sclass")<>"" then 
 sql="select * from SK_customer where "&com&" and vest_s = "&Request("SK_sclass")&"and vest_m ="&session("dd")&" order by com_name asc;"
   else 
   sql="select * from SK_customer where "&com&" and  vest_m ="&SK_mclass&" order by com_name asc;" 

   end if 
   
   else
   
    if Request("SK_sclass")<>"" then 
 sql="select * from SK_customer where "&com&" and vest_s = "&Request("SK_sclass")&"and vest_m ="&session("dd")&" and com_kongzhi ='"&session("name")&"' order by com_name asc;"
   else 
   sql="select * from SK_customer where "&com&" and vest_m ="&SK_mclass&" and com_kongzhi ='"&session("name")&"' order by com_name asc;" 
   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,"SK_CRM_client_list.asp" 

  else 
			if (currentPage-1)*MaxPerPage<totalPut then 
				rs.move  (currentPage-1)*MaxPerPage 
				dim bookmark 
				bookmark=rs.bookmark
		
						 showContent 
				showpage totalput,MaxPerPage,"SK_CRM_client_list.asp" 
				else 
				currentPage=1 
		
				  showContent 
			 showpage totalput,MaxPerPage,"SK_CRM_client_list.asp" 
			end if 
 end if 
   rs.close 
   end if 

   set rs=nothing  
   sub showContent 
  dim i 
 i=0
 %>
 
 公司列表<%if session("quanxian")>=2 then%> - <A target="main" HREF="SK_CRM_client_add.asp?SK_mclass=<%=session("dd")%>">增加新公司</a><%end if%> </B></TD>
  </TR>
 <form onSubmit="window.location=this.field.options[this.field.selectedIndex].value+this.keyword.value; return false;">
  <TR>
    <TD height=30>
	<table width="90%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="6%">搜索:		</td>
        <td width="25%"><input  type="text" name="keyword" onFocus='this.select();' style="padding: 1px" size="30"></td>
        <td width="9%"><select name="field" size="1">
	<option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&w=1&keyword=">模糊搜索</option>
	<option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&w=2&keyword=">搜索公司</option>
	<option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&y=4&keyword=">搜索地址</option>
	<option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&w=6&keyword=">搜索电话</option>
    <option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&w=7&keyword=">搜索邮件</option>
    <option value="SK_CRM_client_list.asp?SK_mclass=<%=session("dd")%>&w=9&keyword=">录入时间</option>
	</select>	</td>
        <td width="60%"><input type="submit" value=" 搜索 " name="button" /></td>
      </tr>
    </table></TD>
  </TR></form>
  <TR>
    <TD height=20>
<form id="form1" name="thisForm"  method="post" action="">
<TABLE borderColor=#ffffff borderColorDark=#ffffff borderColorLight=#dfdfdf cellSpacing=0 cellPadding=3 width="100%" border=1>
        <TBODY>
       	<tr>
		<td width="22%" height="25" align="center" bgcolor="e6e6e6" style="cursor: hand">公司名称</td>
		<!--
		<td width="7%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">所在地区</td>
		-->
		<td width="13%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">联系人</td>
		
		
		<td width="13%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">E-mail</td>
		<%if session("chayue")="0" then%>
		<td width="6%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">重要</td>
		<td width="8%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">录入人</td>
		<%else%>
		<td  width="12%" align="center" bgcolor="e6e6e6" style="cursor: hand">电话</td>
		<td  width="5%" height="25" align="center" bgcolor="e6e6e6" style="cursor: hand">重要</td>
		<%end if%>

		
		<%if session("quanxian")>=2 then%>
		<td width="18%" height="25" align="center" bgcolor="e6e6e6"  style="cursor: hand">操作</td>
		<td width="3%" align="center" bgcolor="e6e6e6"  style="cursor: hand">选</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
   %>        
	<tr>
		<td width="22%" height="25"><a href=SK_CRM_client_detail.asp?SK_mclass=<%=rs("vest_m")%>&SK_sclass=<%=rs("vest_s")%>&cust_s=<%=rs("id")%> target="_self" ><%=rs("com_name")%></a></td>
		<!--

		<td width="7%" height="25" align="center"><%=rs("com_diqu")%></td>
          -->
		<td width="13%" height="25"><%=rs("com_fuzeren")%></td>
				
		<td width="13%" height="25"><% if rs("com_email")="blank@chinadram.com" then
		com_email="<font color=#FF0000>暂无</font>"
	    else %>
		
<a href="mailto:<%=rs("com_email")%>"><%=rs("com_email")%></a>
<%end if%>
</td>
		<%if session("chayue")="0" then%>
		<td width="6%" height="25" align="center"><%=zy%></td>
		<td width="8%" height="25" align="center"><a href="SK_CRM_print_list.asp?SK_mclass=78&w=8&keyword=<%=rs("com_kongzhi")%>" target="_blank"><%=rs("com_kongzhi")%></a></td>
		<%else%>
		<td width="12%" height="25" align="center"><%=rs("com_phone")%></td>
		<td width="5%" height="25" align="center"><%=zy%></td>
        <%end if%>
	
		

		
		<%if session("quanxian")>=2 then%><td width="18%" height="25" align="center"><a href=SK_CRM_client_detail.asp?SK_mclass=<%=rs("vest_m")%>&SK_sclass=<%=rs("vest_s")%>&cust_s=<%=rs("id")%> target="_self" >详细</a> | 
		<a target="_self" href="SK_CRM_client_edit.asp?SK_mclass=<%=rs("vest_m")%>&SK_sclass=<%=rs("vest_s")%>&id=<%=rs("id")%>">修改</a>
		</td>
		<td width="3%" height="25" align="center"><input name="id" type="checkbox" id="id" value="<%=rs("id")%>" /></td>
		<%end if%>
	</tr>
	<% i=i+1
	if i>=MaxPerPage then exit do
	rs.MoveNext   
    loop
    %>
	<tr>
	  <td height="25" colspan="12" align="right">
<%if session("quanxian")>2 then%>
<input onclick=javascript:showoperatealert(1) type="submit" value=" 删除客户 " name="B1" style="color: #FF0000">
<input name="chkall" type="checkbox" id="chkall" value="all" onClick="CheckAll(this.form)" /> 全选
<%end if%>
</td>
</tr>
<script language="javascript">
function CheckAll(form) 
{ 
for (var i=0;i<form.elements.length;i++) 
{ 
var e = form.elements[i]; 
if (e.name != 'chkall') 
e.checked = form.chkall.checked; 
} 
} 
</script>

<SCRIPT language=JavaScript>
function showoperatealert(id)
{
		if (id==1)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="SK_CRM_client_del.asp";
			thisForm.submit();
		}
		}	
		
		
}

//-->
</SCRIPT>

	<tr>
	  <td height="25" colspan="12"><%end sub%></td>
	  </tr>
      </TBODY></TABLE>
	</form>
    </TD></TR>
</TBODY></TABLE>
</TD></TR></TABLE>
</BODY></HTML>


<%  

'分页代码开始部分
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 color=#008000><b>"&totalnumber&"</b></font> 个公司</td><td width=""50%"" valign=middle>"
	Response.Write "<font 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&SK_mclass="&SK_mclass&"&SK_sclass="&SK_sclass&"&keyword="&keyword&">第一页</a>&nbsp;" 
response.write "<a href="&filename&"?page="&CurrentPage-1&"&SK_mclass="&SK_mclass&"&SK_sclass="&SK_sclass&"&keyword="&keyword&">前一页</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&"&SK_mclass="&SK_mclass&"&SK_sclass="&SK_sclass&"&keyword="&keyword&">" 
response.write "后一页</a>&nbsp;"
  response.write "<a href="&filename&"?page="&n&"&SK_mclass="&SK_mclass&"&SK_sclass="&SK_sclass&"&keyword="&keyword&">最后页</a>" 
  end if
Response.Write "</td></tr></table></div>"
end function
 set rs=nothing
%>

⌨️ 快捷键说明

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