<!--#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 CompanyName,CompanyIndustry,CompanyNature,CompanyFormation,RegFunds,EmployeeNum
Dim CompanyLocation_Province,CompanyLocation_City,CompanyLocation_County,CompanyContent
Set Rs = server.CreateObject("ADODB.recordset")

If Request.Form <> "" Then
	CompanyName = Qsite.chgStr(Trim(Request.Form("CompanyName")))
	CompanyIndustry = Qsite.chgStr(Trim(Request.Form("CompanyIndustry")))
	CompanyNature = Qsite.chgStr(Trim(Request.Form("CompanyNature")))
	CompanyFormation = Qsite.chgStr(Trim(Request.Form("CompanyFormation")))
	RegFunds = Qsite.chgStr(Trim(Request.Form("RegFunds")))
	EmployeeNum = Qsite.chgStr(Trim(Request.Form("EmployeeNum")))
	CompanyLocation_Province = Qsite.chgStr(Trim(Request.Form("Province")))
	CompanyLocation_City = Qsite.chgStr(Trim(Request.Form("City")))
	CompanyLocation_County = Qsite.chgStr(Trim(Request.Form("County")))
	CompanyContent = Qsite.chgStr(Trim(Request.Form("CompanyContent")))
	
	If CompanyName = "" Or IsNull(CompanyName) Then
		Qsite.ShowMsg "请输入公司名称" , ""
	End If
	If CompanyIndustry = "" Or IsNull(CompanyIndustry) Then
		Qsite.ShowMsg "请选择所属行业" , ""
	End If
	If CompanyNature = "" Or IsNull(CompanyNature) Then
		Qsite.ShowMsg "请选择公司性质" , ""
	End If
	If CompanyFormation = "" Or IsNull(CompanyFormation) Then
		Qsite.ShowMsg "请输入成立时间" , ""
	End If
	If RegFunds = "" Or IsNull(RegFunds) Or Not IsNumeric(RegFunds) Then
		Qsite.ShowMsg "请输入注册资金"
	End If
	If EmployeeNum = "" Or IsNull(EmployeeNum) Then
		Qsite.ShowMsg "请选择员工人数" , ""
	End If
	If CompanyLocation_Province = "" Or IsNull(CompanyLocation_Province) Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyLocation_City = "" Or IsNull(CompanyLocation_City) Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyLocation_County = "" Or IsNull(CompanyLocation_County) Or CompanyLocation_County = "不限" Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyContent = "" Or IsNull(CompanyContent) Then
		Qsite.ShowMsg "请输入公司简介" , ""
	End If
	
	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("CompanyName") = CompanyName
		Rs("CompanyIndustry") = CompanyIndustry
		Rs("CompanyNature") = CompanyNature
		Rs("CompanyFormation") = CompanyFormation
		Rs("RegFunds") = RegFunds
		Rs("EmployeeNum") = EmployeeNum
		Rs("CompanyLocation_Province") = CompanyLocation_Province
		Rs("CompanyLocation_City") = CompanyLocation_City
		Rs("CompanyLocation_County") = CompanyLocation_County
		Rs("CompanyContent") = CompanyContent
		Rs("EditDate") = Qsite.FormatDate(Now())
		Rs.Update
	End If
	Rs.Close
	Qsite.ShowMsg "资料修改成功" , "ChgComInfo_2.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
	CompanyName = Rs("CompanyName")
	CompanyIndustry = Rs("CompanyIndustry")
	CompanyNature = Rs("CompanyNature")
	CompanyFormation = Rs("CompanyFormation")
	RegFunds = Rs("RegFunds")
	EmployeeNum = Rs("EmployeeNum")
	CompanyLocation_Province = Rs("CompanyLocation_Province")
	CompanyLocation_City = Rs("CompanyLocation_City")
	CompanyLocation_County = Rs("CompanyLocation_County")
	CompanyContent = Rs("CompanyContent")
