<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") AND JudgePopedomTF(Session("UserName"),"SK200000202")))) 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 SK_Del=0 and 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_Linkman.SK_Del=0 and 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_Linkman.SK_Del=0 and 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_Linkman.SK_Del=0 and 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_Del=0 and SK_SalesID="&Session("UID")&" and LinkmanID="&JCID(F("ID"))&""
end if
rs.Open sql,conn,1,3
if rs.eof and rs.bof then Call ReturnError4()

'Mod
if RQ("Action")="Mod" and F("ID")<>"" and F("S_ClientID")<>"" and F("S_Name")<>"" and F("S_Sex")<>"" then
Call ChkIsOuter()
set rs=server.createobject("adodb.recordset")
sql="select * from SK_LinkMan where LinkmanID="&JCID(F("ID"))&" and SK_Del=0"
rs.open sql,conn,1,3
rs("SK_ClientID")=NoCSSHackInput(F("S_ClientID"))
rs("SK_LName")=NoCSSHackInput(F("S_Name"))
rs("Sex")=NoCSSHackInput(F("S_Sex"))
rs("SK_Age")=NoCSSHackInput(F("S_Age"))
rs("SK_Birthday")=NoCSSHackInput(F("S_Birthday"))
rs("SK_LDept")=NoCSSHackInput(F("S_Dept"))
rs("SK_LJob")=NoCSSHackInput(F("S_Job"))
rs("SK_Tel")=NoCSSHackInput(F("S_Tel"))
rs("SK_Fax")=NoCSSHackInput(F("S_Fax"))
rs("SK_Mobile")=NoCSSHackInput(F("S_Mobile"))
rs("SK_Mobile1")=NoCSSHackInput(F("S_Mobile1"))
rs("SK_Phone")=NoCSSHackInput(F("S_Phone"))
rs("SK_Email")=NoCSSHackInput(F("S_Email"))
rs("SK_QQ")=NoCSSHackInput(F("S_QQ"))
rs("SK_OfficeMsn")=NoCSSHackInput(F("S_Msn"))
rs("SK_ICQ")=NoCSSHackInput(F("S_ICQ"))
rs("SK_Address")=NoCSSHackInput(F("S_Address"))
rs("SK_Code")=NoCSSHackInput(F("S_Code"))
rs("SK_Above")=NoCSSHackInput(F("S_Above"))
rs("SK_Degree")=NoCSSHackInput(F("S_Degree"))
rs("SK_School")=NoCSSHackInput(F("S_School"))
rs("SK_Major")=NoCSSHackInput(F("S_Major"))
rs("SK_Native")=NoCSSHackInput(F("S_Native"))
rs("SK_Nation")=NoCSSHackInput(F("S_Nation"))
rs("SK_Height")=NoCSSHackInput(F("S_Height"))
rs("SK_Weight")=NoCSSHackInput(F("S_Weight"))
rs("SK_Bodytype")=NoCSSHackInput(F("S_Bodytype"))
rs("SK_Shoes")=NoCSSHackInput(F("S_Shoes"))
rs("SK_Smok")=NoCSSHackInput(F("S_Smok"))
rs("SK_SmokBrand")=NoCSSHackInput(F("S_SmokBrand"))
rs("SK_Drink")=NoCSSHackInput(F("S_Drink"))
rs("SK_DrinkType")=NoCSSHackInput(F("S_DrinkType"))
rs("SK_DrinkBrand")=NoCSSHackInput(F("S_DrinkBrand"))
rs("SK_Tea")=NoCSSHackInput(F("S_Tea"))
rs("SK_TeaType")=NoCSSHackInput(F("S_TeaType"))
rs("SK_ACF")=NoCSSHackInput(F("S_ACF"))
rs("SK_Disease")=NoCSSHackInput(F("S_Disease"))
rs("SK_Driving")=NoCSSHackInput(F("S_Driving"))
rs("SK_Car")=NoCSSHackInput(F("S_Car"))
rs("SK_CarType")=NoCSSHackInput(F("S_CarType"))
rs("SK_CarColor")=NoCSSHackInput(F("S_CarColor"))
rs("SK_CarNo")=NoCSSHackInput(F("S_CarNo"))
rs("SK_Features")=NoCSSHackInput(F("S_Features"))
rs("SK_Live")=NoCSSHackInput(F("S_Live"))
rs("SK_Content")=NoCSSHackContent(F("S_Content"))
rs("SK_Editor")=Session("UID")
rs("SK_ETime")=Now()
rs("SK_Del")="0"

