<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim action
action=request.QueryString("action")%>
<HTML><HEAD>
<meta name="description" content="免费建站 网上开店 免费网上开店 网上购物 电脑 网络 软件 随身视听 家用电器 音响 照相机 摄像机 数码产品 手机 电话 鲜花 玩具 礼品 游戏 汽车 摩托 服装 鞋帽 箱包 服饰 香水 彩妆 化妆品 保健品 珠宝首饰 影视 音乐 音像 动漫 办公用品 设备 耗材 运动休闲 户外野营 居家 日用 装饰 宠物 邮币 古董 字画 收藏 乐器 明星 工艺品 游戏卡 电话卡 邮箱卡 成人用品 情趣用品"> 
<meta name="keywords" content="免费建站,网上开店,免费网上开店,网上购物">
<META http-equiv=Content-Type content='text/html; charset=gb2312'>
<LINK href=imagess/shop.css type=text/css rel=stylesheet><script language=JavaScript>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkuserinfo()
{
   if(checkspace(document.shjiainfo.shjianame.value)) {
	document.shjiainfo.shjianame.focus();
    alert("对不起，请填写用户名！");
	return false;
  }
  if(checkspace(document.shjiainfo.name.value)) {
	document.shjiainfo.name.focus();
    alert("对不起，请填写网站名称！");
	return false;
  }
    if(checkspace(document.shjiainfo.url.value)) {
	document.shjiainfo.url.focus();
    alert("对不起，请填写网站域名！");
	return false;
  }
  if(checkspace(document.shjiainfo.name2.value)) {
	document.shjiainfo.name2.focus();
    alert("对不起，请填写网站负责人名称！");
	return false;
  }
    if(checkspace(document.shjiainfo.shjiapassword.value) || document.shjiainfo.shjiapassword.value.length < 6 || document.shjiainfo.shjiapassword.value.length >20) {
	document.shjiainfo.shjiapassword.focus();
    alert("密码长度不能不能这空，在6位到20位之间，请重新输入！");
	return false;
  }
    if(document.shjiainfo.shjiapassword.value != document.shjiainfo.shjiapassword1.value) {
	document.shjiainfo.shjiapassword.focus();
	document.shjiainfo.shjiapassword.value = '';
	document.shjiainfo.shjiapassword1.value = '';
    alert("两次输入的密码不同，请重新输入！");
	return false;
  }

 if(document.shjiainfo.shjiaemail.value.length!=0)
  {
    if (document.shjiainfo.shjiaemail.value.charAt(0)=="." ||        
         document.shjiainfo.shjiaemail.value.charAt(0)=="@"||       
         document.shjiainfo.shjiaemail.value.indexOf('@', 0) == -1 || 
         document.shjiainfo.shjiaemail.value.indexOf('.', 0) == -1 || 
         document.shjiainfo.shjiaemail.value.lastIndexOf("@")==document.shjiainfo.shjiaemail.value.length-1 || 
         document.shjiainfo.shjiaemail.value.lastIndexOf(".")==document.shjiainfo.shjiaemail.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.shjiainfo.shjiaemail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.shjiainfo.shjiaemail.focus();
   return false;
   }
   if(checkspace(document.shjiainfo.quesion.value)) {
	document.shjiainfo.quesion.focus();
    alert("对不起，请填写密码提问！");
	return false;
  }
   if(checkspace(document.shjiainfo.answer.value)) {
	document.shjiainfo.answer.focus();
    alert("对不起，请填写密码提问的答案！");
	return false;
  }
}
function checkshouhuoxx()
{
   if(checkspace(document.shouhuoxx.userzhenshiname.value)) {
	document.shouhuoxx.userzhenshiname.focus();
    alert("对不起，请填写真实姓名！");
	return false;
  }
  if(checkspace(document.shouhuoxx.shouhuodizhi.value)) {
	document.shouhuoxx.shouhuodizhi.focus();
    alert("对不起，请填写收货人详细收货地址！");
	return false;
  }
  if(checkspace(document.shouhuoxx.youbian.value)) {
	document.shouhuoxx.youbian.focus();
    alert("对不起，请填写邮编！");
	return false;
  }
  if(document.shouhuoxx.youbian.value.length!=6) {
	document.shouhuoxx.youbian.focus();
    alert("对不起，请正确填写邮编！");
	return false;
  } 
    if(checkspace(document.shouhuoxx.usertel.value)) {
	document.shouhuoxx.usertel.focus();
    alert("对不起，请留下您的联系电话！");
	return false;
  }     
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
<style type="text/css">
<!--
.kkkkkkk {
	border-top: 1px solid #EAEAEA;
	border-right: 1px solid #EAEAEA;
	border-bottom: 1px solid #EAEAEA;
	border-left: 1px solid #EAEAEA;
}
.style6 {color: #000000}
-->
</style>
<TITLE>[咕噜噜电子商务]免费网上开店--商家免费注册</TITLE>
</HEAD>
<!--#include file=top.asp-->

<p>
  <%  select case action
	case ""%>
</p><br>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
      
    <td width="190" valign="top"> <br>
      <table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="89" background="imagess/please_list_left_1.gif"><b><font color="ffffff"> 
            &nbsp;&nbsp;品牌站点</font></b></td>
          <td width="101" align="right" background="imagess/please_list_left_2.gif"><IMG SRC="imagess/please_list_left_3.gif" WIDTH=5 HEIGHT=29 ALT=""></td>
        </tr>
      </table>
      <table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="1" bgcolor="FF9A56"></td>
          <td width="188"><!--#include file="shops1.asp" --></td>
          <td width="1" bgcolor="FF9A56"></td>
        </tr>
      </table>
      <table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="3"><img src="imagess/please_list_left_4.gif" width="3" height="3"></td>
          <td width="184" height="3" background="imagess/please_list_left_5.gif"><img src="imagess/please_list_left_5.gif" width="2" height="3"></td>
          <td width="3"><img src="imagess/please_list_left_6.gif" width="3" height="3"></td>
        </tr>
      </table>
    </td> 
    <td width="570" height="350" valign="top"> 
      <div align="center"><font color="#FF3333" size="3"><strong><br>
        请<%=webname%>商家仔细阅读各项条款</strong></font><br>
          <br>
          <table width="95%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#ffffff"> 
<td>
<%call tiaoyue()%>
</td>
</tr>
</table>        
        <br>
      <table name=agree border="0" cellpadding="10" cellspacing="0" align=center width="100%">
<tr align=center>
<td width="50%" align="right"> 
<FORM name=register method=post action=reg_shang.asp?action=yes>
<input type="hidden" name="action" value="agree">
<INPUT class="go-wenbenkuang" type=submit value=" 同意注册 " name=Submit>
</FORM> 
</td>
<td width="50%" align="left">
<FORM action=index.asp method=post>
<INPUT class=go-wenbenkuang type=submit value=" 我不同意 ">
</FORM></td>
</tr>
    
</table></div></td>
    </tr>
  </table>
  <SCRIPT>
	secs = 60; // Number of secs to delay -CHINA-studio
	wait = secs * 100;
	document.forms.register.Submit.disabled =true;
	for(i=1;i<=(wait/100);i++) {
		window.setTimeout("doUpdate(" + i + ")", i * 100);
	}
	window.setTimeout("Timer()", wait);

	function doUpdate(num) {
		if(num == (wait/100)) {
			document.forms.register.Submit.value = " 同意注册 ";
		} else {
			wut = (wait/100)-num;
			document.forms.register.Submit.value = "同意前请先阅读 (" + wut + ")";
		}
	}
	function Timer() {
		document.forms.register.Submit.disabled =false;
	}
</SCRIPT>
<%case "yes"%>
<form name=shjiainfo method=post action=reg_shang.asp?action=save>
<table width="900" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EAEAEA"> 
<td colspan="2" valign="middle"><font color="#FF3300">&gt;&gt; 商家联系信息</font></td> 
</tr>
<tr bgcolor="#FFFFFF">
  <td align="right">推荐商家：</td>
  <td valign="middle"><input class="wenbenkuang" name="jieshaoren" type="text"  id="name4" size="15" maxlength="20" >    
    您进驻我们联盟的介绍人/企业(商家ID)。<a href="listzt.asp?id=1289"><span class="style6"><u>佣金计划详情</u></span></a></td> 
</tr>
<tr bgcolor="#FFFFFF"> 
<td width="18%" align="right">网站类别：</td>
<td width="82%" valign="middle">
	<%set rs=server.createobject("adodb.recordset")
	rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else%>
<select class="wenbenkuang" name="anclassid" size="1" id="anclassid" onChange="changelocation(document.shjiainfo.anclassid.options[document.shjiainfo.anclassid.selectedIndex].value)">
<option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
		<%dim selclass
        selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof%>
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
	<%
        rs.movenext
        loop
	end if
        rs.close
%>
</select>
-> 
<select class="wenbenkuang" name="Nclassid">
	<%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
	if not(rs.eof and rs.bof) then
	%>
<option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
	<% rs.movenext
	do while not rs.eof%>
<option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
	<% rs.movenext
	loop
	end if
	rs.close
	set rs = nothing
%>
</select>
<font color=red>**</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">网站名称：</td>
<td valign="middle">
<input class="wenbenkuang" name="name" type="text" id="name" size="30" maxlength="18"> <font color=red>**</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">网站域名：</td>
<td valign="middle">
<input class="wenbenkuang" name="url" type="text" id="url" size="10" maxlength="18">
<select size="1" name="guluu">
<option value=".guluu.com">.guluu.com</option>
</select><font color=red>(*注：域名只能用英文字母或数字组成，如xiaoyu)   **</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">负 责 人：</td> 
<td valign="middle">
<input class="wenbenkuang" name="name2" type="text" id="name2" maxlength="10"> <font color=red>**</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">公司地址：</td>
<td valign="middle">
<input class="wenbenkuang" name="dz" type="text"  id="dz" size="50" maxlength="40"> <font color=red>**</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">邮　　编：</td>
<td valign="middle">
<input class="wenbenkuang" name="pc" type="text"  id="name4" size="10" maxlength="6" onKeyPress="event.returnValue=IsDigit();"> <font color=red>**</font> 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">电　　话：</td>
<td> 
<input class="wenbenkuang" name="tel" type="text" id="name5" size="30" maxlength="30"> <font color=red>**</font> 
区号-电话号码-分机号码</td> 
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">传　　真：</td>
<td valign="middle">
<input class="wenbenkuang" name="fax" type="text" id="name7" size="30" maxlength="40">
可不埴</td>
</tr>
<tr bgcolor="#FFFFFF">
  <td align="right" valign="middle">客服QQ号码：</td>
  <td valign="middle">
  <input class="wenbenkuang" name="oicq" type=text  id="oicq" size="12" maxlength="12">     此号码为您的在线客服号码</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">电子邮箱：</td>
<td valign="middle">
<input class="wenbenkuang" name="shjiaemail" size="30" type="text" id="shjiaemail" maxlength="30">
<font color=red>**</font> 
请填写有效的e-mail地址 
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">网站类型：</td>
<td valign="middle">
<input type=radio name=lx id=Select value=0 checked> 
自助免费型（发布<font color="#FF5D00">产品限10</font>个，发布产品后视为长期开通）<br> 
<input type=radio name=lx id=Select value=1> <a href="pay.asp"><u> 
<font color="#FF0000">网店购物型</font></u></a>（365元/年，开放网店所有功能，但不开放企业功能，购买广告位<font color="#FF5D00">狂打五折</font>）<br>
<input type=radio name=lx id=Select value=2> <a href="pay.asp"> 
<font color="#FF0000"><u>公司企业型</u></font></a>（500元/年无限产品,全部功能，无限制，<font color="#000000">送</font><font color="#FF5D00">国际域名</font>/顶级商家/首页广告宣传）
<br>
<font color="red"><b>具体价格列表，详细功能说明及汇款方式，<a href="help.asp?action=fukuan"> 请点击这里查看！</a></b></font>
</td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">管理员ID：</td>
<td valign="middle">
<input class="wenbenkuang" name="shjianame" type="text" id="shjianame" maxlength="18"> <font color=red>**</font> 
只能是4-16位英文或数字组成</td> 
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">管理员密码：</td>
<td valign="middle">
<input class="wenbenkuang" name="shjiapassword" type="password" id="shjiapassword" maxlength="18"> <font color=red>**</font> 
长度必须是6-20个字符只能为英语字、数字</td> 
</tr>
<tr bgcolor="#FFFFFF"> 
<td align="right" valign="middle">确认管理员密码：</td>
<td valign="middle">
<input class="wenbenkuang" name="shjiapassword1" type="password" id="shjiapassword1" maxlength="18"> <font color=red>**</font> 
请将输入的密码再次输入，以免设置密码出错。</td> 
</tr>
<tr bgcolor="#FFFFFF"> 
<td width=18% align="right"></td>
<td>
<input class="go-wenbenkuang" onClick="return checkuserinfo();" type="submit" name="submit" value=" 提交信息 ">
<input class="go-wenbenkuang" onclick="ClearReset()" type="reset" name="Clear" value=" 重新填写 ">
</td>
</tr>
</table>        
</form>
<table width="900" align="center" cellpadding="5" cellspacing="0">
  <tr> 
          
    <td><strong><font color="#FF6600">备注</font></strong>：如果信息埴写正确可靠，系统将<font color="#FF6600"><b>即时</b></font>为您开通试营业账号。并由系统自动将试营业网站管理员账号.请在试营业期间，只要添加您的产品销售信息10条以上，我们即会为您及时开通正式营业账号，如果您想立即开通正式营业账号，请与咕噜噜客服中心联系。</td>
  </tr>
</table><%case "save"%>
<!--#include file="md5.asp"-->
<%call saveuser()%>
<%
end select%>
<%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue2 from shop_config",conn,1,1
response.Write trim(rs("regtiaoyue2"))
rs.Close
set rs=nothing
end sub

sub saveuser()
if session("regtimes")=1 then
response.Write "<table width=900 border=1 cellspacing=0 cellpadding=0 align=center bordercolor=#EDECEC><tr> <td  bordercolor=#FFFFFF bgcolor=#FFFFFF align=center> <br><font color=red>·对不起，您刚注册过用户。</font><br><font color=red >·请稍后再进行注册！</font><br><br><br></td></tr></table> "
response.End
end if

guluu=trim(request("guluu"))
url=trim(request("url"))
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where useremail='"&trim(request("shjiaemail"))&"' or username='"&trim(request("shjianame"))&"' or name='"&trim(request("name"))&"' or url='"&url&guluu&"'",conn,1,1
if rs.recordcount>0 then
call usererr()
rs.close
else
rs.close
guluu=trim(request("guluu"))
url=trim(request("url"))
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia]",conn,1,3
rs.addnew
rs("anclassid")=int(request("anclassid")) '大类
rs("nclassid")=int(request("nclassid"))   '小类
rs("username")=trim(request("shjianame"))
rs("userpassword")=md5(trim(request("shjiapassword")))
rs("useremail")=trim(request("shjiaemail"))
rs("name")=trim(request("name"))          '网站名称 
rs("url")=url&guluu 
rs("name2")=trim(request("name2"))        '负责人
rs("dz")=trim(request("dz"))              '公司地址
rs("pc")=trim(request("pc"))              '邮编
rs("tel")=trim(request("tel"))            '电话
rs("fax")=trim(request("fax"))            '传真
rs("oicq")=trim(request("oicq"))           'QQ
rs("lx")=trim(request("lx"))              '网站类型
rs("jieshaoren")=trim(request("jieshaoren"))  '介绍人
if trim(request("lx"))=0 then
rs("fengge")=1                            '免费用户风格类型	ID
end if
if trim(request("lx"))=1 then
rs("fengge")=2                            '网店风格类型	ID
end if
if trim(request("lx"))="2" then
rs("fengge")=3                           '公司企业风格类型	ID
end if
rs("zhuangtai")=3                         '商铺状态
rs("adddate")=now()
rs("lastlogin")=now()
rs("content")="..."
rs("jiaoyijine")=0
rs("sex")=1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")

rs.update
conn.execute("update config set usernum=usernum+1,lastuser='"&username&"'")
rs.close
set rs=nothing
set rs=conn.execute("select top 1 shjiaid from [shjia] order by shjiaid desc")
shjiaid=rs(0)
response.Cookies("bjx")("shjianame")=trim(request("username"))
session("regtimes")=1
session.Timeout=1

set rs=server.CreateObject("adodb.recordset")
rs.Open "select mailaddress,mailusername,mailuserpass,mailname,mailsend from shop_config",conn,1,1
mailaddress=rs("mailaddress")
mailusername=rs("mailusername")
mailuserpass=rs("mailuserpass")
mailname=rs("mailname")
mailsend=rs("mailsend")
rs.close
set rs=nothing

	on error resume next
	
	topic="您在" & webname & "的加盟注册资料"
	getpass=trim(request("shjiapassword"))
	
	mailbody="<html>"
	mailbody=mailbody & "<title>加盟注册信息</title>"
	mailbody=mailbody & "<body>"
	mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
	mailbody=mailbody & "<TD valign=middle align=top>"
	mailbody=mailbody & trim(request("shjianame"))&"，您好：<br><br>"
	mailbody=mailbody & "欢迎您加盟" & webname & "，我们将提供给您最好的服务！<br>"
	mailbody=mailbody & "下面是您的注册信息：<br><br>"
	mailbody=mailbody & "注册名："&trim(request("shjianame"))&"<br>"
	mailbody=mailbody & "密  码："&getpass&"<br>"
	mailbody=mailbody & "<br><br>"
	mailbody=mailbody & "<center><font color=red>再次感谢您加盟" & webname & "咕噜噜电子商务！<a href=http://www.guluu.com/help.asp?action=fukuan><b>如果您申请的是付费网店，请点击这里速去汇款！</b></a></font>"
	mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
	mailbody=mailbody & "</body>"
	mailbody=mailbody & "</html>"
	
Set JMail=Server.CreateObject("JMail.Message")
	JMail.Charset="gb2312"
	JMail.ContentType = "text/html"
jmail.from = mailsend
jmail.silent = true
jmail.Logging = true
jmail.FromName = mailname
jmail.mailserverusername = mailusername
jmail.mailserverpassword = mailuserpass
jmail.AddRecipient trim(request("shjiaemail"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
	if SendMail="OK" then
	sendmsg="<li>您的加盟注册信息已经发往您的邮箱，请注意查收。</li>"
	else
	sendmsg="<li>由于系统错误，给您发送的加盟注册资料未成功。</li>"
	end if 
response.Write "<table width=900 border=0 cellspacing=0 cellpadding=0 align=center class=table-zuoyou bordercolor=#ffffff><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF height=260>"
response.Write "<table width=70% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=80 class=pad><font color=#ff3300>商家加盟注册成功!</font><br>"
response.Write "<li>恭喜您已注册成为["&webname&"]加盟商，请记好您的管理名及密码</li><br><li>加盟为B型或C型的商户请及时汇款,进入<a href=pay.asp><font color=red>在线支付平台</font></a>或<a href=help.asp?action=fukuan><font color=blue>查看付款方式</font></a></li><br><li>我们在确认后会在8小时内开通您的网站!</li><br>"
response.Write sendmsg&"<br>"
response.Write "<li><a href=index.asp>返回首页</a></li></td></tr></table></td></tr></table>"
end if
end sub

sub usererr()
response.write "<table width=900 border=0 cellspacing=0 cellpadding=0 align=center class=table-zuoyou bordercolor=#ffffff><tr>"
response.write "<td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center height=260><table width=70% border=0 align=center cellpadding=2 cellspacing=0><tr><td class=pad><font color=#ff3300>· 商家加盟注册失败</font></td></tr><tr>"
response.write "<td class=pad><font color=#ff3300>· 您输入的域名或用户名或e-mail地址或管理员名称已存在，请返回重新输入！<br>· <a href=javascript:history.go(-1)><font color=#ff3300>点击返回上一页</font></a> </font></td></tr></table></td></tr></table>"
end sub

%>
<!--#include file="copyright.asp"-->
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.shjiainfo.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.shjiainfo.Nclassid.options[document.shjiainfo.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
</html>





















































