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

📄 editcontact.asp

📁 客户管理crm xitong ,希望能给你带来帮助
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<%
	ID=session("client_id")
	Contact_ID=trim(request("Contact_ID"))
	if Contact_ID="" then
		Contact_ID=request("IID")
	end if
	if Contact_ID & "" = "" or instr(Contact_ID,",") then
		response.write "<script>alert('你必须选择要修改的项目。');history.back();</script>"
		response.end
	else
		response.write "<script>top.frame2.location.href='user_design3.asp?strTable=11&contact_id=" & contact_id & "';top.frame2.location.reload();</script>"
	end if
	strsql="select * from contacts where contact_id=" & Contact_ID
	Set objRs = Server.CreateObject("adodb.recordset")
	    objRs.Open strsql,objConn,1,1
	if not objrs.eof then
		Contact_Name=objrs.fields("Contact_Name")
		Mobile_Phone=objrs.fields("Mobile_Phone")
		Department_ID=objrs.fields("Department_ID")
		Title_ID=objrs.fields("Title_ID")
		Home_Phone=objrs.fields("Home_Phone")
		Country_ID=objrs.fields("Country_ID")
		Country_Code=objrs.fields("Country_Code")
		FAX1=objrs.fields("FAX1")
		Province_ID=objrs.fields("Province_ID")
		Email1=objrs.fields("Email1")
		City_ID=objrs.fields("City_ID")
		ZIP=objrs.fields("ZIP")
		Area_Code=objrs.fields("Area_Code")
		Hobbies=objrs.fields("Hobbies")
		Address=objrs.fields("Address")
		Special_Day=objrs.fields("Special_Day")
		IsPublic=objrs.fields("IsPublic")
	end if
%>
<html>
<head>
<title>修改联系人</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script>
	function check()
	{
		if(document.form1.Contact_Name.value==""){
			alert("姓名不能为空");
			document.form1.Contact_Name.focus();
			return false;
		}
	}
</script>

<script language="javascript">
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
function fnDo(strTable,strFIdName,strIdName,strIDValue,strShowName)
{
	var xmlDom = new ActiveXObject("Msxml2.DOMDocument"); 
	var strURL = "GetCity.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowName="+strShowName+"&strFIdName="+strFIdName;
	//alert(strURL);
	
	xmlhttp.Open("POST",strURL , true);
	xmlhttp.onreadystatechange = fnRun;
	
	xmlhttp.Send(xmlDom);
}
//--------------------------------------------------------
function fnRun()
{
	var state = xmlhttp.readyState;
	var xmlDom = new ActiveXObject("Msxml2.DOMDocument");

	if (state == 4)
	{
		xmlDom.loadXML(xmlhttp.responseXML.xml);
		//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
		var getInfo = xmlDom.documentElement.selectSingleNode("//objXML").text;
		//document.write(getInfo);
		subcat = new Array();
		eval(getInfo);
		changelocation(subcat)
	} 
}
function changelocation(subcat)
{
	
	document.form1.Province_ID.length = 0;
	var i;
	document.form1.Province_ID.options[0] = new Option('==选择==','');
	for (i=0;i <subcat.length; i++)
	{
		document.form1.Province_ID.options[document.form1.Province_ID.length] = new Option(subcat[i][0], subcat[i][1]);
		//alert(subcat[i][1]=='<%=Province_ID%>');
		if(subcat[i][1]=='<%=Province_ID%>')
		{
			document.form1.Province_ID.options[i+1].selected=true;
			fnDo1('Dict_Cities','Province_ID','City_ID',document.form1.Province_ID.options[i+1].value,'City');
		}
		
	}

}




