<!--#include file="../Conn.asp" -->
<!--#include file="../Comm/Site_Class.asp" -->
<%
Dim strMenu,PageTitle
strMenu = ""
PagePath = "../"

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 企业会员管理中心"

Qsite.Nav_Company()
%>
<!--#include file="Check_Login.asp" -->
<%
Dim Rs
Dim Contact,Tel,Mobile,Fax,QQ,CompanyAddr,Postcode,Email
Set Rs = server.CreateObject("ADODB.recordset")

If Request.Form <> "" Then
	Contact = Qsite.chgStr(Trim(Request.Form("Contact")))
	Tel = Qsite.chgStr(Trim(Request.Form("Tel")))
	Mobile = Qsite.chgStr(Trim(Request.Form("Mobile")))
	Fax = Qsite.chgStr(Trim(Request.Form("Fax")))
	QQ = Qsite.chgStr(Trim(Request.Form("QQ")))
	CompanyAddr = Qsite.chgStr(Trim(Request.Form("CompanyAddr")))
	Postcode = Qsite.chgStr(Trim(Request.Form("Postcode")))

	If Contact = "" Or IsNull(Contact) Then
		Qsite.ShowMsg "请输入联系人" , ""
	End If
	If Tel <> "" And IsNull(Tel) Then
		Qsite.ShowMsg "请输入联系电话" , ""
	End If
	If Not Qsite.IsValidTel(Tel) Then
		Qsite.ShowMsg "输入的联系电话不正确，请返回重新输入" , ""
	End If
	If Mobile <> "" And Not Qsite.IsValidTel(Mobile) Then
		Qsite.ShowMsg "输入的手机号码不正确，请返回重新输入" , ""
	End If
	If Fax <> "" And Not Qsite.IsValidTel(Fax) Then
		Qsite.ShowMsg "输入的传真号码不正确，请返回重新输入" , ""
	End If
	If QQ <> "" And Not IsNumeric(QQ) Then
		Qsite.ShowMsg "输入的QQ号码不正确，请返回重新输入" , ""
	End If
	If CompanyAddr <> "" And IsNull(CompanyAddr) Then
		Qsite.ShowMsg "请输入通讯地址" , ""
	End If
	If Postcode <> "" And IsNull(Postcode) Then
		Qsite.ShowMsg "请输入邮政编码" , ""
	End If
	If Postcode <> "" And Not IsNumeric(Postcode) Then
		Qsite.ShowMsg "输入的邮政不正确，请返回重新输入" , ""
	End If
	
	Postcode = Replace(Postcode , "０" , "0")
	Postcode = Replace(Postcode , "１" , "1")
	Postcode = Replace(Postcode , "２" , "2")
	Postcode = Replace(Postcode , "３" , "3")
	Postcode = Replace(Postcode , "４" , "4")
	Postcode = Replace(Postcode , "５" , "5")
	Postcode = Replace(Postcode , "６" , "6")
	Postcode = Replace(Postcode , "７" , "7")
	Postcode = Replace(Postcode , "８" , "8")
	Postcode = Replace(Postcode , "９" , "9")
	
	Rs.Open "select * from CompanyTbl where ComId = "& Session("ComId") &" and UserName = '"& Session("UserName") &"'" , Conn , 3 , 2
	If Rs.Eof Then
		Qsite.ShowMsg "请不要提交非法参数" , "../Index.asp"
	Else
		Rs("Contact") = Contact
		Rs("Tel") = Tel
		Rs("Mobile") = Mobile
		Rs("Fax") = Fax
		Rs("QQ") = QQ
		Rs("CompanyAddr") = CompanyAddr
		Rs("Postcode") = Postcode
		Rs("EditDate") = Qsite.FormatDate(Now())
		Rs.Update
	End If
	Rs.Close
	Qsite.ShowMsg "资料修改成功" , "ChgComInfo_3.asp"
	
End If

Rs.Open "select * from CompanyTbl where ComId = "& Session("ComId") &" and UserName = '"& Session("UserName") &"'" , Conn , 1 , 1
If Rs.Eof Then
	Qsite.ShowMsg "请不要提交非法参数" , "../Index.asp"
Else
	Contact = Rs("Contact")
	Tel = Rs("Tel")
	Mobile = Rs("Mobile")
	Fax = Rs("Fax")
	QQ = Rs("QQ")
	CompanyAddr = Rs("CompanyAddr")
	Postcode = Rs("Postcode")
	Email = Rs("Email")
