<%
sqlStr="Select id,cs_code,cs_from,cs_country,cs_type,cs_deal,cs_addtime,cs_tel,cs_email,cs_whatsapp,cs_wechat,cs_linkedin,cs_facebook,cs_alibaba,colortag,cs_note,cs_claimFrom From customer Where (cs_alibaba='' and (cs_code like '%阿里%' or cs_code like '%1688%') and cs_belong="&Session("employee_id")&" ) or (cs_from=8 and cs_wechat='' and cs_belong="&Session("employee_id")&") Order By colortag DESC,id Desc"
Rs.Open sqlStr ,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then
Rs.PageSize = 20
If Page = "" Then Page = 1
If Page = "end" Then Page = Rs.PageCount
If Not IsNumeric(Page) Or Page < 1 Then Page = 1
Page = Cint(Page)
If Page > Rs.PageCount Then Page = Rs.PageCount
Rs.AbsolutePage = Page
TempNum = Rs.PageSize * (Page - 1)
Set Rs1=Server.CreateObject("ADODB.RecordSet")
For i=1 To Rs.PageSize
If Rs.Bof Or Rs.Eof Then Exit For
TempNum=TempNum+1:classid=Rs(1)
%>
<%Rs1.Open "select ch_name from qudao where id="&Rs("cs_from")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("ch_name")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%Rs1.Open "select countryName from country where id="&Rs("cs_country")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("countryName")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%Rs1.Open "select businessType from clientType where id="&Rs("cs_type")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("businessType")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%If Rs("cs_deal")=3 then
response.write "成交"
elseif Rs("cs_deal")=2 then
Response.write "明确需求"
elseif Rs("cs_deal")=1 then
Response.write "背景调查"
else
Response.write "无响应"
End IF
%>
<%
If Rs.PageCount > 1 Then
PageName="?Keys="&Keys&urlStr&"&"
Pagelen=3
If Page>1 Then
Response.Write "首页"
Response.Write "上一页"
End If
If Pagelen*2+1 >= Rs.PageCount Then
StartPage=1:EndPage=Rs.PageCount
Else
If Page<=Pagelen+1 Then
StartPage=1
EndPage=Pagelen*2+1
Else
StartPage=Page-Pagelen
EndPage=Page+Pagelen
End If
If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
End If
For i = StartPage To EndPage
If i = Page Then
Response.Write ""&i&""
Else
Response.Write ""&i&""
End If
Next
If Page Pagelen Then Response.Write "..."&Rs.PageCount&""
Response.Write "下一页"
Response.Write "尾页"
End If
End If
%>