'自定义部分开始
set RsField=Server.createobject("adodb.recordset")
sqlField="SELECT * from SK_ClientFields where SK_Di=1 and SK_ShowOnForm=0"
RsField.Open sqlField,conn,1,1
A=0
while not RsField.eof
A=A+1
rs(""&RsField("SK_FieldName")&"")=NoCSSHackInput(F(""&RsField("SK_FieldName")&""))
RsField.movenext
wend
RsField.close
Set RsField=Nothing

set RsOption=Server.createobject("adodb.recordset")
sqlOption="SELECT * from SK_ClientOptions where SK_Di=1 and SK_ShowOnForm=0"
RsOption.Open sqlOption,conn,1,1
B=0
while not RsOption.eof
B=B+1
rs(""&RsOption("SK_FieldName")&"")=NoCSSHackInput(F(""&RsOption("SK_FieldName")&""))
RsOption.movenext
wend
RsOption.close
Set RsOption=Nothing
'自定义部分结束

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
Response.Write("<script LANGUAGE='javascript'>alert('恭喜你,修改成功！');window.close();window.opener.location.reload();</script>")
Response.End
end if
%>
<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>
<SCRIPT language=javascript src="../inc/Openwin.js"></SCRIPT>
<script>
window.onbeforeunload = function()
{
if (document.body.offsetWidth-50 < event.clientX && event.clientY<0)
{
return "是否关闭当前窗口？关闭本窗口将放弃修改信息！";
}
}
</script>
<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x: hidden;
}
-->
</style>
<SCRIPT language=JavaScript>
function Form1_Validator(theForm)
{

if(form1.S_Client.value ==""){
alert("对不起,请选择关联客户!");
form1.S_Client.focus();
return false;
}

if(form1.S_Name.value ==""){
alert("对不起,姓名不能为空!");
form1.S_Name.focus();
return false;
}

if(form1.S_Sex.value ==""){
alert("对不起,请选择性别!");
form1.S_Sex.focus();
return false;
}

return true;
}
</SCRIPT>
</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>

<form name="thisForm" id="form1" method="post" action="?Action=Mod" onSubmit="return Form1_Validator(this)"> 
<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">
<input name="S_Client" type="text" size="30" value="<%
set rsClient=server.createobject("adodb.recordset")
sqlClient="select * from SK_Client where ClientID="&Rs("SK_ClientID")&""
rsClient.open sqlClient,conn,1,1
Response.write""&RsClient("SK_Wname")&""
RsClient.close
Set RsClient=Nothing
%>" readonly>
<input name="S_ClientID" type="hidden" value="<%=Rs("SK_ClientID")%>">
<a onClick="JavaScript:window.open('../Client/SK.SeMyClient.asp','SClinet','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=820,height=400,top=176,left=161');" style="cursor:hand"><img src="../images/sclient.gif" /></a> <font color=red>*</font></td>
</tr>

<tr>
<td class="SK_Text2">姓　　名</td>
<td width="21%" class="SK_Text1"><input name="S_Name" type="text" size="20" value="<%=Rs("SK_LName")%>"> <font color=red>*</font></td>
<td width="11%" class="SK_Text2">性　　别</td>
<td width="23%" class="SK_Text1"><select name="S_Sex">
<option value="1" <%if Rs("Sex")="1" then Response.Write("selected")%>>男</option>
<option value="0" <%if Rs("Sex")="0" then Response.Write("selected")%>>女</option>
</select> <font color=red>*</font></td>
<td width="11%" class="SK_Text2">年　　龄</td>
<td width="23%" class="SK_Text1"><input name="S_Age" type="text" onKeyUp="value=value.replace(/[^\d]/g,'')" size="20" maxlength="2" value="<%=Rs("SK_Age")%>" /></td>
</tr>
<tr>
<td class="SK_Text2">生　　日</td>
<td class="SK_Text1"><input name="S_Birthday" type="text" size="20" onClick="new Calendar().show(this);" value="<%=Rs("SK_Birthday")%>" readOnly /></td>
<td class="SK_Text2">部　　门</td>
<td class="SK_Text1"><input name="S_Dept" type="text" size="20" value="<%=Rs("SK_LDept")%>" /></td>
<td class="SK_Text2">职　　务</td>
<td class="SK_Text1"><input name="S_Job" type="text" size="20" value="<%=Rs("SK_LJob")%>" /></td>
</tr>
<tr>
<td class="SK_Text2">办公电话</td>
<td class="SK_Text1"><input name="S_Tel" type="text" size="20" value="<%=Rs("SK_Tel")%>" /></td>
<td class="SK_Text2">传　　真</td>
<td class="SK_Text1"><input name="S_Fax" type="text" size="20" value="<%=Rs("SK_Fax")%>" /></td>
<td class="SK_Text2">手　　机</td>
<td class="SK_Text1"><input name="S_Mobile" type="text" size="20" value="<%=Rs("SK_Mobile")%>" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
</tr>
<tr>
  <td class="SK_Text2">家庭电话</td>
  <td class="SK_Text1"><input name="S_Phone" type="text" size="20" value="<%=Rs("SK_Phone")%>" /></td>
  <td class="SK_Text2">电子邮件</td>
  <td class="SK_Text1"><input name="S_Email" type="text" size="20" value="<%=Rs("SK_Email")%>" /></td>
  <td class="SK_Text2">备用手机</td>
  <td class="SK_Text1"><input name="S_Mobile1" type="text" size="20" value="<%=Rs("SK_Mobile1")%>" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
