<!--#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 RealName,Sex,Age,Nation,Political,Birthplace,Marriage,Qualification,Standing,Weight
Set Rs = server.CreateObject("ADODB.recordset")

If Request.Form <> "" Then
	
	RealName = Qsite.chgStr(Trim(Request.Form("RealName")))
	Sex = Qsite.chgStr(Trim(Request.Form("Sex")))
	Age = Qsite.chgStr(Trim(Request.Form("Age")))
	Nation = Qsite.chgStr(Trim(Request.Form("Nation")))
	Political = Qsite.chgStr(Trim(Request.Form("Political")))
	Birthplace = Qsite.chgStr(Trim(Request.Form("Birthplace")))
	Marriage = Qsite.chgStr(Trim(Request.Form("Marriage")))
	Qualification = Qsite.chgStr(Trim(Request.Form("Qualification")))
	Standing = Qsite.chgStr(Trim(Request.Form("Standing")))
	Weight = Qsite.chgStr(Trim(Request.Form("Weight")))
	
	If RealName = "" Or IsNull(RealName) Then
		Qsite.ShowMsg "请输入真实姓名" , ""
	End If
	If Sex = "" Or IsNull(Sex) Then
		Qsite.ShowMsg "请选择性别" , ""
	End If
	If Age = "" Or IsNull(Age) Or Not IsNumeric(Age) Then
		Qsite.ShowMsg "请输入年龄，年龄只能输入数字" , ""
	End If
	If Political = "" Or IsNull(Political) Then
		Qsite.ShowMsg "请选择政治面貌" , ""
	End If
	If Birthplace = "" Or IsNull(Birthplace) Then
		Qsite.ShowMsg "请输入籍贯" , ""
	End If
	If Marriage = "" Or IsNull(Marriage) Then
		Qsite.ShowMsg "请选择婚姻状况" , ""
	End If
	If Qualification = "" Or IsNull(Qualification) Then
		Qsite.ShowMsg "请输入学历" , ""
	End If
	If Standing <> "" And Not IsNumeric(Standing) Then
		Qsite.ShowMsg "身高只能输入数字" , ""
	End If
	If Weight <> "" And Not IsNumeric(Weight) Then
		Qsite.ShowMsg "体重只能输入数字" , ""
	End If
	
	Conn.Execute("update PersonTbl set RealName = '"& RealName &"' , Sex = '"& Sex &"' , Age = "& Age &" , Nation = '"& Nation &"' , Political = '"& Political &"' , Birthplace = '"& Birthplace &"' , Marriage = '"& Marriage &"' , Qualification = '"& Qualification &"' , Standing = '"& Standing &"' , Weight = '"& Weight &"' where PerId = "& Session("PerId") &" and [UserName] = '"& Session("UserName") &"'")
	
	Qsite.ShowMsg "资料修改成功" , "ChgPerInfo_2.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
	RealName = Rs("RealName")
	Sex = Rs("Sex")
	Age = Rs("Age")
	Nation = Rs("Nation")
	Political = Rs("Political")
	Birthplace = Rs("Birthplace")
	Marriage = Rs("Marriage")
	Qualification = Rs("Qualification")
	Standing = Rs("Standing")
	Weight = Rs("Weight")
End If
Rs.Close
%>
<script language="javascript" src="../Comm/Comm.js"></script>
<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("RealName" , "真实姓名" , 1 , 20))
			return false;
		if(!checkLength("Age" , "年龄" , 1))
			return false;
		if(!checkInteger("Age" , "年龄" , 1 , "*"))
			return false;
		if(!checkLength("Nation" , "民族" , 0 , 100))
			return false;
		if(PerForm.Political.value == "")
		{
			alert("请选择政治面貌");
			return false;
		}
		if(!checkLength("Birthplace" , "籍贯" , 1 , 20))
			return false;
		if(PerForm.Qualification.value == "")
		{
			alert("请选择学历");
			return false;
		}
		if(!checkInteger("Standing" , "身高" , 1 , "*"))
			return false;
		if(!checkInteger("Weight" , "体重" , 1 , "*"))
			return false;
		return true;
	}
