<!--#include file="conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/cinfo.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	uname=ReplaceBadChar(Request.Cookies("admin_company_name"))
	action=ReplaceBadChar(Trim(Request.QueryString("action")))
	if action="add" then
		cname=ReplaceBadChar(Trim(Request.Form("cname")))
		cxz=ReplaceBadChar(Trim(Request.Form("cxz")))
		trade=ReplaceBadChar(Trim(Request.Form("trade")))
		fund=ReplaceBadChar(Trim(Request.Form("fund")))
		cypic=ReplaceBadChar(Trim(Request.Form("cypic")))
		yuangong=ReplaceBadChar(Trim(Request.Form("yuangong")))
		fdate=ReplaceBadChar(Trim(Request.Form("fdate")))
		address=ReplaceBadChar(Trim(Request.Form("address")))
		area=ReplaceBadChar(Trim(Request.Form("hukouprovince")))
		zpnum=ReplaceBadChar(Trim(Request.Form("hukoucapital")))
		pname=ReplaceBadChar(Trim(Request.Form("pname")))
		phone=ReplaceBadChar(Trim(Request.Form("phone")))
		fax=ReplaceBadChar(Trim(Request.Form("fax")))
		zip=ReplaceBadChar(Trim(Request.Form("zip")))
		email=ReplaceBadChar(Trim(Request.Form("email")))
		hukoucity=ReplaceBadChar(Trim(Request.Form("hukoucity")))
		http=Trim(Request.Form("http"))
		zptext=Trim(Request("zptext"))
		faren=ReplaceBadChar(Trim(Request.Form("faren")))
		pic=Trim(Request.Form("pic"))
	
		if yuangong="" then fax="未知"
		if fund="" then fund="未知"
		if faren="" then faren="未知"
		if fax="" then fax="未知"
		if http="" then http="http://"
		if pic="" then pic="uppic/nocypic.gif"
		
		Set rs_c = Server.CreateObject("ADODB.Recordset")
		sql="select * from company where uname='"&uname&"'"
		rs_c.open sql,conn,2,3
		rs_c("cname")=cname
		rs_c("cxz")=cxz
		rs_c("trade")=trade
		rs_c("fund")=fund
		rs_c("cypic")=cypic
		rs_c("yuangong")=yuangong
		rs_c("fdate")=fdate
		rs_c("address")=address
		rs_c("area")=area
		rs_c("zpnum")=zpnum
		rs_c("shisus")=hukoucity
		rs_c("pname")=pname
		rs_c("phone")=phone
		rs_c("fax")=fax
		rs_c("zip")=zip
		rs_c("email")=email
		rs_c("http")=http
		rs_c("jianj")=zptext
		rs_c("faren")=faren
		rs_c("pic")=pic
		rs_c("idate")=date()
		rs_c.update
		rs_c.close
		set rs_c=nothing
		response.Cookies("company_name")=cname
		response.Cookies("company_name").expires=(now()+1/24)
		response.write"<SCRIPT language=JavaScript>alert('企业资料修改成功,现在为您返回');"
		response.write"this.location.href='main.asp';</SCRIPT>"
		response.end
	end if
	
	set rs_c=server.createobject("adodb.recordset")
	c_sql="select * from company where uname='"&uname&"'"
	rs_c.open c_sql,conn,1,1
	if rs_c.bof and rs_c.eof then
		response.write"<SCRIPT language=JavaScript>alert('对不起，非法操作！');"
		response.write"javascript:window.close();</SCRIPT>"
		response.end
	end if
	cname=rs_c("cname")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<SCRIPT src="../inc/fPopUpCalendarDlg.js"></SCRIPT>
