<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" -->
<%if Not (Getconfig("SK_Client")="0" AND (Session("Manager")="1" OR (JudgePopedomTF(Session("UserName"),"SK200000000") AND JudgePopedomTF(Session("UserName"),"SK200000200")))) then Call ReturnError()%>
<%
if not isnumeric(JCID(F("ID"))) then Call ReturnError10()
set rs=server.createobject("adodb.recordset")
if Session("Manager")=1 or Session("Manager")=2 then
sql="SELECT * from SK_LinkMan where LinkmanID="&JCID(F("ID"))&""
elseif Session("Manager")=3 then
sql="SELECT * from SK_Linkman INNER JOIN SK_Client ON SK_Linkman.SK_ClientID=SK_Client.ClientID INNER JOIN SK_SystemUsers ON SK_Client.SK_SalesID=SK_SystemUsers.UsersID where SK_SystemUsers.SK_Dept1="&Session("Dept1")&" and SK_Linkman.LinkmanID="&JCID(F("ID"))&""
elseif Session("Manager")=4 then
sql="SELECT * from SK_Linkman INNER JOIN SK_Client ON SK_Linkman.SK_ClientID=SK_Client.ClientID INNER JOIN SK_SystemUsers ON SK_Client.SK_SalesID=SK_SystemUsers.UsersID where SK_SystemUsers.SK_Dept1="&Session("Dept1")&" and SK_SystemUsers.SK_Dept2="&Session("Dept2")&" and SK_Linkman.LinkmanID="&JCID(F("ID"))&""
elseif Session("Manager")=5 then
sql="SELECT * from SK_Linkman INNER JOIN SK_Client ON SK_Linkman.SK_ClientID=SK_Client.ClientID INNER JOIN SK_SystemUsers ON SK_Client.SK_SalesID=SK_SystemUsers.UsersID where SK_SystemUsers.SK_Dept1="&Session("Dept1")&" and SK_SystemUsers.SK_Dept2="&Session("Dept2")&" and SK_SystemUsers.SK_Dept3="&Session("Dept3")&" and SK_Linkman.LinkmanID="&JCID(F("ID"))&""
elseif Session("Manager")=6 then
sql="SELECT * from SK_LinkMan where SK_SalesID="&Session("UID")&" and LinkmanID="&JCID(F("ID"))&""
end if
rs.Open sql,conn,1,1
if rs.eof and rs.bof then Call ReturnError4()
'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
%>
<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 language="javascript" src="../Inc/Check.js"></script>
<script language="javascript" src="../Inc/Calendar.js"></script>
<script language="javascript" src="../Inc/jquery.js"></script>
<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x: hidden;
}
-->
</style>
</head>
<body>
<table width="99%" 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%"></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">
<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
<tr>
  <td colspan="6" class="SK_Title1">基本资料</td>
</tr>

<tr>
  <td width="11%" class="SK_Text2">关联客户</td>
  <td colspan="5" class="SK_Text1">
<%
set rsClient=server.createobject("adodb.recordset")
sqlClient="select * from SK_Client where ClientID="&Rs("SK_ClientID")&""
rsClient.open sqlClient,conn,1,1
if rsClient.eof and rsClient.bof then Call ReturnError12()
Response.write""&RsClient("SK_Wname")&""
RsClient.close
Set RsClient=Nothing
%></td>
</tr>

<tr>
<td class="SK_Text2">姓　　名</td>
<td width="21%" class="SK_Text1"><%=Rs("SK_LName")%></td>
<td width="11%" class="SK_Text2">性　　别</td>
<td width="23%" class="SK_Text1"><%if Rs("Sex")="1" then Response.write"男" else Response.write"女" end if%></td>
<td width="11%" class="SK_Text2">年　　龄</td>
<td width="23%" class="SK_Text1"><%=Rs("SK_Age")%></td>
</tr>
<tr>
<td class="SK_Text2">生　　日</td>
<td class="SK_Text1"><%=Rs("SK_Birthday")%></td>
<td class="SK_Text2">部　　门</td>
<td class="SK_Text1"><%=Rs("SK_LDept")%></td>
<td class="SK_Text2">职　　务</td>
<td class="SK_Text1"><%=Rs("SK_LJob")%></td>
</tr>
<tr>
<td class="SK_Text2">办公电话</td>
<td class="SK_Text1"><%=Rs("SK_Tel")%></td>
<td class="SK_Text2">传　　真</td>
<td class="SK_Text1"><%=Rs("SK_Fax")%></td>
<td class="SK_Text2">手　　机</td>
<td class="SK_Text1"><%=Rs("SK_Mobile")%></td>
</tr>
<tr>
  <td class="SK_Text2">家庭电话</td>
  <td class="SK_Text1"><%=Rs("SK_Phone")%></td>
  <td class="SK_Text2">电子邮件</td>
  <td class="SK_Text1"><%=Rs("SK_Email")%></td>
  <td class="SK_Text2">备用手机</td>
  <td class="SK_Text1"><%=Rs("SK_Mobile1")%></td>
