<!--#include file="head.asp"-->
<!--#include file="md5.asp"-->
<%if session("qyusername")="" then
response.redirect "qylogin.asp"
end if

dname=HtmlEncode(trim(request.form("dname")))
'dusername=HtmlEncode(trim(request.form("username")))
dpassword=HtmlEncode(trim(request.form("password")))
dyewu=HtmlEncode(trim(request.form("dyewu")))
dlei=split(HtmlEncode(trim(request.form("dlei"))),"@")
dfaren=HtmlEncode(trim(request.form("dfaren")))
'dpic=HtmlEncode(trim(request.form("dpic")))
dcity=HtmlEncode(trim(request.form("dcity")))
dhttp=HtmlEncode(trim(request.form("dhttp")))
dmail=HtmlEncode(trim(request.form("dmail")))
daddress=HtmlEncode(trim(request.form("daddress")))
dyoubian=HtmlEncode(trim(request.form("dyoubian")))
dtel=HtmlEncode(trim(request.form("dtel")))
dfax=HtmlEncode(trim(request.form("dfax")))
djieshao=HtmlEncode(request.form("djieshao"))

sql="select * from nyeee_qydata where username='"&HtmlEncode(session("qyusername"))&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if dname<>"" then
rs("name")=dname
'rs("username")=dusername
rs("password")=dpassword
rs("yewu")=dyewu
rs("leiid")=dlei(0)
rs("lei")=dlei(1)
rs("faren")=dfaren
'rs("pic")=dpic
rs("city")=dcity
rs("http")=dhttp
rs("mail")=dmail
rs("address")=daddress
rs("youbian")=dyoubian
rs("tel")=dtel
rs("fax")=dfax
rs("jieshao")=djieshao
rs.update
rs.close  
set rs=nothing                                                                                     
'conn.close   
'set conn=nothing
response.write"<script>alert('修改成功！');location='edit.asp'</script>"

end if%>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{   
    if (document.postart.dname.value.length<1)
	{
        alert("单位名称不能为空！");
        document.postart.dname.focus();
        return false;
    }
    if (document.postart.password.value.length<1)
	{
        alert("登录密码不能为空！");
        document.postart.password.focus();
        return false;
    }
}
//-->
</SCRIPT>

 <div align="center">
  <form action="" method="post" name="postart" onsubmit="return checkadd()">
    <table width="760" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
      <tr>
        <td bgcolor="#FFFFFF"><TABLE width=760 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.Nyeee.Com</b></font></TD>
                      </TR>
                    </TBODY>
                </TABLE></TD>
              </TR>
            </TBODY>
        </TABLE></tD>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><div align="center"> <br>
                <table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
                  <tr bgcolor="#EFF7FE">
                    <td width="100%" colspan="2"><font color="#CC0000">请正确填写您的注册信息，并记住您的用户名及密码。</font></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">单位名称：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dname" size="30" value="<%=rs("name")%>">
                        <font color="#FF0000">*</font></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">用 户 名：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="username" size="20" value="<%=rs("username")%>" readonly>
                        <font color="#FF0000">（不能修改）</font></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">登录密码：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="password" size="20" value="<%=rs("password")%>">
                        <font color="#FF0000">*</font></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">主营业务：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dyewu" size="50" value="<%=rs("yewu")%>">
                    </td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">所在区域：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><select name="dcity" size="1">
                        <option selected value="<%=rs("city")%>"><%=rs("city")%></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%" height="26" align="right" bgcolor="#EFF7FE">行业类别：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><select name="dlei" size="1">
                        <option value="<%=rs("leiid")%>@<%=rs("lei")%>"><%=rs("lei")%></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")%>" selected><%=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%" height="26" align="right" bgcolor="#EFF7FE">单位地址：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="daddress" size="30" value="<%=rs("address")%>">
&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">邮政编码：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dyoubian" size="30" value="<%=rs("youbian")%>" maxlength="6"></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">联 系 人：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dfaren" size="30" value="<%=rs("faren")%>">
                    </td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">联系电话：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dtel" size="30" value="<%=rs("tel")%>">
&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">联系传真：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dfax" size="30" value="<%=rs("fax")%>"></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">电子信箱：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dmail" size="30" value="<%=rs("mail")%>"></td>
                  </tr>
                  <tr>
                    <td width="25%" height="26" align="right" bgcolor="#EFF7FE">网站地址：</td>
                    <td width="76%" height="26" bgcolor="#FFFFFF"><input type="text" name="dhttp" size="30" value="<%=rs("http")%>"></td>
                  </tr>
                  <tr>
                    <td width="25%" height="126" align="right" bgcolor="#EFF7FE">详细资料：</td>
                    <td width="76%" height="126" bgcolor="#FFFFFF"><textarea rows="10" name="djieshao" cols="50"><% if rs("jieshao")<>"" then %><%=replace(rs("jieshao"),"<br>",vbcrlf)%><% end if %>
                </textarea>
                    </td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td width="24%" height="35" align="right" bgcolor="#FFFFFF"><p align="center"></td>
                    <td width="77%" align="right"><p align="left">
                        <input type="submit" value="提交" name="submit" >
&nbsp;
        <input type="reset" value="取消" name="reset">
&nbsp;
        <input type="button" value="返回" name="cmdexit" onClick=" history.back()">
                                    </td>
                  </tr>
                </table>
                <br>
                <br>
        </div></td>
      </tr>
    </table>
   </form>                         
</div>      
<!--#include file="foot.asp"-->
<%rs.close                      
set rs=nothing                                                                                                         
conn.close                       
set conn=nothing%>