<!--#include file="head.asp"-->

<!-- 这里是主题 --> 

<%
dname=trim(request.form("dname"))
dusername=trim(request.form("username"))
dpassword=trim(request.form("password"))
dyewu=trim(request.form("dyewu"))
dlei=split(trim(request.form("dlei")),"@")
dfaren=trim(request.form("dfaren"))
dcity=trim(request.form("dcity"))
dhttp=trim(request.form("dhttp"))
dmail=trim(request.form("dmail"))
daddress=trim(request.form("daddress"))
dyoubian=trim(request.form("dyoubian"))
dtel=trim(request.form("dtel"))
dfax=trim(request.form("dfax"))
djieshao=trim(request.form("djieshao"))
if dname<>"" then
sql="select * from nyeee_qydata where username='"&HtmlEncode(dusername)&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
if recordcount<>0 then
response.write "<script>alert('此用户名已经存在，请重新选择！');history.back();</script>"
else
rs.addnew
rs("name")=HtmlEncode(dname)
rs("username")=HtmlEncode(dusername)
rs("password")=HtmlEncode(dpassword)
rs("yewu")=HtmlEncode(dyewu)
rs("leiid")=HtmlEncode(dlei(0))
rs("lei")=HtmlEncode(dlei(1))
rs("faren")=HtmlEncode(dfaren)
rs("city")=HtmlEncode(dcity)
rs("http")=HtmlEncode(dhttp)
rs("mail")=HtmlEncode(dmail)
rs("address")=HtmlEncode(daddress)
rs("youbian")=HtmlEncode(dyoubian)
rs("tel")=HtmlEncode(dtel)
rs("fax")=HtmlEncode(dfax)
rs("jieshao")=HtmlEncode(djieshao)
rs("mark")=1
rs.update
rs.close
response.redirect "qiye.asp"
end if
end if
%>

<style type="text/css">
<!-- 
td           { font-size: 12px; line-height: 17px }
body         { font-size: 12px; line-height: 17px }
p            { margin-top: 1; margin-bottom: 1 }
a:link       { text-decoration: none; color: black }
a:visited    { text-decoration: none; color: black }
a:active     { text-decoration: none }
a:hover      { text-decoration: underline; color: red }
-->
</style>
<SCRIPT LANGUAGE="JavaScript"><!--//
function checkadd()
{   
    if (document.postart.dname.value.length<1)
	{
        alert("单位名称不能为空！");
        document.postart.dname.focus();
        return false;
    }
    if (document.postart.username.value.length<1)
	{
        alert("用户名不能为空！");
        document.postart.username.focus();
        return false;
    }
    if (document.postart.password.value.length<1)
	{
        alert("登录密码不能为空！");
        document.postart.password.focus();
        return false;
    }
    if (document.postart.dcity.value=="选择区域")
	{
        alert("请选择所在区域！");
        document.postart.dcity.focus();
        return false;
    }
    if (document.postart.dlei.value=="选择行业类别")
	{
        alert("请选择行业类别！");
        document.postart.dlei.focus();
        return false;
    }
}
//-->
</SCRIPT>


 <div align="center">
   <form action="" method="post" name="postart" onSubmit="return checkadd()">
     <table width="900" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
       <tr>
         <td bgcolor="#FFFFFF"><TABLE width=900 border=0 align="center" cellPadding=0 cellSpacing=0 bgcolor="CAE2F8">
             <TBODY>
               <TR bgcolor="CAE2F8">
                 <TD bgcolor="CAE2F8"><TABLE width=100% border=0 cellPadding=0 cellSpacing=0>
                     <TBODY>
                       <TR bgcolor="EFF7FE">
                         <TD width=23 vAlign=top><IMG alt=arrow 
