<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<!--#include file="../Inc/SK.PageClass.asp" -->
<%if Not (Getconfig("SK_Client")="0" AND (Session("Manager")="1" OR (JudgePopedomTF(Session("UserName"),"SK200000000") AND JudgePopedomTF(Session("UserName"),"SK200000108")))) then Call ReturnError()%>
<%
'Delete begin
if F("id")<>"" and RQ("Action")="Del" and (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000108")) then
str2=split(F("id"),",")
for i=0 to ubound(str2)
set rs=server.createobject("adodb.recordset")
sql="select * from SK_Client where SK_Del=0 and SK_Share=1 and SK_SalesID="&Session("UID")&" and ClientID="&trim(str2(i))
rs.open sql,Conn,1,3
if rs("SK_Del")=0 then
rs("SK_Del")=1
rs("SK_DelTime")=Now
rs("SK_DelUser")=Session("UID")
rs.Update
rs.close
Set rs=Nothing
end if
'Event Begin
if getconfig("SK_Event")=0 then
set rsEvent=server.createobject("adodb.recordset")
sqlEvent="select * from SK_SystemEvent"
rsEvent.open sqlEvent,conn,1,3
rsEvent.AddNew
rsEvent("SK_Title")="删除客户到回收站"
rsEvent("SK_User")=Session("UserName")
rsEvent("SK_Time")=Now()
rsEvent("SK_IP")=request.ServerVariables("Remote_Addr")
rsEvent("SK_Page")="SK.MyClient.asp"
rsEvent.Update
rsEvent.Close 
set rsEvent=Nothing
end if
'Event End
next
Call Returnokback()
end if
'Delete End

'NoShare begin
if F("id")<>"" and RQ("Action")="NoShare" and (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000102")) then
str2=split(F("id"),",")
for i=0 to ubound(str2)
set rs=server.createobject("adodb.recordset")
sql="select * from SK_Client where SK_Del=0 and SK_Share=1 and SK_SalesID="&Session("UID")&" and ClientID="&trim(str2(i))
rs.open sql,Conn,1,3
rs("SK_Share")=0
rs.Update
rs.close
Set rs=Nothing
'Event Begin
if getconfig("SK_Event")=0 then
set rsEvent=server.createobject("adodb.recordset")
sqlEvent="select * from SK_SystemEvent"
rsEvent.open sqlEvent,conn,1,3
rsEvent.AddNew
rsEvent("SK_Title")="取消共享客户信息"
rsEvent("SK_User")=Session("UserName")
rsEvent("SK_Time")=Now()
rsEvent("SK_IP")=request.ServerVariables("Remote_Addr")
rsEvent.Update
rsEvent.Close 
set rsEvent=Nothing
end if
'Event End
conn.execute("delete from SK_ShareClient where SK_ClientID in("&str2(i)&")")
next
Call Returnokback()
end if
'NoShare End
%>
<%
Set Page = new MyPages				'创建对象
Set Page.Conn = conn				'得到数据库连接对象
With Page
if Cint(F("PNum"))="" then
.PageSize=20		             '每页记录条数
else
.PageSize=Cint(F("PNum"))		'每页记录条数
end if
.PageParm = "P"					'页参数
'.PageIndex = 10				'当前页，可选参数，一般是生成静态时需要
.Database = "mssql"				'数据库类型,AC为access,MSSQL为sqlserver2000存储过程版,MYSQL为mysql,PGSQL为PostGreSql
.Table="SK_Client INNER JOIN SK_ShareClient ON SK_Client.ClientID=SK_ShareClient.SK_ClientID"
.Pkey="ClientID"			'主键
.Field="SK_Client.ClientID,SK_Client.SK_AreaID,SK_Client.SK_Di,SK_Client.SK_No,SK_Client.SK_Wname,SK_Client.SK_Jname,SK_Client.SK_SalesID,SK_Client.SK_Share"

'//搜索关键字开始
STime=F("STime")&" 00:00:00"
Etime=F("ETime")&" 23:59:59"

if F("AA")="1" AND F("Akey")<>"" then srt1=" AND SK_Client.SK_No Like '%"&F("Akey")&"%'"
if F("AA")="2" AND F("Akey")<>"" then srt1=" AND (SK_Client.SK_Wname Like '%"&F("Akey")&"%' OR SK_Client.SK_Jname Like '%"&F("Akey")&"%')"
if F("AA")="3" AND F("Akey")<>"" then srt1=" AND Datediff(day,SK_Client.SK_Atime,'"&F("Akey")&"')=0"
if F("AA")="4" AND F("Akey")<>"" then srt1=" AND (SK_Client.SK_Content Like '%"&F("Akey")&"%' OR SK_Client.SK_Status Like '%"&F("Akey")&"%' OR SK_Client.SK_Prospect Like '%"&F("Akey")&"%' OR SK_Client.SK_Plot Like '%"&F("Akey")&"%')"
if F("AA")="5" AND F("Akey")<>"" then srt1=" AND SK_SystemUsers.SK_Oname Like '%"&F("Akey")&"%'"

set RsField=server.createobject("adodb.recordset")
sqlField="SELECT * from SK_ClientFields where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsField.Open sqlField,conn,1,1
for Fieldi=5+1 to RsField.recordCount+5
if F("AA")=""&Fieldi&"" AND F("Akey")<>"" then srt1=" AND SK_Client."&RsField("SK_FieldName")&" Like '%"&F("Akey")&"%'"
RsField.movenext
next
RsField.close
set RsField=Nothing

if F("AreaID")<>"" then srt2=" AND SK_Client.SK_AreaID="&F("AreaID")&""
if F("STime")<>"" AND F("ETime")<>"" then srt3=" AND SK_Client.SK_Atime Between '"&STime&"' AND '"&Etime&"'"

set RsOption=Server.createobject("adodb.recordset")
sqlOption="SELECT * from SK_ClientOptions where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsOption.Open sqlOption,conn,1,1
if RsOption.recordcount>0 then
for U=1 to RsOption.recordcount
if U=1 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr1=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=2 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr2=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=3 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr3=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=4 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr4=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=5 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr5=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=6 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr6=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=7 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr7=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=8 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr8=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=9 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr9=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=10 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr10=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=11 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr11=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=12 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr12=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=13 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr13=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=14 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr14=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=15 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr15=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=16 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr16=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=17 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr17=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=18 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr18=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=19 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr19=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
elseif U=20 then
if F(""&RsOption("SK_FieldName")&"")<>"" then wstr20=" AND SK_Client."&RsOption("SK_FieldName")&"="&F(""&RsOption("SK_FieldName")&"")&""
end if
RsOption.movenext
next
end if
RsOption.close
Set RsOption=Nothing
'//搜索关键字结束

'//条件开始
.Condition="SK_Client.SK_Del=0 AND SK_Client.SK_Di=0 AND SK_Client.SK_Locked=0 AND SK_Client.SK_SalesID="&Session("UID")&""&srt1&""&srt2&""&srt3&""&wstr1&""&wstr2&""&wstr4&""&wstr5&""&wstr6&""&wstr7&""&wstr8&""&wstr9&""&wstr10&""&wstr11&""&wstr12&""&wstr13&""&wstr14&""&wstr15&""&wstr16&""&wstr17&""&wstr18&""&wstr19&""&wstr20&""
'//条件结束

'//指定排序条件开始
.OrderBy="SK_Client.ClientID Desc"

if F("BB")="0" AND F("PX")="1" then
.OrderBy="SK_Client.ClientID Asc"
elseif F("BB")="0" AND F("PX")="2" then
.OrderBy="SK_Client.ClientID Desc"
end if

if F("BB")="1" AND F("PX")="1" then
.OrderBy="SK_Client.SK_No Asc"
elseif F("BB")="1" AND F("PX")="2" then
.OrderBy="SK_Client.SK_No Desc"
end if

if F("BB")="2" AND F("PX")="1" then
.OrderBy="SK_Client.SK_Wname Asc"
elseif F("BB")="2" AND F("PX")="2" then
.OrderBy="SK_Client.SK_Wname Desc"
end if
'//指定排序条件结束

.RecordCount = 0	'总记录数，可以外部赋值，0不保存（适合搜索），-1存为session，-2存为cookies，-3存为applacation
.NumericJump = 3 '数字上下页个数，可选参数，默认为3，负数为跳转个数，0为显示所有
.Template = "总记录数：{$RecordCount} 总页数：{$PageCount} 每页记录数：{$PageSize} 当前页数：{$PageIndex} {$FirstPage} {$PreviousPage} {$NumericPage} {$NextPage} {$LastPage} {$InputPage} {$SelectPage}" '整体模板，可选参数，有默认值
.FirstPage = "首页" '可选参数，有默认值
.PreviousPage = "上一页" '可选参数，有默认值
.NextPage = "下一页" '可选参数，有默认值
.LastPage = "尾页" '可选参数，有默认值
.NumericPage = " {$PageNum} " '数字分页部分模板，可选参数，有默认值
End With
rs = Page.ResultSet() '记录集
rc = Page.RowCount() '可选，输出总记录数
nav = Page.Nav() '分页样式
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>我共享的客户</title>
<META http-equiv=Page-Enter content=SKCRM>
<META http-equiv=Page-Exit content=SKCRM>
<META content="MSHTML 6.00.3790.2858" name=GENERATOR>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="../Inc/Check.js"></script>
<script type="text/javascript" src="../Inc/Calendar.js"></script>
<script>
function sh(id)
{
 if (id==1)
 {
 {
 thisForm.target='_self';
 thisForm.action="?Action=Del";
 thisForm.submit();
 }
 }

 if (id==2)
 {
 {
 thisForm.target='_self';
 thisForm.action="?Action=NoShare";
 thisForm.submit();
 }
 } 
}

function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
</script>
<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x:hidden;
overflow-y:auto;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<TBODY>
  <tr>
    <td class="SK_Td_Top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="25"><img src="../images/tab_03.gif" width="12" height="25" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle">我共享的客户</td>
<td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
 <tr>
 <td>

</td>
 </tr>
</table></td>
</tr>
</table></td>
        <td width="16"><img src="../images/tab_07.gif" width="16" height="25" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
<td>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method="Get">
<tr>
<td background="../images/tab_12.gif"></td>
<td>
<select name="AA" size="1">
<option value="1" <%if RQ("AA")=1 then Response.Write("selected=""selected""")%>>客户编号</option>
<option value="2" <%if RQ("AA")=2 OR RQ("AA")="" then Response.Write("selected=""selected""")%>>客户名称</option>
<option value="3" <%if RQ("AA")=3 then Response.Write("selected=""selected""")%>>录入日期</option>
<option value="4" <%if RQ("AA")=4 then Response.Write("selected=""selected""")%>>客户备注</option>
<option value="5" <%if RQ("AA")=5 then Response.Write("selected=""selected""")%>>业务人员</option>
<%
set RsFields=server.createobject("adodb.recordset")
sqlFields="SELECT * from SK_ClientFields where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsFields.Open sqlFields,conn,1,1
for Fieldsi=5+1 to RsFields.recordCount+5
%>
<option value="<%=Fieldsi%>" <%if RQ("AA")=""&Fieldsi&"" then Response.Write("selected=""selected""")%>><%=RsFields("SK_Title")%></option>
<%
RsFields.movenext
next
RsFields.close
set RsFields=Nothing
%>
</select> 
<input name="Akey" type="text" value="<%=F("Akey")%>" size="15">
 排序
<select name="BB" size="1">
<option value="0" <%if RQ("BB")=0 then Response.Write("selected=""selected""")%>>录入日期</option>
<option value="1" <%if RQ("BB")=1 OR RQ("BB")="" then Response.Write("selected=""selected""")%>>客户编号</option>
<option value="2" <%if RQ("BB")=2 then Response.Write("selected=""selected""")%>>客户名称</option>
</select>
<select name="PX" size="1">
<option value="2" <%if RQ("PX")=2 then Response.Write("selected=""selected""")%>> 降序</option>
<option value="1" <%if RQ("PX")=1 then Response.Write("selected=""selected""")%>> 升序</option>
</select>
 每页显示
<select name="PNum" size="1">
<option value="20" <%if RQ("PNum")=20 then Response.Write("selected=""selected""")%>>20</option>
<option value="25" <%if RQ("PNum")=25 then Response.Write("selected=""selected""")%>>25</option>
<option value="30" <%if RQ("PNum")=30 then Response.Write("selected=""selected""")%>>30</option>
<option value="40" <%if RQ("PNum")=40 then Response.Write("selected=""selected""")%>>40</option>
<option value="50" <%if RQ("PNum")=50 then Response.Write("selected=""selected""")%>>50</option>
<option value="60" <%if RQ("PNum")=60 then Response.Write("selected=""selected""")%>>60</option>
<option value="80" <%if RQ("PNum")=80 then Response.Write("selected=""selected""")%>>80</option>
<option value="100" <%if RQ("PNum")=100 then Response.Write("selected=""selected""")%>>100</option>
<option value="120" <%if RQ("PNum")=120 then Response.Write("selected=""selected""")%>>120</option>
<option value="150" <%if RQ("PNum")=150 then Response.Write("selected=""selected""")%>>150</option>
<option value="200" <%if RQ("PNum")=200 then Response.Write("selected=""selected""")%>>200</option>
<option value="300" <%if RQ("PNum")=300 then Response.Write("selected=""selected""")%>>300</option>
<option value="400" <%if RQ("PNum")=400 then Response.Write("selected=""selected""")%>>400</option>
<option value="500" <%if RQ("PNum")=500 then Response.Write("selected=""selected""")%>>500</option>
<option value="600" <%if RQ("PNum")=600 then Response.Write("selected=""selected""")%>>600</option>
<option value="800" <%if RQ("PNum")=800 then Response.Write("selected=""selected""")%>>800</option>
<option value="1000" <%if RQ("PNum")=1000 then Response.Write("selected=""selected""")%>>1000</option>
<option value="2000" <%if RQ("PNum")=2000 then Response.Write("selected=""selected""")%>>2000</option>
<option value="5000" <%if RQ("PNum")=5000 then Response.Write("selected=""selected""")%>>5000</option>
<option value="10000" <%if RQ("PNum")=10000 then Response.Write("selected=""selected""")%>>10000</option>
</select>
<input type="submit" name="go" value="查询" class="button1" /> 
<span id="followImg1" style="CURSOR: hand" onClick="loadThreadFollow(1,5)">高级查询</span>
</td>
<td background="../images/tab_15.gif"></td>
</tr>
<tr style="display:none" id="follow1">
<td background="../images/tab_12.gif"></td>
<td>所在区域 <select name="AreaID">
<option value="" <%if RQ("AreaID")="0" OR RQ("AreaID")="" then Response.Write("selected=""selected""")%>>--可选择--</option>
<%
dim arrShowLine(10)
for U=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
dim sqlArea,rsArea,U,UDepth
sqlArea="select * From SK_SystemArea order by RootID,OrderID"
set rsArea=server.CreateObject("adodb.recordset")
rsArea.open sqlArea,conn,1,1
do while not rsArea.eof 
%>
<option value="<%=rsArea("AreaID")%>" <%if RQ("AreaID")=""&rsArea("AreaID")&"" then Response.Write("selected=""selected""")%>>
<% 
UDepth=rsArea("Depth")
if rsArea("NextID")>0 then
arrShowLine(UDepth)=True
else
arrShowLine(UDepth)=False
end if
if UDepth>0 then
  for U=1 to UDepth 
if U=UDepth then 
if rsArea("NextID")>0 then 
response.write "─" 
else 
response.write "─" 
end if 
else 
if arrShowLine(U)=True then
response.write "─" 
else
response.write "─" 
end if
end if 
  next 
  end if 
  if rsArea("Child")>0 then 
  response.write "" 
  else 
  response.write "─" 
  end if 
  if rsArea("Depth")=0 then 
  end if 
  response.write ""&rsArea("AreaName")&""
%>
</option>
<% 
rsArea.movenext 
loop
rsArea.Close
Set rsArea=Nothing
%>
</select> 
新增日期：
<input name="STime" type="text" size="12" onClick="new Calendar().show(this);" value="<%=RQ("STime")%>" readOnly /> 至 <input name="ETime" type="text" size="12" onClick="new Calendar().show(this);" value="<%=RQ("ETime")%>" readOnly />
<br>
<%
'自定义选项开始
set RsOptions=server.createobject("adodb.recordset")
sqlOptions="SELECT * from SK_ClientOptions where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsOptions.Open sqlOptions,conn,1,1
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
for Optionsi=1 to RsOptions.recordCount '变量i从1循环到数据库中的全部记录数 
if (Optionsi mod 5 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"">"&RsOptions("SK_Title")&"</td><td class=""SK_Text1""><select name="""&RsOptions("SK_FieldName")&""">"

Set rsOptionsDetail=Server.CreateObject("ADODB.RecordSet") 
sqlOptionsDetail="SELECT * from SK_ClientOptionsDetail where SK_OptionsID="&RsOptions("FieldID")&"" 
rsOptionsDetail.Open sqlOptionsDetail,conn,1,1
%>
<option name="<%=RsOptions("SK_FieldName")%>" value="" <%if RQ(""&RsOptions("SK_FieldName")&"")="0" OR RQ(""&RsOptions("SK_FieldName")&"")="" then Response.Write("selected=""selected""")%>>--可选择--</option>
<%
do while not rsOptionsDetail.eof
%>
<option value="<%=rsOptionsDetail("OptionsDetailID")%>" <%if RQ(""&RsOptions("SK_FieldName")&"")=""&rsOptionsDetail("OptionsDetailID")&"" then Response.Write("selected=""selected""")%>><%=rsOptionsDetail("SK_OName")%></option>
<%
rsOptionsDetail.movenext
loop
rsOptionsDetail.close
set rsOptionsDetail=Nothing

Response.write"</select></td>"
if (Optionsi mod 5 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsOptions.movenext 
next 
Response.write"</table>"
RsOptions.close
set RsOptions=Nothing
'自定义选项结束
%>
</td>
  <td background="../images/tab_15.gif"></td>
</tr>
</form>

<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>
<%
If IsNull(Rs) Then
response.write"对不起，没有你要的信息!"
else
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
<form name="thisForm" id="form1" method="post" action="">	  
<tr>
<td width="3%" class="SK_Title"><input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0" /></td>
<td width="10%" class="SK_Title">客户编号</td>
<td width="28%" class="SK_Title">客户名称</td>
<td width="45%" class="SK_Title">最新跟进</td>
<td width="10%" class="SK_Title">业务人员</td>
<td width="4%" class="SK_Title">修改</td>
</tr>
<%For i=0 To Ubound(Rs,2)%>
<tr onMouseOver="changeto()" onMouseOut="changeback()">
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><input type="checkbox" name="ID" value="<%=Rs(0,i)%>" style="border:0"></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><%=Rs(3,i)%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text1"<%else%>class="SK_Text1two"<%end if%>><a href="javascript:void(0)" onClick="javascript:var win=window.open('SK.ReClient.asp?id=<%=Rs(0,i)%>','Read','width=820,height=400,top=170,left=161,center:yes,status:no,help:no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes'); win.focus()"><font color=red><%=Rs(4,i)%></font></a></td>
<td <%if i mod 2 = 0 then%>class="SK_Text1"<%else%>class="SK_Text1two"<%end if%>><%
set RsFollow=server.createobject("adodb.recordset")
RsFollow.open "SELECT top 1 * from SK_Follow where SK_ClientID="&Rs(0,i)&" and SK_Del=0 Order by FollowID desc",conn,1,1
If Not RsFollow.eof Then
%>
<a href="javascript:void(0)" onClick="javascript:var win=window.open('SK.ReFollow.asp?id=<%=RsFollow("FollowID")%>','ReadFollow','width=820,height=400,top=170,left=161,center:yes,status:no,help:no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes'); win.focus()" title="跟进日期:<%=split(RsFollow("SK_Ftime"))(0)%>&#13;创建时间:<%=RsFollow("SK_AFollowtime")%>"><%=left(RsFollow("SK_Ftitle"),13)%>...</a> <%if RsFollow("SK_Di")=0 then%><font color=blue>[计划跟进]</font><%else%><font color=Green>[已经跟进]</font><%end if%>
<%
end if
RsFollow.close
RsFollow=Nothing
%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><%
set RsFuser=server.createobject("adodb.recordset")
SqlFuser="select * from SK_SystemUsers where UsersID="&Rs(6,i)&""
RsFuser.open SqlFuser,conn,1,1
Response.write"<font color=#999999>"&RsFuser("SK_OName")&"</font>"
RsFuser.close
RsFuser=Nothing
%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>>
<%
if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000102") then
Response.write"<a href=""javascript:void(0)"" onClick=""javascript:var win=window.open('SK.ModClient.asp?id="&Rs(0,i)&"','Mod','width=820,height=400,top=170,left=161,center:yes,status:no,help:no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes'); win.focus()""><img src=""../images/mod.gif"" /></a>"
else
Response.write"<img src=""../images/nomod.gif"">"
end if
%>
</td>
</tr>
<%next%>
</form>
<%if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000103") OR JudgePopedomTF(Session("UserName"),"SK200000108") then%>
<tr>
<td colspan="6" class="SK_Text">
<%if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000103") then%>
<input type="button" name="Del" value="删除" class="button1" onClick="if (confirm('温馨提示:删除后的数据将放入客户回收站,是否要继续?')){sh(1)}" />
<%end if%>
<%if Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK200000102") then%>
<input type="button" name="NoShare" value="不共享" class="button1" onClick="if (confirm('温馨提示:不共享客户信息时其他人看不到此信息,是否继续?')){sh(2)}" />
<%end if%>
</td>
</tr>
<%end if%>
<tr><td colspan="6" class="SK_Text"><%Response.Write nav%></td></tr>
</table>
<%
end if
%>
</td>
<td width="8" background="../images/tab_15.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="SK_Td_Foot">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20"><img src="../images/tab_18.gif" width="12" height="20" /></td>
<td width="98%" class="SK_Td_Page"></td>
<td width="1%"><img src="../images/tab_20.gif" width="16" height="20" /></td>
</tr>
</table>

</td>
</tr>
</TBODY>
</table>
</body>
<%
Page = Null
Set Page = Nothing
Call CloseDB()
%>
</html>