</tr>
<tr>
  <td class="SK_Text2">腾讯   QQ</td>
  <td class="SK_Text1"><input name="S_QQ" type="text" onKeyUp="value=value.replace(/[^\d]/g,'')" size="20" maxlength="20" value="<%=Rs("SK_QQ")%>" /></td>
  <td class="SK_Text2">Msn</td>
  <td class="SK_Text1"><input name="S_Msn" type="text" size="20" maxlength="20" value="<%=Rs("SK_OfficeMsn")%>" /></td>
  <td class="SK_Text2">ICQ</td>
  <td class="SK_Text1"><input name="S_ICQ" type="text" onKeyUp="value=value.replace(/[^\d]/g,'')" size="20" maxlength="20" value="<%=Rs("SK_ICQ")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">家庭地址</td>
  <td colspan="3" class="SK_Text1"><input name="S_Address" type="text" size="40" value="<%=Rs("SK_Address")%>"></td>
  <td class="SK_Text2">邮　　编</td>
  <td class="SK_Text1"><input name="S_Code" type="text" onKeyUp="value=value.replace(/[^\d]/g,'')" size="20" maxlength="6" value="<%=Rs("SK_Code")%>" /></td>
</tr>

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

<tr>
  <td class="SK_Text2">学　　历</td>
  <td class="SK_Text1"><input name="S_Above" type="text" size="20" value="<%=Rs("SK_Above")%>" /></td>
  <td class="SK_Text2">学　　位</td>
  <td class="SK_Text1"><input name="S_Degree" type="text" size="20" value="<%=Rs("SK_Degree")%>" /></td>
  <td class="SK_Text2">专　　业</td>
  <td class="SK_Text1"><input name="S_Major" type="text" size="20" value="<%=Rs("SK_Major")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">毕业院校</td>
  <td class="SK_Text1"><input name="S_School" type="text" size="20" value="<%=Rs("SK_School")%>" /></td>
  <td class="SK_Text2">籍　　贯</td>
  <td class="SK_Text1"><input name="S_Native" type="text" size="20" value="<%=Rs("SK_Native")%>" /></td>
  <td class="SK_Text2">民　　族</td>
  <td class="SK_Text1"><input name="S_Nation" type="text" size="20" value="<%=Rs("SK_Nation")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">身　　高</td>
  <td class="SK_Text1"><input name="S_Height" type="text" size="20" value="<%=Rs("SK_Height")%>" /></td>
  <td class="SK_Text2">体　　重</td>
  <td class="SK_Text1"><input name="S_Weight" type="text" size="20" value="<%=Rs("SK_Weight")%>" /></td>
  <td class="SK_Text2">体　　型</td>
  <td class="SK_Text1"><input name="S_Bodytype" type="text" size="20" value="<%=Rs("SK_Bodytype")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">鞋　　码</td>
  <td class="SK_Text1"><input name="S_Shoes" type="text" size="20" value="<%=Rs("SK_Shoes")%>" /></td>
  <td class="SK_Text2">是否吸烟</td>
  <td class="SK_Text1"><select name="S_Smok">
  <option value="" selected>请选择</option>
<option value="1" <%if Rs("SK_Smok")="1" then Response.Write("selected")%>>不抽</option>
<option value="0" <%if Rs("SK_Smok")="0" then Response.Write("selected")%>>抽烟</option>
</select></td>
  <td class="SK_Text2">喜欢烟牌</td>
  <td class="SK_Text1"><input name="S_SmokBrand" type="text" size="20" value="<%=Rs("SK_SmokBrand")%>" /></td>