End If
Rs.Close
%>
<script language="javascript" src="../Comm/Area_All.js"></script>
<script language="javascript" src="../Comm/Area_Function.js"></script>
<script language="javascript" src="../Comm/Comm.js"></script>
<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("CompanyName" , "公司名称" , 1 , 100))
			return false;
		if(ComForm.CompanyIndustry.value == "")
		{
			alert("请选择所属行业");
			return false;
		}
		if(ComForm.CompanyNature.value == "")
		{
			alert("请选择公司性质");
			return false;
		}
		if(!checkLength("CompanyFormation" , "成立时间" , 1 , 20))
			return false;
		if(!checkLength("RegFunds" , "注册资金" , 1 , 20))
			return false;
		if(!checkFloat("RegFunds" , "注册资金" , 1 , 10000000000))
			return false;
		if(ComForm.EmployeeNum.value == "")
		{
			alert("请选择员工人数");
			return false;
		}
		if(ComForm.Province.value == "")
		{
			alert("请选择公司所在地");
			return false;
		}
		if(ComForm.City.value == "")
		{
			alert("请选择公司所在地");
			return false;
		}
		if(ComForm.County.value == "" || ComForm.County.value == "不限")
		{
			alert("请选择公司所在地");
			return false;
		}
		if(!checkLength("CompanyContent" , "公司简介" , 1 , 5000))
			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>Company Info</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_2.asp" style="margin:0" onsubmit="return CheckForm();">
					<table width="82%" align=center border="0" cellpadding="5" cellspacing="3">
										<tr>
											<td width="15%" height="25" >公司名称：</td>
											<td width="85%" height="25" ><%=CompanyName%></td>
										</tr>
										<tr  style="DISPLAY:none">
											<td width="15%" height="25" >公司名称：</td>
											<td width="85%" height="25" ><input name="CompanyName" type="text" id="CompanyName" size="60"   value="<%=CompanyName%>" /></td>
										</tr>
										<tr>
											<td height="25" >所属行业：</td>
											<td height="25" ><select name="CompanyIndustry" id="CompanyIndustry"  >
						<option value="">--请选择--</option>
						<%
						Rs.Open "select * from PositionTbl where PositionKey = 0 order by Px asc" , Conn , 1 , 1
						Do While Not Rs.Eof
							Response.Write("<option value="""& Rs("PositionName") &""" ")
							If Rs("PositionName") = CompanyIndustry Then Response.Write(" selected")
							Response.Write(">"& Rs("PositionName") &"</option>")
						Rs.MoveNext
						Loop
						Rs.Close
						%>
					</select></td>
										</tr>
										<tr>
											<td height="25" >公司性质：</td>
											<td height="25" ><select name="CompanyNature" id="CompanyNature"  >
						<option value="" <%If CompanyNature = "" Then Response.Write("selected")%>>--请选择--</option>
						<%
						Rs.Open "select * from CompanyNatureTbl order by CompanyNatureId asc" , Conn , 1 , 1
						Do While Not Rs.Eof
							Response.Write("<option value="""& Rs("CompanyNatureName") &""" ")
							If Rs("CompanyNatureName") = CompanyNature Then Response.Write(" selected")
							Response.Write(">"& Rs("CompanyNatureName") &"</option>")
						Rs.MoveNext
						Loop
						Rs.Close
						%>
					</select></td>
										</tr>
										<tr>
											<td height="25" >成立时间：</td>
											<td height="25" ><input name="CompanyFormation" type="text" id="CompanyFormation" size="20"   value="<%=CompanyFormation%>" /></td>
										</tr>
										<tr>
											<td height="25" >注册资金：</td>
											<td height="25" ><input name="RegFunds" type="text" id="RegFunds" size="20"   value="<%=RegFunds%>" />
						万元</td>
										</tr>
										<tr>
											<td height="25" >员工人数：</td>
											<td height="25" ><select name="EmployeeNum" id="EmployeeNum"  >
						<option value="" <%If EmployeeNum = "" Then Response.Write("selected")%>>--请选择--</option>
						<option value="10人以下" <%If EmployeeNum = "10人以下" Then Response.Write("selected")%>>10人以下</option>
						<option value="10-50人" <%If EmployeeNum = "10-50人" Then Response.Write("selected")%>>10-50人</option>
						<option value="50-200人" <%If EmployeeNum = "50-200人" Then Response.Write("selected")%>>50-200人</option>
						<option value="200-500人" <%If EmployeeNum = "200-500人" Then Response.Write("selected")%>>200-500人</option>
						<option value="500-1000人" <%If EmployeeNum = "500-1000人" Then Response.Write("selected")%>>500-1000人</option>
						<option value="1000以上" <%If EmployeeNum = "1000以上" Then Response.Write("selected")%>>1000以上</option>
					</select></td>
										</tr>
										<tr>
											<td height="25" >公司所在地：</td>
											<td height="25" ><select name="Province"  id="Province" onChange="SelChgCity('City' , document.all.Province.options[document.all.Province.selectedIndex].value , arrProvince , arrCity , 'County');">
											</select>
												<select name="City"  id="City" onChange="SelChgCounty('County' , document.all.City.options[document.all.City.selectedIndex].value , arrCity , arrCounty);">
												</select>
												 <select name="County"  id="County">
												</select></td>
										</tr>
										<tr>
											<td height="25" >公司简介：</td>
											<td height="25" style="line-height: 22px;"><textarea name="CompanyContent" cols="70" rows="15" id="CompanyContent"  ><%=CompanyContent%></textarea><BR><span style="color: #ff0000">公司简介是求职者了解贵司的主要方式，请详细认真填写。(4000字以内)
                                <br />
                            </span><b>根据我们以往的经验，过于简短的公司简介会严重影响招聘效果。</b></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> 
	 
<script language="javascript">
	InitArea("Province" , "City" , "County" , arrProvince , arrCity , arrCounty , "<%=CompanyLocation_Province%>" , "<%=CompanyLocation_City%>" , "<%=CompanyLocation_County%>")
</script>
                <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()
%>