</script>
  <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"> 
<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>PersonInfo</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_2.asp" style="margin:0" onsubmit="return CheckForm();">
									<table width="100%" align=center border="0" cellpadding="5" cellspacing="3">
										<tr>
											<td width="16%" height="30"><font color="#FF0000">*</font>真实姓名：</td>
											<td width="84%" height="30"><input name="RealName" type="text" id="RealName" size="30"  value="<%=RealName%>" /></td>
										</tr>
										<tr>
											<td height="30">性别：</td>
											<td height="30"><input name="Sex" type="radio" value="男" <%If Sex = "男" Then Response.Write("checked")%> />
												男 
												<input type="radio" name="Sex" value="女" <%If Sex = "女" Then Response.Write("checked")%> />
											女</td>
										</tr>
										<tr>
											<td height="30"><font color="#FF0000">*</font>年龄：</td>
											<td height="30"><input name="Age" type="text" id="Age" size="10"  value="<%=Age%>" />
											岁</td>
										</tr>
										<tr>
											<td height="30">民族：</td>
											<td height="30"><input name="Nation" type="text" id="Nation" size="20"  value="<%=Nation%>" /></td>
										</tr>
										<tr>
											<td height="30"><font color="#FF0000">*</font>政治面貌：</td>
											<td height="30"><select name="Political"  id="Political">
						<option value="" <%If Political = "" Then Response.Write("selected")%>>请选择</option>
						<%
						Rs.Open "select * from PoliticalTbl order by PoliticalId asc" , Conn , 1 , 1
						Do While Not Rs.Eof
							Response.Write("<option value="""& Rs("PoliticalName") &""" ")
							If Rs("PoliticalName") = Political Then Response.Write(" selected")
							Response.Write(">"& Rs("PoliticalName") &"</option>")
						Rs.MoveNext
						Loop
						Rs.Close
						%>
					</select></td>
										</tr>
										<tr>
											<td height="30"><font color="#FF0000">*</font>籍贯：</td>
											<td height="30"><input name="Birthplace" type="text"  id="Birthplace" value="<%=Birthplace%>" /></td>
										</tr>
										<tr>
											<td height="30"><font color="#FF0000">*</font>婚姻状况：</td>
											<td height="30"><select name="Marriage"  id="Marriage">
						<option value="">请选择</option>
						<option value="未婚" <%If Marriage = "未婚" Then Response.Write("selected")%>>未婚</option>
						<option value="已婚" <%If Marriage = "已婚" Then Response.Write("selected")%>>已婚</option>
						<option value="离异" <%If Marriage = "离异" Then Response.Write("selected")%>>离异</option>
											</select></td>
										</tr>
										<tr>
											<td height="30"><font color="#FF0000">*</font>学历：</td>
											<td height="30"><select name="Qualification"  id="Qualification">
						<option value="" <%If Qualification = "" Then Response.Write("selected")%>>请选择</option>
						<%
						Rs.Open "select * from QualificationTbl order by QualificationId asc" , Conn , 1 , 1
						Do While Not Rs.Eof
							Response.Write("<option value="""& Rs("QualificationName") &""" ")
							If Rs("QualificationName") = Qualification Then Response.Write(" selected")
							Response.Write(">"& Rs("QualificationName") &"</option>")
						Rs.MoveNext
						Loop
						Rs.Close
						%>
					</select></td>
										</tr>
										<tr>
											<td height="30">身高：</td>
											<td height="30"><input name="Standing" type="text"  id="Standing" size="10" value="<%=Standing%>" />
											CM</td>
										</tr>
										<tr>
											<td height="30">体重：</td>
											<td height="30"><input name="Weight" type="text"  id="Weight" size="10" value="<%=Weight%>" />
											KG</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()
%>