</tr>
<tr>
<td class="SK_Text2">是否饮酒</td>
<td class="SK_Text1"><select name="S_Drink">
<option value="" selected>请选择</option>
<option value="1" <%if Rs("SK_Drink")="1" then Response.Write("selected")%>>不喝</option>
<option value="0" <%if Rs("SK_Drink")="0" then Response.Write("selected")%>>喝酒</option>
</select></td>
<td class="SK_Text2">喜欢酒类</td>
  <td class="SK_Text1"><input name="S_DrinkType" type="text" size="20" value="<%=Rs("SK_DrinkType")%>" /></td>
  <td class="SK_Text2">喜欢酒牌</td>
  <td class="SK_Text1"><input name="S_DrinkBrand" type="text" size="20" value="<%=Rs("SK_DrinkBrand")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">是否喝茶</td>
  <td class="SK_Text1"><select name="S_Tea">
<option value="" selected>请选择</option>
<option value="1" <%if Rs("SK_Tea")="1" then Response.Write("selected")%>>不喝</option>
<option value="0" <%if Rs("SK_Tea")="0" then Response.Write("selected")%>>喝茶</option>
</select></td>
  <td class="SK_Text2">喜欢茶类</td>
  <td class="SK_Text1"><input name="S_TeaType" type="text" size="20" value="<%=Rs("SK_TeaType")%>" /></td>
  <td class="SK_Text2">饮食忌口</td>
  <td class="SK_Text1"><input name="S_ACF" type="text" size="20" value="<%=Rs("SK_ACF")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">疾病情况</td>
  <td class="SK_Text1"><input name="S_Disease" type="text" size="20" value="<%=Rs("SK_Disease")%>" /></td>
  <td class="SK_Text2">驾　　照</td>
  <td class="SK_Text1"><select name="S_Driving">
<option value="" selected>请选择</option>
<option value="1" <%if Rs("SK_Driving")="1" then Response.Write("selected")%>>无</option>
<option value="0" <%if Rs("SK_Driving")="0" then Response.Write("selected")%>>有</option>
</select></td>
  <td class="SK_Text2">私　　车</td>
  <td class="SK_Text1"><select name="S_Car">
<option value="" selected>请选择</option>
<option value="1" <%if Rs("SK_Car")="1" then Response.Write("selected")%>>无</option>
<option value="0" <%if Rs("SK_Car")="0" then Response.Write("selected")%>>有</option>
</select></td>
</tr>
<tr>
  <td class="SK_Text2">私车车型</td>
  <td class="SK_Text1"><input name="S_CarType" type="text" size="20" value="<%=Rs("SK_CarType")%>" /></td>
  <td class="SK_Text2">私车颜色</td>
  <td class="SK_Text1"><input name="S_CarColor" type="text" size="20" value="<%=Rs("SK_CarColor")%>" /></td>
  <td class="SK_Text2">私车牌照</td>
  <td class="SK_Text1"><input name="S_CarNo" type="text" size="20" value="<%=Rs("SK_CarNo")%>" /></td>
</tr>
<tr>
  <td class="SK_Text2">个人特征</td>
  <td colspan="5" class="SK_Text1"><input name="S_Features" type="text" size="40" value="<%=Rs("SK_Features")%>" ></td>
  </tr>
<tr>
  <td class="SK_Text2">爱好特长</td>
  <td colspan="5" class="SK_Text1"><input name="S_Live" type="text" size="40" value="<%=Rs("SK_Live")%>"></td>
</tr>
<tr>
  <td class="SK_Text2">备　　注</td>
  <td colspan="5" class="SK_Text1"><IFRAME ID="eWebEditor1" SRC="<%=getconfig("SK_EditorPath")%>/ewebeditor.htm?id=S_Content&style=mini" FRAMEBORDER="0" SCROLLING="no" WIDTH="500" HEIGHT="250"></IFRAME>
<input type="hidden" name="S_Content" value="<%=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""><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
Response.write"<option value="""" selected>--请选择--</option>"
do while not rsOptionsDetail.eof
selected=""
if rs(""&RsOptions("SK_FieldName")&"")=rsOptionsDetail("OptionsDetailID") then selected="selected='selected'"
Response.write"<option value="&rsOptionsDetail("OptionsDetailID")&" "&selected&">"&rsOptionsDetail("SK_OName")&"</option>"
rsOptionsDetail.movenext
loop
rsOptionsDetail.close
set rsOptionsDetail=Nothing
Response.write"</select></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""><input type=""text"" size=""20"" name="&RsFields("SK_FieldName")&" value="&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_Text">
<input type="hidden" name="ID" value="<%=Rs("LinkmanID")%>">
<INPUT class="button1" type="submit" value=" 保存 "> 
<input type="button" value=" 关闭 " onClick="window.opener.location.reload();window.close();" class="button1" /></td>
</tr>
</table>
</form>

</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>