function fnDo1(strTable,strFIdName,strIdName,strIDValue,strShowName)
{
	var xmlDom = new ActiveXObject("Msxml2.DOMDocument"); 
	var strURL = "GetCity.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowName="+strShowName+"&strFIdName="+strFIdName;
	//alert(strURL);
	
	xmlhttp.Open("POST",strURL , true);
	xmlhttp.onreadystatechange = fnRun1;
	
	xmlhttp.Send(xmlDom);
}
//--------------------------------------------------------
function fnRun1()
{
	var state = xmlhttp.readyState;
	var xmlDom = new ActiveXObject("Msxml2.DOMDocument");

	if (state == 4)
	{
		xmlDom.loadXML(xmlhttp.responseXML.xml);
		//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
		var getInfo = xmlDom.documentElement.selectSingleNode("//objXML").text;
		//document.write(getInfo);
		subcat = new Array();
		eval(getInfo);
		changelocation1(subcat)
	} 
}
function changelocation1(subcat)
{
	
	document.form1.City_ID.length = 0;
	var i;
	document.form1.City_ID.options[0] = new Option('====选择====','');
	for (i=0;i <subcat.length; i++)
	{
		document.form1.City_ID.options[document.form1.City_ID.length] = new Option(subcat[i][0], subcat[i][1]);
		if(subcat[i][1]=='<%=City_ID%>')
		{
			document.form1.City_ID.options[i+1].selected=true;
		}
	}

}


xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
function fnDo2(strTable,strIdName,strIDValue,strShowValue,strField)
{
	var xmlDom2 = new ActiveXObject("Msxml2.DOMDocument"); 
	var strURL = "GetCode.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowValue="+strShowValue+"&strField="+strField;
	//alert(strURL);
	
	xmlhttp2.Open("POST",strURL , true);
	xmlhttp2.onreadystatechange = fnRun2;
	
	xmlhttp2.Send(xmlDom2);
}
//--------------------------------------------------------
function fnRun2()
{
	var state = xmlhttp2.readyState;
	var xmlDom22 = new ActiveXObject("Msxml2.DOMDocument");

	if (state == 4)
	{
		xmlDom22.loadXML(xmlhttp2.responseXML.xml);
		//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
		var getInfo = xmlDom22.documentElement.selectSingleNode("//objXML").text;
		//alert(getInfo);
		eval(getInfo);
	} 
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="1" cellspacing="0" cellpadding="2"  bordercolorlight='#000000' bordercolordark='#FFFFFF'>
  <form name="form1" method="post" action="../function/UpdateToDB.asp?InsertTable=Contacts&ModifyID=<%=Contact_ID%>&ModifyIDName=Contact_ID&RedirectUrl=../clients/contactlist.asp?ID=<%=ID%>" onsubmit="return check();">
    <tr> 
      <td colspan="6" height="25" class="tablehead"> 
        <div align="center">修改联系人信息</div>
      </td>
    </tr>
    <tr> 
      <td width="9%" height="22" nowrap> 
        <div align="right">姓名:</div>
      </td>
      <td colspan="3" height="22"> 
        <input type="text" name="Contact_Name" size="8" maxlength="30" class="input" value="<%=Contact_Name%>">
        称呼 
        <select name="Nickname">
          <option value="先生" <%if objrs.fields("Nickname")="先生" then response.write "selected"%>>先生</option>
          <option value="女士" <%if objrs.fields("Nickname")="女士" then response.write "selected"%>>女士</option>
          <option value="小姐" <%if objrs.fields("Nickname")="小姐" then response.write "selected"%>>小姐</option>
          <option value="太太" <%if objrs.fields("Nickname")="太太" then response.write "selected"%>>太太</option>
        </select>
        <input type="checkbox" name="Primary" value="1" <%if objrs.fields("Primary")& ""="1" then response.write "checked"%>>
        主联系人</td>
      <td width="16%" height="22" nowrap> 
        <div align="right">办公电话:</div>
      </td>
      <td width="37%" height="22"> 
        <input type="text" name="Phone1" size="20" maxlength="30" class="input" value="<%=objrs.fields("Phone1")%>">
      </td>
    </tr>

⌨️ 快捷键说明

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