<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="top.asp"-->
<!--#include file="../include/money.asp"-->
<!--#include file="../include/jmail.asp" -->

<style type="text/css" media="screen">
@import url("../home/css/global/v1.2.css@t=20060512.css");
@import url("../home/css/component.php@t=20060315.css");
@import url("../home/css/sys/detail.php@t=20060522.css");
</style>
<%
hy "user/login.asp"
left_open="shop"
'//是否已开店铺
If Request.Cookies(Rikee)("huiyuan")="" Then 
Response.redirect "/user/login.asp"
Response.End
End if
set yz = conn.execute("select id,zt,name from shop where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"'")
if  Not yz.eof Then
Response.redirect "/user/addshangpin.asp"
Response.End
End if

%>
<%'获取真实IP地址
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
userip2 = Request.ServerVariables("REMOTE_ADDR")
if userip = ""  then
ip=userip2
else
ip=userip
end If
usernamm()
'判断是否是来自代理
if Request.Cookies(Rikee)("dailiid")<>"" and isnumeric(Request.Cookies(Rikee)("dailiid")) then
dailiid=clng(Request.Cookies(Rikee)("dailiid"))
else
dailiid=0
end if

set rs = conn.execute("select * from shop where name='"&shopnet("name")&"'")
if  not rs.eof then 
response.write "<script>alert(""您填写的店铺名称已经存在,请重新填写一个！。"");history.back();</script>"
response.end 
end if  
rs.close
set rs=nothing
set  rsr=server.createobject("adodb.recordset")
sqls="select * from shop"
rsr.open sqls,conn,1,3
rsr.addnew
rsr("lbid")=shopnet("lbid")
rsr("name")=shopnet("name")
rsr("name2")=shopnet("name2")
rsr("pc")=shopnet("pc")
rsr("tel")=shopnet("tel")
rsr("fax")=shopnet("fax")
rsr("mail")=shopnet("mail")
if shopnet("sl")=1 then 
rsr("sl")=my_shop_a
rsr("rq")=my_shop_b
shijian=dateadd("d",my_shop_b,now())
rsr("sj3")=shijian
else
rsr("sl")=10000
shijian=dateadd("d",365,now())
rsr("sj3")=shijian
rsr("rq")=365
rsr("fee")=1
end if
rsr("fw")=shopnet("fw")
rsr("ip1")=ip
rsr("sj2")=now()
rsr("dz1")=shopnet("dizhi")
rsr("dz")=shopnet("dz")
rsr("oicq")=shopnet("oicq")
rsr("ip2")=ip
rsr("zt")=1

rsr("huiyuan")=Request.Cookies(Rikee)("huiyuan")
rsr.update
rsr.close
set rsr=nothing

'发信
set rs = conn.execute("select id from shop where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"'")
Response.Cookies(Rikee)("myuserid")=rs(0)
email=shopnet("mail")
html="<html><head><title>感谢您的注册</title><meta http-equiv=Content-Type content=text/html; charset=gb2312></head><body bgcolor=#FFFFFF text=#000000>"
html=html&"亲爱的"&shopnet("name")&",您好！<br><br>　 恭喜您申请<a href=http://"&my_url&" target=""_blank"">"&my_name&"</a>提供的免费版个人商店成功。<br>"
html=html&"　 欢迎您使用<a href=http://"&my_url&" target=""_blank"">"&my_name&"</a>提供的网上个人商店，系统已经自动为您开通营业账号。<br>"
html=html&" 如<a href=http://"&my_url&" target=""_blank"">我们</a>。<br>"
html=html&"您的商店网址为：<a href=http://"&my_url&"/shop/1/myshop.asp?shopid="&rs(0)&" target=""_blank"">http://"&my_url&"/shop/1/myshop.asp?shopid="&rs(0)&"</a>"
nr=html&"<br><br>"&email_bd&"</body></html>"
bt= "您在"&my_name&"申请的个人店铺成功申请"
if mailserver="0" then
smtp email,bt,nr
elseif mailserver="1" then
jmail1 email,bt,nr
end if

%>
<table width="762" border="0" align="center" cellpadding="2" cellspacing="0" style='BORDER-COLLAPSE: collapse;MARGIN: 3px'>
  <tr> 
    <td height="15" colspan="2"></td>
  </tr>
  <tr> 
    <td width="180" valign="top"> 
      <!--#include file="left.asp"-->
<td width="582" height="280" valign="top"><table cellspacing="0" cellpadding="2" width="100%" border="0">
        <tbody>
          <tr>
            <td align="middle" height="10"><div align="center">
              <table cellspacing="0" cellpadding="0" width="100%" border="0">
                  <tbody>
                    <tr>
                      <td align="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><table border="0" align="left" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td width="1"><IMG SRC="../images/mytaobaobj1_3.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
                                  <td width="120" align="center" background="../images/mytaobaobj1_4.gif"><font color="#FFFFFF">申请店铺</font></td>
                                  <td width="1"><IMG SRC="../images/mytaobaobj1_6.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
                                </tr>
                            </table></td>
                          </tr>
                        </table>
                          <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td height="4" bgcolor="1E88C1"></td>
                            </tr>
                          </table>
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td height="5"></td>
                            </tr>
                        </table></td>
                    </tr>
                  </tbody>
                </table>
            </div></td>
          </tr>
        </tbody>
      </table>
<div align="center" id="UserAgreement" style="color: #FF0000">
    祝贺您！您已经成功地申请了<%=my_name%>提供的店铺,同时一封注册通知信已经发送到您的EMAIL信箱中。
  </div>
  <table width="98%" border="0" cellspacing="0" cellpadding="4">
    <tr>
      <td height="35" colspan="2">开始营业前请注意一下几点：</td>
      </tr>
    <tr>
      <td width="10%"><div align="right">
        <div align="right"><img src="../image/002.gif" width="10" height="10"></div>
      </div></td>
      <td width="90%"><a href="psfs.asp">设置店铺的配送方式 &gt;&gt;</a></td>
    </tr>
    <tr>
      <td><div align="right">
        <div align="right">
          <div align="right"><img src="../image/002.gif" width="10" height="10"></div>
        </div>
      </div></td>
      <td>选择您自己喜欢的店铺模板</td>
    </tr>
    <tr>
      <td><div align="right"><img src="../image/002.gif" width="10" height="10"></div></td>
      <td>及时地发布店铺相关公告</td>
    </tr>
    <tr>
      <td><div align="right"><img src="../image/002.gif" width="10" height="10"></div></td>
      <td>添加商品时请注意商品图片的尺寸大小</td>
    </tr>
    <tr>
      <td><div align="right"><img src="../image/002.gif" width="10" height="10"></div></td>
      <td>及时地在客服中心添加一些关于您的店铺的相关问题</td>
    </tr>
       <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <hr size="1">
    </td>
  </tr>
</table>
<!--#include file="../bottom.asp"-->
