<!--#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.SiteTopPerson()
%>
<!--#include file="Check_Login.asp" -->
<%
Dim Rs
Dim NowAddr,HomeAddr,QQ,MSN,Tel,Mobile,Email
Set Rs = server.CreateObject("ADODB.recordset")

If Request.Form <> "" Then
	
	NowAddr = Qsite.chgStr(Trim(Request.Form("NowAddr")))
	HomeAddr = Qsite.chgStr(Trim(Request.Form("HomeAddr")))
	QQ = Qsite.chgStr(Trim(Request.Form("QQ")))
	MSN = Qsite.chgStr(Trim(Request.Form("MSN")))
	Tel = Qsite.chgStr(Trim(Request.Form("Tel")))
	
	If NowAddr = "" Or IsNull(NowAddr) Then
		Qsite.ShowMsg "请输入现在所在地" , ""
	End If
	If HomeAddr = "" Or IsNull(HomeAddr) Then
		Qsite.ShowMsg "请输入家庭地址" , ""
	End If
	If QQ <> "" And Not IsNumeric(QQ) Then
		Qsite.ShowMsg "输入的QQ号码不正确，请返回重新输入" , ""
	End If
	If MSN <> "" And Not Qsite.IsValidEmail(MSN) Then
		Qsite.ShowMsg "输入的MSN不正确，请返回重新输入" , ""
	End If
	If Tel = "" Or IsNull(Tel) Then
		Qsite.ShowMsg "请输入联系电话" , ""
	End If
	If Not Qsite.IsValidTel(Tel) Then
		Qsite.ShowMsg "输入的联系电话不正确，请返回重新输入" , ""
	End If
	
	Conn.Execute("update PersonTbl set NowAddr = '"& NowAddr &"' , HomeAddr = '"& HomeAddr &"' , QQ = '"& QQ &"' , MSN = '"& MSN &"' , Tel = '"& Tel &"' where PerId = "& Session("PerId") &" and UserName = '"& Session("UserName") &"'")
		
	
	Qsite.ShowMsg "资料修改成功" , "ChgPerInfo_4.asp"
	
End If

Rs.Open "select * from PersonTbl where PerId = "& Session("PerId") &" and UserName = '"& Session("UserName") &"'" , Conn , 1 , 1
If Rs.Eof Then
	Qsite.ShowMsg "请不要提交非法参数" , "../Index.asp"
Else
	NowAddr = Rs("NowAddr")
	HomeAddr = Rs("HomeAddr")
	QQ = Rs("QQ")
	MSN = Rs("MSN")
	Tel = Rs("Tel")
	Email = Rs("Email")
End If
Rs.Close
%>
<table width="974" height="413" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="185" valign="top"> 
<!--#include file="Left_Menu.asp" -->
        </td>
        <td width="789" valign="top"> <script language="javascript" src="../Comm/Comm.js"></script>
<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("NowAddr" , "现在所在地" , 1 , 100))
			return false;
		if(!checkLength("HomeAddr" , "家庭地址" , 1 , 100))
			return false;
		if(!checkLength("QQ" , "QQ" , 0 , 20))
			return false;
		if(!checkInteger("QQ" , "QQ" , 10000 , "*"))
			return false;
		if(!checkLength("MSN" , "MSN" , 0 , 100))
			return false;
		if(!checkEmail("MSN" , "MSN"))
			return false;
		if(!checkLength("Tel" , "联系电话" , 1 , 100))
			return false;
		return true;
	}
</script>
<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>
    
                </table>
							<form id="PerForm" name="PerForm" method="post" action="ChgPerInfo_4.asp" style="margin:0" onsubmit="return CheckForm();">
									<table width="100%" align=center border="0" cellpadding="5" cellspacing="3">
										<tr>
											<td width="17%" height="30" ><font color="#FF0000">*</font>现在所在地：</td>
											<td width="83%" height="30" ><input name="NowAddr" type="text" id="NowAddr" size="60" value="<%=NowAddr%>" /></td>
										</tr>
										<tr>
											<td height="30" ><font color="#FF0000">*</font>家庭地址：</td>
											<td height="30" ><input name="HomeAddr" type="text" id="HomeAddr" size="60" value="<%=HomeAddr%>" /></td>
										</tr>
										<tr>
											<td height="30" >QQ：</td>
											<td height="30" ><input name="QQ" type="text" id="QQ" size="60" value="<%=QQ%>" /></td>
										</tr>
										<tr>
											<td height="30" >MSN：</td>
											<td height="30" ><input name="MSN" type="text" id="MSN" size="60" value="<%=MSN%>" /></td>
										</tr>
										<tr>
											<td height="30" ><font color="#FF0000">*</font>联系电话：</td>
											<td height="30" ><input name="Tel" type="text" id="Tel" size="60" value="<%=Tel%>" />
						<br />
						(格式：0512-69937211 或者 13888888888 ，多个电话请用,隔开)</td>
										</tr>
										<tr>
											<td height="30" >电子信箱：</td>
											<td height="30" ><input name="Email" type="text" id="Email" size="30" value="<%=Email%>" readonly />
(电子信箱请在帐号信息里修改)</td>
										</tr>
										<tr>
											<td height="30">&nbsp;</td>
											<td height="30"><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()
%>