<!--#include file="top.asp"--><%usertopview%>
<%sql = "select *  from dlxf_ypxxtwo order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript" src = "user_admin.js" type="text/javascript"></script>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof%>
subcat[<%=count%>] = new Array("<%= trim(rs("dlxf_ypxxtwo"))%>","<%= trim(rs("dlxf_ypxxone_id"))%>","<%= trim(rs("dlxf_ypxxtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount=<%=count%>;

function changelocation(ypxxone)
    {
    document.addform.ypxxtwo_id.length = 0; 

    var ypxxone_id=ypxxone_id;
    var i;
    document.addform.ypxxtwo_id.options[0] = new Option('请选择小类','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == ypxxone)
            { 
                document.addform.ypxxtwo_id.options[document.addform.ypxxtwo_id.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<%sql = "select * from dlxf_ypaddtwo order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("dlxf_addtwo"))%>","<%= trim(rs("dlxf_addone_id"))%>","<%= trim(rs("dlxf_addtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount1=<%=count%>;

function changelocation1(addone)
    {
    document.addform.addtwo_id.length = 0; 

    var addone_id=addone_id;
    var i;
    document.addform.addtwo_id.options[0] = new Option('请选择市','');
    for (i=0;i < onecount1; i++)
        {
            if (subcat1[i][1] == addone)
            { 
                document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
            }        
        }
        
    }
</script>
<script LANGUAGE=JavaScript>
  function textLimitCheck(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值，当前填写文字的数量*/
    messageCount.innerText = thisArea.value.length;
  }
</script>

<script language="JavaScript">
<!--
function checkdata() {
if( addform.coname.value =="" || addform.coname.value.length<3) {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请输入正确的企业名称")
return false;
}
if( addform.cofr.value =="" || addform.cofr.value.length<2) {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请输入正确的企业法人")
return false;
}
if( addform.coms.value =="" || addform.coms.value.length<20) {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请输入20-1000字符的企业描述")
return false;
}
if( addform.cojy.value =="") {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请选择正确的企业经营模式")
return false;
}
if( addform.coyw.value =="" || addform.coyw.value.length<2) {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请输入正确的企业主营业务")
return false;
}
if( addform.comy.value =="" || addform.comy.value.length<2) {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请输入正确的企业主要贸易地区")
return false;
}
if( addform.coxz.value =="") {
alert("\资料修改出错，下面是产生错误的可能原因：\n\n·请选择正确的企业性质")
return false;
}
return true;
}
// -->
</script>

<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="150" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="610" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是：管理中心 > 企业资料</td></tr>
  <tr>
    <td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr>
    <td height=25 bgcolor=#6C94D1>　　<font color=white>企业基本资料管理</font></td>
  </tr>
  <tr>
    <td bgcolor=#ffffff height=25>
<!--======-->

<table width="80%" border="0" cellspacing="0" cellpadding="0" align=center>
<%sql1="select * from dlxf_yp where dlxf_id="&session("id")
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1%>
<form name="addform" method="post" action="lcdzl_save.asp" onSubmit="return checkdata()">
<input name="ypxxone_id_" type="hidden" value="<%=rs1("dlxf_ypxxone_id")%>">
<input name="ypxxtwo_id_" type="hidden" value="<%=rs1("dlxf_ypxxtwo_id")%>">
<input name="addone_id_" type="hidden" value="<%=rs1("dlxf_addone_id")%>">
<input name="addtwo_id_" type="hidden" value="<%=rs1("dlxf_addtwo_id")%>">
  <tr>
    <td height=30 align="center" colspan="2"><font color=#666666>带 * 为必填项</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>企业名称： &nbsp;</td>
	<td width="79%"><input name="coname" type="text" size="40" maxlength="30" value="<%=rs1("dlxf_coname")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right>英文名称： &nbsp;</td>
	<td><input name="coy" type="text" size="40" maxlength="48" value="<%=rs1("dlxf_coy")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right>中文简称： &nbsp;</td>
	<td><input name="cojc" type="text" size="40" maxlength="15" value="<%=rs1("dlxf_cojc")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right>企业网址： &nbsp;</td>
	<td><input name="coweb" type="text" size="40" maxlength="40" value="<%=rs1("dlxf_coweb")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right>成立时间： &nbsp;</td>
	<td><input name="codate" type="text" size="30" maxlength="20" value="<%=rs1("dlxf_codate")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right><font color=red>*</font>企业法人： &nbsp;</td>
	<td><input name="cofr" type="text" size="30" maxlength="20" value="<%=rs1("dlxf_cofr")%>"></td>
  </tr>
  <tr>
    <td height=30 align=right>企业LOGO： &nbsp;</td>
	<td><input name="logo" type="text" size="40" maxlength="48" value="<%=rs1("dlxf_logo")%>" onclick="lookmagic(1)" ID="magicfacepic(1)" readonly> <font onclick="lookmagic(1)" style="CURSOR:hand">选择图片</font>
<div id="magicframe(1)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="my_picture_view.asp?action=1" width="380" height="210" frameborder="0" scrolling="no"></iframe></div>
</td>
  </tr>
  <tr>
    <td height=30 align=right>企业形象图： &nbsp;</td>
	<td><input name="yppic" type="text" size="40" maxlength="48" value="<%=rs1("dlxf_pic")%>" onclick="lookmagic(2)" ID="magicfacepic(2)" readonly> <font onclick="lookmagic(2)" style="CURSOR:hand">选择图片</font>
<div id="magicframe(2)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="my_picture_view.asp?action=2" width="380" height="210" frameborder="0" scrolling="no"></iframe></div>
	</td>
  </tr>
  <tr>
    <td height=150 align=right><font color=red>*</font>企业描述： &nbsp;</td>
	<td ><p style="line-height:180%"><textarea name="coms" cols=45 rows=8 onkeyUp="textLimitCheck(this, 1000);"><%=rs1("dlxf_coms")%></textarea><br>限 20-1000 个字符  已输入 <font color="#CC0000"><span id="messageCount"><%if rs1("dlxf_coms")<>"" then%><%=len(rs1("dlxf_coms"))%><%else%>0<%end if%></span></font> 个字</td>
  </tr>
  <tr>
    <td height=30 align=right><font color=red>*</font>经营模式： &nbsp;</td>
	<td><select name="cojy">
<option value="">请选择经营模式</option>
<option value="生产/制造"<%if rs1("dlxf_cojy")="生产/制造" then%> selected<%end if%>>生产/制造</option>
<option value="贸易"<%if rs1("dlxf_cojy")="贸易" then%> selected<%end if%>>贸易</option>
<option value="服务"<%if rs1("dlxf_cojy")="服务" then%> selected<%end if%>>服务</option>
<option value="政府机构"<%if rs1("dlxf_cojy")="政府机构" then%> selected<%end if%>>政府机构</option>
<option value="组织团体/其他"<%if rs1("dlxf_cojy")="组织团体/其他" then%> selected<%end if%>>组织团体/其他</option>
</select></td>
  </tr>
  <tr>
  <td align=right height=40>主营行业： &nbsp;</td>
  <td>
<%sql="select *  from dlxf_ypxxtwo where dlxf_ypxxtwo_id="&rs1("dlxf_ypxxtwo_id")
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
ypxxone=rs("dlxf_ypxxone")
ypxxtwo=rs("dlxf_ypxxtwo")
rs.close%>
<p style="line-height:180%"><%=ypxxone%> > <%=ypxxtwo%><br><select name="ypxxone_id" onChange="changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value)">
<option value="" selected>请选择大类</option>
<%sql="select *  from dlxf_ypxxone order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("dlxf_ypxxone_id")%>"><%=rs("dlxf_ypxxone")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select>
<select name="ypxxtwo_id">
<option selected value="">请选择小类</option>
</select></td>
  </tr>
  <tr>
    <td height=30 align=right><font color=red>*</font>主营业务： &nbsp;</td>
	<td><input name="coyw" type="text" size="35" maxlength="80" value="<%=rs1("dlxf_coyw")%>"> 限80个汉字</td>
  </tr>
  <tr>
    <td height=40 align=right>选择地区： &nbsp;</td>
	<td><%sql="select *  from dlxf_ypaddtwo where dlxf_addtwo_id="&rs1("dlxf_addtwo_id")
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
addone=rs("dlxf_addone")
addtwo=rs("dlxf_addtwo")
rs.close%>
<p style="line-height:180%"><%=addone%> > <%=addtwo%><br><select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择省</option>
                    <%
sql="select *  from dlxf_ypaddone order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("dlxf_addone_id")%>"><%=rs("dlxf_addone")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select>
<select name="addtwo_id">
<option selected value="">请选择市</option>
</select></td>
  </tr>
  <tr>
    <td height=30 align=right><font color=red>*</font>贸易地区： &nbsp;</td>
	<td><input name="comy" type="text" size="35" maxlength="30" value="<%=rs1("dlxf_comy")%>"> 限30个汉字</td>
  </tr>
  <tr>
    <td height=30 align=right>主要客户： &nbsp;</td>
	<td><input name="cokh" type="text" size="35" maxlength="30" value="<%=rs1("dlxf_cokh")%>"> 限30个汉字</td>
  </tr>
  <tr>
    <td height=30 align=right><font color=red>*</font>企业性质： &nbsp;</td>
	<td><select name="coxz">
<option value="">请选择企业性质</option>
<option value="有限责任公司"<%if rs1("dlxf_coxz")="有限责任公司" then%> selected<%end if%>>有限责任公司</option>
<option value="股份有限公司"<%if rs1("dlxf_coxz")="股份有限公司" then%> selected<%end if%>>股份有限公司</option>
<option value="外商投资企业"<%if rs1("dlxf_coxz")="外商投资企业" then%> selected<%end if%>>外商投资企业</option>
<option value="外国企业常驻代表机构"<%if rs1("dlxf_coxz")="外国企业常驻代表机构" then%> selected<%end if%>>外国企业常驻代表机构</option>
<option value="外国企业分支机构"<%if rs1("dlxf_coxz")="外国企业分支机构" then%> selected<%end if%>>外国企业分支机构</option>
<option value="合伙企业"<%if rs1("dlxf_coxz")="合伙企业" then%> selected<%end if%>>合伙企业</option>
<option value="个人独资企业"<%if rs1("dlxf_coxz")="个人独资企业" then%> selected<%end if%>>个人独资企业</option>
<option value="非法人公司企业"<%if rs1("dlxf_coxz")="非法人公司企业" then%> selected<%end if%>>非法人公司企业</option>
<option value="国有企业"<%if rs1("dlxf_coxz")="国有企业" then%> selected<%end if%>>国有企业</option>
</select></td>
  </tr>
  <tr>
    <td height=30 align="center" colspan="2"><input type="submit" name="Submit" value="修 改" class="input1"></td>
  </tr>
</form>
<%rs1.close%>
</table>

<!--======-->
	</td>
  </tr>
</table>
<!--####################################-->
	</td>
  </tr>
<tr><td height=25></td></tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<script language="javascript"> 
    changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value); 
</script>
<script language="javascript"> 
    changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value); 
</script>
<!--====== bottom ========-->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="img/bottom_bg.gif">
<tr><td height=2 bgcolor=#6C94D1></td></tr>
  <tr>
    <td align="center" height=80><%=citybottom%></td>
  </tr>
</table>
</body>
</html>