</tr>
<tr>
  <td class="SK_Text2">腾讯   QQ</td>
  <td class="SK_Text1"><%=Rs("SK_QQ")%></td>
  <td class="SK_Text2">Msn</td>
  <td class="SK_Text1"><%=Rs("SK_OfficeMsn")%></td>
  <td class="SK_Text2">ICQ</td>
  <td class="SK_Text1"><%=Rs("SK_ICQ")%></td>
</tr>
<tr>
  <td class="SK_Text2">家庭地址</td>
  <td colspan="3" class="SK_Text1"><%=Rs("SK_Address")%></td>
  <td class="SK_Text2">邮　　编</td>
  <td class="SK_Text1"><%=Rs("SK_Code")%></td>
</tr>

<tr>
  <td colspan="6" class="SK_Title1">详细资料</td>
</tr>

<tr>
  <td class="SK_Text2">学　　历</td>
  <td class="SK_Text1"><%=Rs("SK_Above")%></td>
  <td class="SK_Text2">学　　位</td>
  <td class="SK_Text1"><%=Rs("SK_Degree")%></td>
  <td class="SK_Text2">专　　业</td>
  <td class="SK_Text1"><%=Rs("SK_Major")%></td>
</tr>
<tr>
  <td class="SK_Text2">毕业院校</td>
  <td class="SK_Text1"><%=Rs("SK_School")%></td>
  <td class="SK_Text2">籍　　贯</td>
  <td class="SK_Text1"><%=Rs("SK_Native")%></td>
  <td class="SK_Text2">民　　族</td>
  <td class="SK_Text1"><%=Rs("SK_Nation")%></td>
</tr>
<tr>
  <td class="SK_Text2">身　　高</td>
  <td class="SK_Text1"><%=Rs("SK_Height")%></td>
  <td class="SK_Text2">体　　重</td>
  <td class="SK_Text1"><%=Rs("SK_Weight")%></td>
  <td class="SK_Text2">体　　型</td>
  <td class="SK_Text1"><%=Rs("SK_Bodytype")%></td>
</tr>
<tr>
  <td class="SK_Text2">鞋　　码</td>
  <td class="SK_Text1"><%=Rs("SK_Shoes")%></td>
  <td class="SK_Text2">是否吸烟</td>
  <td class="SK_Text1"><%if Rs("SK_Smok")="1" OR Rs("SK_Smok")="" then Response.write"不抽" else Response.write"抽烟" end if%></td>
  <td class="SK_Text2">喜欢烟牌</td>
  <td class="SK_Text1"><%=Rs("SK_SmokBrand")%></td>
</tr>
<tr>
<td class="SK_Text2">是否饮酒</td>
<td class="SK_Text1"><%if Rs("SK_Drink")="1" OR Rs("SK_Drink")="" then Response.write"不喝" else Response.write"喝酒" end if%></td>
<td class="SK_Text2">喜欢酒类</td>
  <td class="SK_Text1"><%=Rs("SK_DrinkType")%></td>
  <td class="SK_Text2">喜欢酒牌</td>
  <td class="SK_Text1"><%=Rs("SK_DrinkBrand")%></td>
</tr>
<tr>
  <td class="SK_Text2">是否喝茶</td>
  <td class="SK_Text1"><%if Rs("SK_Tea")="1" OR Rs("SK_Tea")="" then Response.write"不喝" else Response.write"喝茶" end if%></td>
  <td class="SK_Text2">喜欢茶类</td>
  <td class="SK_Text1"><%=Rs("SK_TeaType")%></td>
  <td class="SK_Text2">饮食忌口</td>
  <td class="SK_Text1"><%=Rs("SK_ACF")%></td>
</tr>
<tr>
  <td class="SK_Text2">疾病情况</td>
  <td class="SK_Text1"><%=Rs("SK_Disease")%></td>
  <td class="SK_Text2">驾　　照</td>
  <td class="SK_Text1"><%if Rs("SK_Driving")="1" OR Rs("SK_Driving")="" then Response.write"无" else Response.write"有" end if%></td>
  <td class="SK_Text2">私　　车</td>
  <td class="SK_Text1"><%if Rs("SK_Car")="1" OR Rs("SK_Car")="" then Response.write"无" else Response.write"有" end if%></td>
