<!--#include file="conn.asp"-->
<!-- #include file="include.asp" -->
<%
if request.Form("action")="add_com_user" then
call add_com_user
end if
sub add_com_user()
com_name=request.form("com_name")
com_name=replace(com_name," ","")
com_name=replace(com_name,",","")
com_name=replace(com_name,"'","")
com_name=replace(com_name,"&","")
com_name=replace(com_name,";","")
com_pass=trim(request.form("com_pass"))
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_name='"&com_name&"'"
rs.open sql,conn,1,3
if not rs.eof then
response.write"<SCRIPT language=JavaScript>alert('用户名重复，请重新填写！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs.addnew
rs("com_name")=com_name
rs("com_pass")=com_pass
rs("company")=company
rs("tel")=tel
rs("address")=address
rs("biz")=biz
rs("logo")=logo
rs("content")=content
rs("pas")=0
rs("vip")=0
rs("star")=1
rs("idate")=now()
rs.update
session("com_id")=rs("com_id")
end if
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('恭喜您!成为武汉电脑报价网的注册会员！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
end sub %>

<script language="JavaScript">
<!--
function  check_reg() {
  if (register.com_name.value=="") {
		alert("请填写用户名！");
		register.com_name.focus();		
		    return (false);
  }
    if (register.com_name.value.length < 3) {
		alert("用户名最少3位！");
		register.com_name.focus();		
		    return (false);
  }

  var pwd = document.register.com_pass.value;
  if (register.com_pass.value=="") {
		alert("请填写密码！");
		register.com_pass.focus();		
		    return (false);
  }  
  if (register.com_pass.value.length < 6) {
		alert("密码最少６位！");
		register.com_pass.focus();		
		    return (false);
  }
  if (register.com_pass.value.length > 16) {
		alert("密码最多16位！");
		register.com_pass.focus();		
		    return (false);
  }
  var pwd2 = document.register.com_pass1.value;
  if (register.com_pass1.value=="") {
		alert("请再次输入密码！");
		register.com_pass1.focus();		
		    return (false);
  }  
  if (pwd != pwd2) {
    alert("两次密码输入不一致！");
    document.register.com_pass.value="";
    document.register.com_pass1.value="";
	return false;
  }
  if (register.company.value=="") {
		alert("请填写公司全称！");
		register.company.focus();		
		    return (false);
  }
  if (register.tel.value=="") {
		alert("请填写联系电话！");
		register.tel.focus();		
		    return (false);
  }
  if(document.register.licence.checked == false) {
   alert('请点击确认已阅读本站的注册协议！');
   document.register.licence.focus();
   return false;
   }
 else
	document.register.submit();
}// -->
</script>
<HTML><HEAD><TITLE>PCBaoJia.com</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet type=text/css>
</HEAD>
<BODY leftmargin="0" topmargin="0">
<div align="center"> 
<%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"><FORM action="" method=post name=register>
                          <TABLE width="100%" border=1 align=center cellPadding=5 cellSpacing=5 borderColorLight=#cccccc borderColorDark=white bgcolor="#EFFCFE">
                                <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="21%" align="right" bgcolor="#FFFFFF">* 用户名</TD>
                                    <TD width="79%" bgcolor="#FFFFFF">
                                      <INPUT name=com_name class="input1">
                                      <font 
            color=#ff0000>（用户名必须是字母和数字，最少3位）</font></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">* 密码 </TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=com_pass class="input1" type=password>
                                      <font 
            color=#ff0000>（密码位数必须是6-16位）</font></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">* 再次输入密码 </TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=com_pass1 class="input1" type=password ></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">* 公司全称</TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=company size="45" class="input1"></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">* 联系电话</TD>
                                    <TD bgcolor="#FFFFFF"><input name=tel size="30" class="input1">
                                        <font 
            color=#ff0000>（如有多个电话，请用逗号&quot;,&quot;隔开）</font></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">公司地址</TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=address size="45" class="input1"></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF"> 经营范围</TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=biz size="45" class="input1"></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">公司标志</TD>
                                    <TD bgcolor="#FFFFFF">
                                      <INPUT name=logo size="30" class="input1">
                                      <input type="button" name="Submit2" value="上传图片" onClick="window.open('upload_flash.asp?formname=register&editname=logo&uppath=uppic/logo','','status=no,scrollbars=no,top=20,left=110,width=420,height=100')">
                                      <font 
            color=#ff0000>（120×80的图片）</font></TD>
                                  </TR>
                                  <TR bgcolor="FBFED7">
                                    <TD align="right" bgcolor="#FFFFFF">公司简介</TD>
                                    <TD bgcolor="#FFFFFF">
                                      <textarea name="content" cols="50" rows="8" class="input1"></textarea></TD>
                                  </TR>
                                  <TR align="center" bgcolor="C7F3FF">
                                    <TD colspan="2" style="font-size:13px;font-weight:bold;color=blue"><table cellspacing="0" cellpadding="5">
                                        <tr>
                                          <td width="611" align="center">注册协议 </td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#EFFCFE"><p> 　　 1、本站只接收各经销商申请。 <br>
                　　 3、保证所填信息及发布的报价均真实有效，如因信息不实而引起的各种不良事宜，一律自行承担全部责任。<br>
                　　 4、本站仅负责提供报价信息，不承担报价信息以外的其它责任。 <br>
                　　 5、请认真填写好自己的全部真实资料，否则本站工作人员将删除信息不全、不真实的注册用户。</p></td>
                                        </tr>
                                    </table></TD>
                                  </TR>
                                  <TR align="center" bgcolor="C7F3FF">
                                    <TD colspan="2" style="font-size:13px;font-weight:bold;color=blue"><input type="checkbox" name="licence" value="1">
        确定已经认真阅读并接受协议</TD>
                                  </TR>
                                  <TR align="center">
                                    <TD colspan="2" style="font-size:13px;font-weight:bold;color=blue"><input name=B1 type=button onClick="check_reg()" value="　　确 认 提 交　　">　　
                                        <input name=Reset type=reset value=重新填写>
                                        <input name=action type=hidden value=add_com_user></TD>
                                  </TR>
                                </TBODY>
                              </TABLE>
                            </FORM></td>
                          </tr>
                          <tr>
                            <td height="2" bgcolor="ADECF9"></td>
                          </tr>
                      </table></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"-->
</div>
</BODY>
</HTML>