src="images/arrow_01.gif"></TD>
                         <TD>企业黄页注册(<span class="info6">带 <font color="#FF0000">*</font> 号的项目为必填项</span>)</TD>
                         <TD align="right" bgcolor="EFF7FE"><font color="#A2CCF2"><b>Www.8cms.Cn</b></font></TD>
                       </TR>
                     </TBODY>
                 </TABLE></TD>
               </TR>
             </TBODY>
         </TABLE></tD>
       </tr>
       <tr>
         <td bgcolor="#FFFFFF"><div align="center"> <br>
                 <table width="660" border="0" cellpadding="3" cellspacing="1" bgcolor="CAE2F8">                                      
    <TR bgcolor="#EFF7FE">
      <TD colSpan=2><P align=left><font color="#CC0000">请正确填写您的注册信息，并记住您的用户名及密码。</font></P></TD>
    </TR>
    <tr>
      <td align="right" bgcolor="#EFF7FE">单位名称：</td>
      <td width="77%" height="13" bgcolor="#FFFFFF"><input type="text" name="dname" size="30">
        <font color="#FF0000">*</font></td>
    </tr>                                                                                                   
    <tr>                                                                    
      <td width="25%" align="right" bgcolor="#EFF7FE">用 户 名：</td>                                                                                                            
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="username" size="30"> <font color="#FF0000">*</font></td>                                                                                                                                            
    </tr>                                                                    
    <tr>                                                                    
      <td width="25%" align="right" bgcolor="#EFF7FE">登录密码：</td>                                                                                                           
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="password" name="password" size="30"> <font color="#FF0000">*</font></td>                                                                                                                                           
    </tr>                                                                                                                                
    <tr>                                                                  
      <td width="25%" align="right" bgcolor="#EFF7FE">主营业务：</td>                                                                                                          
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dyewu" size="50"> </td>                                                                                                                                          
    </tr>                                                                 
    <tr>                                                                                                                               
      <td width="25%" align="right" bgcolor="#EFF7FE">所在区域：</td>                                                                                                                              
      <td width="77%" height="26" bgcolor="#FFFFFF">                                                                                                                              
          <select name="dcity" size="1"><option selected value="选择区域">选择区域</option>                                                                                                                                       
            <%                                                                                                                                       
			set rs_city = server.createobject("adodb.recordset")                                                                                                                                       
			sql = "select * from city"                                                                                                                                       
			rs_city.open sql,conn,1,1                                                                                                                                       
			do while not rs_city.eof                                                                                                                                       
			%>                                                                                                                                       
          <option value="<%=rs_city("city")%>"><%=rs_city("city")%></option>                                                                                                                                       
		  <%                                                              
		  rs_city.movenext                                                                                                                                       
		  loop                                                                                                                                       
		  rs_city.close                                                                                                                                       
		  set rs_city = nothing                                                                                                                                       
		  %>                                                                                                                                       
         </select> <font color="#FF0000">*</font>                                                                                                                                        
      </td>                                                                                                                                 
    </tr>                                                                    
    <tr>                                                                                                                                
      <td width="25%" align="right" bgcolor="#EFF7FE">行业类别：</td>                                                                                                                               
      <td width="77%" height="26" bgcolor="#FFFFFF">                                                                                                                               
          <select name="dlei" size="1"><option selected value="选择行业类别">选择行业类别</option>                                                                                                                                        
            <%                                                                                                                                        
			set rs_lei = server.createobject("adodb.recordset")                                                                                                                                        
			sql = "select * from nyeee_lei"                                                                                                                                        
			rs_lei.open sql,conn,1,1                                                                                                                                        
			do while not rs_lei.eof                                                                                                                                        
			%>                                                                                                                                        
          <option value="<%=rs_lei("id")%>@<%=rs_lei("lei")%>"><%=rs_lei("lei")%></option>                                                                                                                                        
		  <%                                                              
		  rs_lei.movenext                                                                                                                                        
		  loop                                       
		  rs_lei.close                                                                                                                                        
		  set rs_lei = nothing                                                                                                                                                                                                                                       
		  %>                                                                                                                                        
         </select> <font color="#FF0000">*</font>                                                                                                                                         
      </td>                                                                                                                                 
    </tr>                                                             
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">单位地址：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="daddress" size="30"> </td>                                                                                                                                            
    </tr>                                                                                                                                 
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">邮政编码：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dyoubian" size="30" maxlength="6"></td>                                                                                                                                 
    </tr>                                                            
    <tr>                                                                                                                               
      <td width="25%" align="right" bgcolor="#EFF7FE">联 系 人：</td>                                                                                                                              
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dfaren" size="30"> </td>                                                                                                                                            
    </tr>                                                                                                                                 
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">联系电话：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dtel" size="30"> </td>                                                                                                                                            
    </tr>                                                                                                                                 
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">联系传真：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dfax" size="30"></td>                                                                                                                                 
    </tr>                                                             
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">电子信箱：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dmail" size="30" value="@"></td>                                                                                                                                 
    </tr>                                                                                                                                                                                                     
    <tr>                                                                                                                                 
      <td width="25%" align="right" bgcolor="#EFF7FE">网站地址：</td>                                                                                                                                 
      <td width="77%" height="26" bgcolor="#FFFFFF"><input type="text" name="dhttp" size="30" value="http://"></td>                                                                                                                                 
    </tr>                                                                                                                                                                                                                                                                                                                     
    <tr>                                                                                                                                
      <td width="25%" align="right" bgcolor="#EFF7FE">详细资料：</td>                                                                                                                                
      <td width="77%" height="126" bgcolor="#FFFFFF"><textarea rows="10" name="djieshao" cols="50"></textarea>                                                                                                                               
      </td>                                                                                                                                        
    </tr>                                                                                                                                                                                                                                                                                           
  <tr>                                                                                                                         
      <td width="25%" align="right" bgcolor="#FFFFFF">                                                                                                                           
        <p align="center"></td>                                                                                                                                                                                                                                           
      <td width="77%" height="35" align="right" bgcolor="#FFFFFF">                                                                                                                           
        <p align="left"><input type="submit" value="提交" name="submit" >&nbsp;                                             
        <input type="reset" value="取消" name="reset">&nbsp; <input type="button" value="返回" name="cmdexit" onClick="javascript:history.back()"></td>                                                                                                                                
  </tr>                                                                                                                                                                                                        
  </table> <br>
         </div></td>
       </tr>
     </table>
   </form>   
</div>              
<!--#include file="foot.asp"-->