End If
Rs.Close
%>
<script language="javascript" src="../Comm/Comm.js"></script>
<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("Contact" , "联系人" , 1 , 100))
			return false;
		if(!checkLength("Tel" , "联系电话" , 1 , 100))
			return false;
		if(!checkLength("Mobile" , "手机号码" , 0 , 100))
			return false;
		if(!checkLength("Fax" , "传真号码" , 0 , 100))
			return false;
		if(!checkLength("QQ" , "QQ" , 0 , 20))
			return false;
		if(!checkInteger("QQ" , "QQ" , 10000 , "*"))
			return false;
		if(!checkLength("CompanyAddr" , "通讯地址" , 1 , 100))
			return false;
		if(!checkLength("Postcode" , "邮政编码" , 1 , 6))
			return false;
		return true;
	}
</script>
 <table width="974" height="413" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="181" valign="top"> 
<!--#include file="Left_Menu.asp" -->
         </td>
        <td width="793" align="left" valign="top">
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="26" background="../images/Member_Center_r7_c8.jpg"><table width="768" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="60">&nbsp;</td>
                    <td width="708"><span style="font-size:14px;color:#FF7706"><b>联系方式管理</b></span><span style="font-size:14px;color:#333333"> 
                      <strong>Contact</strong></span></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td height="136" align="left" valign="top" background="../images/Member_Center_r10_c8.jpg" style="padding-top:5px;padding-left:10px;padding-right:10px;padding-bottom:5px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td width="100%" height="23"><img src="../images/ico_2.gif" width="15" height="12" align="absmiddle" />友情提示：您可以修改除企业名称以外的信息。如需修改注册信息，请联系我们的客服中心！</td>
                  </tr>
                </table>
                <table width="100%" height="7" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">
                    <td background="../images/ico_point.gif"></td>
                  </tr>
				  <tr height="6">
                    <td></td>
                  </tr>
                </table>
					<form id="ComForm" name="ComForm" method="post" action="ChgComInfo_3.asp" style="margin:0" onsubmit="return CheckForm();">
						<table width="82%" align=center border="0" cellpadding="5" cellspacing="3">
							<tr>
								<td width="14%" height="25" ><font color="#FF0000">*</font>联系人：</td>
								<td width="86%" height="25" ><input name="Contact" type="text"  id="Contact" value="<%=Contact%>" size="30" /></td>
							</tr>
							<tr>
								<td height="25" ><font color="#FF0000">*</font>联系电话：</td>
								<td height="40" ><input name="Tel" type="text"  id="Tel" value="<%=Tel%>" size="60" />
										<br />
									(格式：0512-69937211 ，多个电话请用,隔开)</td>
							</tr>
							<tr>
							  <td height="25" >手机号码：</td>
							  <td height="40" ><input name="Mobile" type="text"  id="Mobile" value="<%=Mobile%>" size="60" />
                                <br />
(格式：13388888888 ，多个手机号码请用,隔开)</td>
						  </tr>
							<tr>
								<td height="25" >传真号码：</td>
							  <td height="40" ><input name="Fax" type="text"  id="Fax" value="<%=Fax%>" size="60" />
										<br />
								  (格式：0512-69937211  或者 0512-69937211  ，多个电话请用,隔开)</td>
							</tr>
							<tr>
								<td height="25" >QQ：</td>
								<td height="25" ><input name="QQ" type="text"  id="QQ" value="<%=QQ%>" /></td>
							</tr>
							<tr>
								<td height="25" ><font color="#FF0000">*</font>通讯地址：</td>
								<td height="25" ><input name="CompanyAddr" type="text"  id="CompanyAddr" value="<%=CompanyAddr%>" size="60" /></td>
							</tr>
							<tr>
								<td height="25" ><font color="#FF0000">*</font>邮政编码：</td>
								<td height="25" ><input name="Postcode" type="text"  id="Postcode" value="<%=Postcode%>" size="12" /></td>
							</tr>
							<tr>
								<td height="25" >电子信箱：</td>
								<td height="25" ><input name="Email" type="text"  id="Email" value="<%=Email%>" size="40" readonly="readonly" />
									(电子信箱请在帐号信息里修改)</td>
							</tr>
							<tr>
								<td height="25">&nbsp;</td>
								<td height="25"><input type="submit" name="Submit" value=" 修  改 " />
									&nbsp;
									<input type="reset" name="Submit" value=" 重  置 " /></td>
							</tr>
						</table>
					</form>                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">  
                    <td background="../images/ico_point.gif"></td>
                  </tr>
                </table></td>
            </tr>
            <tr height="14">
              <td height="14" background="../images/Member_Center_r18_c8.jpg"></td>
            </tr>
          </table></td>
      </tr>
    </table>
 
<table width="974" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="8">
        <td height="8"></td>
      </tr>
    </table>
<%
Qsite.Bottom()
%>