<!-- #include file="conn.asp" -->
<!-- #include file="include.asp" -->
<%
com_id=session("com_id")
if request.Form("action")="mod_com" then
call mod_com
end if
sub mod_com()
company=trim(request.form("company"))
tel=trim(request.form("tel"))
address=trim(request.form("address"))
if address="" then address="-" end if
biz=trim(request.form("biz"))
if biz="" then biz="-" end if
logo=trim(request.form("logo"))
if logo="" then logo="-" end if
content=trim(request.form("content"))
if content="" then content="-" end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from com_user where com_id=" & com_id
rs.open sql,conn,1,3
if rs.eof then
response.write"<SCRIPT language=JavaScript>alert('没有这个此用户的资料！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("company")=company
rs("tel")=tel
rs("address")=address
rs("biz")=biz
rs("logo")=logo
rs("content")=content
rs.update
end if
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('资料修改成功！');"
response.write"this.location.href='com_mod.asp';</SCRIPT>" 
response.end
end sub 

set rs=server.createobject("adodb.recordset")
sql="select * from com_user where com_id=" & com_id
rs.open sql,conn,1,1
%>
<html>
<head>
<title>增加报价--PCBaoJia.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<script language="JavaScript">
<!--
function  check_mod_com() {
  if (mod_com_form.company.value=="") {
		alert("请填写公司全称！");
		mod_com_form.company.focus();		
		    return (false);
  }
  if (mod_com_form.tel.value=="") {
		alert("请填写联系电话！");
		mod_com_form.tel.focus();		
		    return (false);
  }
 else
	document.mod_com_form.submit();
}// -->
</script>
<body>
<%call head(0)%>
<table width="764" border="0" cellpadding="0" cellspacing="0" background="images/bg_body.gif" align="center">
  <tr>
    <td align="center"><table width="760" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="159" align="center" valign="top" bgcolor="3E93C9"><TABLE WIDTH=157 BORDER=0 CELLPADDING=0 CELLSPACING=0>
              <TR>
                <TD COLSPAN=3> <IMG SRC="images/login_t.gif" WIDTH=157 HEIGHT=38 ALT=""></TD>
              </TR>
              <TR>
                <TD> <IMG SRC="images/login_l.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
                <TD width="139" align="center" bgcolor="#FFFFFF"><%call login%></TD>
                <TD> <IMG SRC="images/login_r.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
              </TR>
              <TR>
                <TD COLSPAN=3> <IMG SRC="images/login_b.gif" WIDTH=157 HEIGHT=8 ALT=""></TD>
              </TR>
            </TABLE>
              <br>
              <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2F75A6" bgcolor="2F75A6">
                <tr>
                  <td height="3" bgcolor="#3399CC"></td>
                </tr>
                <tr>
                  <td align="center" class="white_b_14">最新加盟经销商</td>
                </tr>
            </table></td>
          <td align="center" valign="top"><TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0>
              <TR>
                <TD> <IMG SRC="images/body_l.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
                <TD></TD>
                <TD align="right"> <IMG SRC="images/body_r.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
              </TR>
            </TABLE>
              <table width="578"  border="0" cellpadding="0" cellspacing="1" bgcolor="2F75A6">
                <tr>
                  <td bgcolor="FFFFFF"><table width="100%" height="235"  border="0" cellpadding="10" cellspacing="0">
                      <tr>
                        <td height="4" bgcolor="ADECF9"></td>
                      </tr>
                      <tr>
                        <td align="center">
                          <TABLE width="100%" border=1 align=center cellPadding=5 cellSpacing=5 borderColorLight=#cccccc borderColorDark=white bgcolor="#EFFCFE">
                          <form name="mod_com_form" method="post" action="">
                            <TBODY>
                              <TR align="center" bgcolor="C7F3FF">
                                <TD height="40" colSpan=2 class=title>修改资料<span class="red_12px">(请注意：“*”为必需填写的项目)</span></TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD width="20%" align="right" bgcolor="#FFFFFF">* 公司全称</TD>
                                <TD width="80%" bgcolor="#FFFFFF">
                                  <INPUT name=company class="input1" value="<%=rs("company")%>" size="45"></TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD align="right" bgcolor="#FFFFFF">* 联系电话</TD>
                                <TD bgcolor="#FFFFFF" class="red_12px"><input name=tel class="input1" value="<%=rs("tel")%>" size="30">
                                    （如有多个电话，请用逗号&quot;,&quot;隔开）</TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD align="right" bgcolor="#FFFFFF">公司地址</TD>
                                <TD bgcolor="#FFFFFF">
                                  <INPUT name=address class="input1" value="<%=rs("address")%>" size="45"></TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD align="right" bgcolor="#FFFFFF"> 经营范围</TD>
                                <TD bgcolor="#FFFFFF">
                                  <INPUT name=biz class="input1" value="<%=rs("biz")%>" size="45"></TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD align="right" bgcolor="#FFFFFF">公司标志</TD>
                                <TD bgcolor="#FFFFFF" class="red_12px">
                                  <INPUT name=logo class="input1" value="<%=rs("logo")%>" size="30">
                                  <input type="button" name="Submit2" value="上传图片" onClick="window.open('upload_flash.asp?formname=mod_com_form&editname=logo&uppath=uppic/logo&logo='+document.mod_com_form.logo.value,'','status=no,scrollbars=no,top=20,left=110,width=420,height=100')">
                                  （120×80的图片）</TD>
                              </TR>
                              <TR bgcolor="FBFED7">
                                <TD align="right" bgcolor="#FFFFFF">公司简介</TD>
                                <TD bgcolor="#FFFFFF">
                                  <textarea name="content" cols="50" rows="8" class="input1"><%=rs("content")%></textarea></TD>
                              </TR>
                              <TR align="center" bgcolor="C7F3FF">
                                <TD colspan="2" style="font-size:13px;font-weight:bold;color=blue">								<input name=B1 type=button onClick="check_mod_com()" value="提 交">
                                    <input name=Reset type=reset value=重新填写>
                                <input name=action type=hidden value=mod_com></TD>
                              </TR>
                            </TBODY></form>
                          </TABLE>
</td>
                      </tr>
                      <tr>
                        <td height="2" bgcolor="ADECF9"></td>
                      </tr>
                  </table></td>
                </tr>
            </table>
              <table width="96%" height="5"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<TABLE WIDTH=764 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
    <TD> <IMG SRC="images/foot_1.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_2.gif" WIDTH=153 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_3.gif" WIDTH=3 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_4.gif" WIDTH=600 HEIGHT=8 ALT=""></TD>
    <TD> <IMG SRC="images/foot_5.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
  </TR>
</TABLE>
<!--#include file="foot.asp"-->
</body>
</html>
<%
rs.Close()
Set rs = Nothing
%>