<SCRIPT language=JavaScript src="../inc/validate.js"></SCRIPT>
<SCRIPT language=JavaScript src="../inc/companyreg.js"></SCRIPT>
<script language="JavaScript">
<!--
//功能：去掉字符串前后空格
//返回值：去掉空格后的字符串
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
function GethukouCapital(capitalid)
{
document.frames["hukoucapitalframe"].location.replace("../inc/gethukoucapital.asp?capitalid="+capitalid);
}
function GethukouCity(cityid)
{
document.frames["hukoucityframe"].location.replace("../inc/gethukoucity.asp?cityid="+cityid);
}
function String.prototype.lenB()
{
return this.replace(/[^\x00-\xff]/g,"**").length;
}
-->
</script>
<style type="text/css">
<!--
.style13 {color: #125A55;
	font-weight: bold;
	font-size: 14px;
}
.style14 {color: #000000; font-size: 12px; font-weight: bold; }
.style6 {color: #000000; font-weight: bold; }
-->
</style>
</head>
<body>
<!--#include file="bottom.asp"-->
<script language="javascript">
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
</script>
<iframe height=0 width=0 src="" id="hukoucapitalframe"></iframe>
<iframe height=0 width=0 src="" id="hukoucityframe"></iframe>
<table width="100%"  border="0" cellpadding="2" cellspacing="1" bgcolor="#D2E9FB">
  <tr>
    <td height="25" bgcolor="#D2E9FB" scope="col"><span class="style6"> <span class="style14">　<img src="images/main_folder.gif" width="12" height="10"> </span></span><span class="style13">公司基本信息</span></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
	<form action="?action=add" method="post" name="register" style="height:0 ">
      <TABLE cellSpacing=1 cellPadding=3 width="100%" align=center border=0>
        <TBODY>
          <TR bgcolor="#FFFFFF">
            <TD width="15%" height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 公司名称：</div></TD>
            <TD colSpan=3><input type="text" name="cname" style="width: 305px;font-size: 12px;" value="<%=rs_c("cname")%>" <% if rs_c("cname")<>"" then Response.Write("readonly")%> size="20">
            </TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 公司类型：</div></TD>
            <TD colSpan=3><select name="cxz" style="width: 180px;font-size: 12px;">
              <option value="国有企业" <% if rs_c("cxz")="国有企业" then Response.Write("selected")%>>国有企业</option>
              <option value="外资企业" <% if rs_c("cxz")="外资企业" then Response.Write("selected")%>>外资企业</option>
              <option value="合资企业" <% if rs_c("cxz")="合资企业" then Response.Write("selected")%>>合资企业</option>
              <option value="私营企业" <% if rs_c("cxz")="私营企业" then Response.Write("selected")%>>私营企业</option>
              <option value="民营企业" <% if rs_c("cxz")="民营企业" then Response.Write("selected")%>>民营企业</option>
              <option value="股份制企业" <% if rs_c("cxz")="股份制企业" then Response.Write("selected")%>>股份制企业</option>
              <option value="集体企业" <% if rs_c("cxz")="集体企业" then Response.Write("selected")%>>集体企业</option>
              <option value="集体事业" <% if rs_c("cxz")="集体事业" then Response.Write("selected")%>>集体事业</option>
              <option value="乡镇企业" <% if rs_c("cxz")="乡镇企业" then Response.Write("selected")%>>乡镇企业</option>
              <option value="行政机关" <% if rs_c("cxz")="行政机关" then Response.Write("selected")%>>行政机关</option>
              <option value="社会团体" <% if rs_c("cxz")="社会团体" then Response.Write("selected")%>>社会团体</option>
              <option value="事业单位" <% if rs_c("cxz")="事业单位" then Response.Write("selected")%>>事业单位</option>
              <option value="跨国企业(集团)" <% if rs_c("cxz")="跨国企业(集团)" then Response.Write("selected")%>>跨国企业(集团)</option>
              <option value="其它" <% if rs_c("cxz")="其它" then Response.Write("selected")%>>其它</option>
            </select>
            </TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 行业类别：</div></TD>
            <TD colSpan=4>

<select name="trade">
<%
	call listcompany(rs_c("trade"))
%>
</select>
</TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"> 注册资金：</div></TD>
            <TD colSpan=4><input type="text" name="fund" maxlength=25 style="width: 80px;font-size: 12px;" value="<%= rs_c("fund") %>" size="20">
                  <select name="cypic" style="width: 80px;font-size: 12px;">
                    <option value="万人民币" <% if rs_c("cypic")="万人民币" then Response.Write("selected")%>>万人民币</option>
                    <option value="万美元" <% if rs_c("cypic")="万美元" then Response.Write("selected")%>>万美元</option>
                    <option value="万港币" <% if rs_c("cypic")="万港币" then Response.Write("selected")%>>万港币</option>
                    <option value="万欧元" <% if rs_c("cypic")="万欧元" then Response.Write("selected")%>>万欧元</option>
                  </select>
            </TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right">员工数量：</div></TD>
            <TD colSpan=4 valign="middle"><input type="text" name="yuangong" maxlength=25 style="width: 80px;font-size: 12px;" value="<%= rs_c("yuangong") %>" size="20">（人）</TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 成立日期：</div></TD>
            <TD colSpan=4><input type="text" maxlength=20 name="fdate" style="width: 180px;font-size: 12px;" value="<%= rs_c("fdate") %>" size="20">&nbsp;&nbsp;<INPUT name=button1 onClick="fPopUpCalendarDlg(fdate);return false" type=button value="选择成立日期"><font color="#FF0000"></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 地&nbsp;&nbsp;&nbsp;&nbsp;址：</div></TD>
            <TD colspan="3" noWrap><input type="text" name="address" maxlength=100 style="width: 305px;font-size: 12px;" size="20" value="<%= rs_c("address") %>">
            </TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 所在城市：</div></TD>
            <TD colSpan=3>
			 <select name="hukouprovince" size="1" id="select" onChange=GethukouCapital(this.options[this.selectedIndex].value)>
                            <option value="" selected>省份</option>
<%
	area=rs_c("area")
	if area="0" or area&"a"="a" then area=1000
	zpnum=rs_c("zpnum")
	if zpnum="0" or zpnum&"a"="a" then zpnum=1000
	set rs=server.createobject("adodb.recordset")
	sql="select * from job_provinceandcity where fid=0 order by date desc"
	rs.open sql,conn,1,1
	do while not rs.eof
	if int(rs_c("area"))=rs("id") then
		response.write"<OPTION value="&rs("id")&" selected>"&rs("province_city")&"</option>"
	else
		response.write"<OPTION value="&rs("id")&">"&rs("province_city")&"</option>"
	end if
	rs.movenext
	loop
	rs.close
	set rs=nothing
%>
			</select>
			<span id="load300"></span> <span id="chukoucapital">
                          <select name=hukoucapital id="select" onchange=GethukouCity(this.options[this.selectedIndex].value)>
                            <option value="" selected>地级市</option>
<%
	set rs=server.createobject("adodb.recordset")
	sql="select * from job_provinceandcity where fid="&int(area)&" order by date desc"
	rs.open sql,conn,1,1
	do while not rs.eof
	if int(zpnum)=rs("id") then
		response.write"<OPTION value="&rs("id")&" selected>"&rs("province_city")&"</option>"
	else
		response.write"<OPTION value="&rs("id")&">"&rs("province_city")&"</option>"
	end if
	rs.movenext
	loop
	rs.close
	set rs=nothing
%>
                          </select>
                          </span>&nbsp;<span id="load400"></span> <span id="chukoucity">
                          <select name=hukoucity id="hukoucity">
                            <option value="" selected>县级地区</option>
<%
	shisus=rs_c("shisus")
	if shisus="0" or shisus&"a"="a" then shisus=1000
	set rs=server.createobject("ADODB.Recordset")
	sql="select * from job_provinceandcity where fid="&zpnum&" order by id "
	rs.open sql,conn,1,1
	do while not rs.eof
	if int(shisus)=rs("id") then
		response.write"<OPTION value="&rs("id")&" selected>"&rs("province_city")&"</option>"
	else
		response.write"<OPTION value="&rs("id")&">"&rs("province_city")&"</option>"
	end if
	rs.movenext
	loop
	rs.close
	set rs=nothing
%>
                          </select>
                        </span></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 联&nbsp;系&nbsp;人：</div></TD>
            <TD width="30%"><input type="text" name="pname" maxlength=20 style="width: 120px;font-size: 12px;" value="<%=rs_c("pname")%>" size="20">
            </TD>
            <TD width="10%"><div align="right"><span class="mem_coinfo"><FONT color=#ff3333>* </FONT>联系电话：</span></div></TD>
            <TD width="45%"><span class="mem_coinfo">
              <input name="phone" type="text" style="width: 220px;font-size: 12px;" value="<%=rs_c("phone")%>"  maxlength=90 size="20">
            </span></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 class=mem_coinfo><div align="right">传真号码：</div></TD>
            <TD noWrap><span class="mem_coinfo">
              <input type="text" name="fax" maxlength=20 style="width: 120px;font-size: 12px;" value="<%=rs_c("fax")%>" size="20">
            </span> </TD>
            <TD noWrap class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 邮政编码：</div></TD>
            <TD noWrap class=mem_coinfo><input type="text" name="zip" maxlength=6 style="width: 100px;font-size: 12px;" value="<%=rs_c("zip")%>" size="20"></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height=30 vAlign=top class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 电子信箱：</div></TD>
            <TD noWrap><input type="text" name="email" maxlength=50 style="width: 120px;font-size: 12px;" value="<%=rs_c("email")%>" size="20"></TD>
            <TD vAlign=top noWrap class=mem_coinfo><div align="right">公司网站： </div></TD>
            <TD vAlign=top noWrap class=mem_coinfo><input type="text" name="http" maxlength="100" style="width: 220px;font-size: 12px;" value="<% if rs_c("http")="" then Response.Write("http://") else Response.Write(rs_c("http"))%>" size="20"></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD vAlign=middle class=mem_coinfo><div align="right"><FONT color=#ff3333>*</FONT> 公司简介：</div></TD>
            <TD colSpan=3><textarea name="zptext" rows="6" style="width: 620px;height: 150px;font-size: 12px;play:none;"><%=rs_c("jianj")%></textarea><br>（公司简介2000字以内）</TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height="50" vAlign=middle class=mem_coinfo><div align="right">法人代表：</div></TD>
            <TD colSpan=3><input name="faren" type="text" id="faren" style="width: 120px;font-size: 12px;" value="<%=rs_c("faren")%>" size="20" maxlength=50></TD>
          </TR>
          <TR bgcolor="#FFFFFF">
            <TD height="50" vAlign=middle class=mem_coinfo><div align="right">营业执照：</div></TD>
            <TD colSpan=3><input name="pic" type="text" id="pic" style="width: 220px;font-size: 12px;" value="<%=rs_c("pic")%>" size="20" maxlength=50>&nbsp; &nbsp;
              <a href="JavaScript:openScript('../upfile/uploadzhizhao.asp',320,210)"><font color="red">上传执照</font></a></TD>
          </TR>
        </TBODY>
      </TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
        <TBODY>
          <TR>
            <TD bgColor=#000000 height=1></TD>
          </TR>
          <TR>
            <TD width=1 height=10 bgcolor="#FFFFFF"></TD>
          </TR>
          <TR>
            <TD height=40 align=middle bgcolor="#FFFFFF" class=font><div align="center">
              <input name="button2" type="button" value="保 存" style="width: 50px;font-size: 12px;" onClick="checkmod()">
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="reset" name="Submit" value="重置">
            </div></TD>
          </TR>
        </TBODY>
      </TABLE>
    </FORM>
	</td>
  </tr>
</table>
<%
	rs_c.close
	set rs_c = nothing
	conn.close
	set conn=nothing
%>
</body>
</html>