</tr>
<tr>
  <td class="SK_Text2">私车车型</td>
  <td class="SK_Text1"><%=Rs("SK_CarType")%></td>
  <td class="SK_Text2">私车颜色</td>
  <td class="SK_Text1"><%=Rs("SK_CarColor")%></td>
  <td class="SK_Text2">私车牌照</td>
  <td class="SK_Text1"><%=Rs("SK_CarNo")%></td>
</tr>
<tr>
  <td class="SK_Text2">个人特征</td>
  <td colspan="5" class="SK_Text1"><%=Rs("SK_Features")%></td>
  </tr>
<tr>
  <td class="SK_Text2">爱好特长</td>
  <td colspan="5" class="SK_Text1"><%=Rs("SK_Live")%></td>
</tr>
<tr>
  <td class="SK_Text2">备　　注</td>
  <td colspan="5" class="SK_Text1"><%=Rs("SK_Content")%></td>
</tr>
<%
'自定义选项开始
set RsOptions=server.createobject("adodb.recordset")
sqlOptions="SELECT * from SK_ClientOptions where SK_Di=1 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsOptions.Open sqlOptions,conn,1,1
if RsOptions.bof and RsOptions.eof then
else
%>
<tr>
  <td colspan="6" class="SK_Title1">自定义选项</td>
</tr>
<tr>
  <td colspan="6" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Optionsi=1 to RsOptions.recordCount '变量i从1循环到数据库中的全部记录数 
if (Optionsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""11%"">"&RsOptions("SK_Title")&"</td><td class=""SK_Text1"">"

Set rsOptionsDetail=Server.CreateObject("ADODB.RecordSet") 
sqlOptionsDetail="SELECT * from SK_ClientOptionsDetail where SK_OptionsID="&RsOptions("FieldID")&" and OptionsDetailID="&rs(""&RsOptions("SK_FieldName")&"")&"" 
rsOptionsDetail.Open sqlOptionsDetail,conn,1,1
Response.write""&rsOptionsDetail("SK_OName")&""
rsOptionsDetail.close
set rsOptionsDetail=Nothing

Response.write"</td>"
if (Optionsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsOptions.movenext 
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsOptions.close
set RsOptions=Nothing
'自定义选项结束
'自定义字段开始
set RsFields=server.createobject("adodb.recordset")
sqlFields="SELECT * from SK_ClientFields where SK_Di=1 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsFields.Open sqlFields,conn,1,1
if RsFields.bof and RsFields.eof then
else
%>
<tr>
  <td colspan="6" class="SK_Title1">自定义字段</td>
</tr>
<tr>
  <td colspan="6" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Fieldsi=1 to RsFields.recordCount '变量i从1循环到数据库中的全部记录数 
if (Fieldsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""11%"">"&RsFields("SK_Title")&"</td><td class=""SK_Text1"">"&Rs(""&RsFields("SK_FieldName")&"")&"</td>"
if (Fieldsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsFields.movenext 
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsFields.close
set RsFields=Nothing
'自定义字段结束
%> 
<tr>
  <td colspan="6" class="SK_Title1">管理资料</td>
</tr>
<tr>
  <td class="SK_Text2">创建人员</td>
  <td class="SK_Text1"><%=Rs("SK_Addor")%></td>
  <td class="SK_Text2">创建时间</td>
  <td colspan="3" class="SK_Text1"><%=Rs("SK_ATime")%></td>
  </tr>
<%if Rs("SK_Editor")<>"0" then%>
<tr>
  <td class="SK_Text2">修改人员</td>
  <td class="SK_Text1"><%
set RsClientEditor=server.createobject("adodb.recordset")
SqlClientEditor="select * from SK_SystemUsers where UsersID="&Rs("SK_Editor")&""
RsClientEditor.open SqlClientEditor,conn,1,1
Response.write"<font color=#999999>"&RsClientEditor("SK_OName")&"</font>"
RsClientEditor.close
Set RsClientEditor=Nothing
%></td>
  <td class="SK_Text2">修改时间</td>
  <td colspan="3" class="SK_Text1"><%=Rs("SK_ETime")%></td>
  </tr>
<%end if%>
<tr>
<td colspan="6" class="SK_Text">
<input type="button" value=" 关闭 " onClick="window.close();" class="button1" /></td>
</tr>
</table>

</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>
<%
Call CloseDB()
%>
</html>