⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regshjia.asp

📁 商业网站开发有源代码可以运行
💻 ASP
📖 第 1 页 / 共 2 页
字号:
        <%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 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 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>*&nbsp;*</font>
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">商店名称&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
                          <input name="name" type="text" id="name" size="30" maxlength="40"><font color=red>*&nbsp;*</font>
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">负责人&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
                          <input name="name2" type="text" id="name2" ><font color=red>*&nbsp;*</font>
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">公司地址&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp;&nbsp; 
                          <input name="dz" type="text"  id="dz" size="50" maxlength="50"><font color=red>*&nbsp;*</font>
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">邮编&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
                          <input name="pc" type="text"  id="name4" size="15" maxlength="6"><font color=red>*&nbsp;*</font>
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">电话&nbsp;</td>
                        <td width="350" height="25">&nbsp; 
                          <input name="tel" type="text" id="name5" size="20" maxlength="30"><font color=red>*&nbsp;*</font>
                          区号-电话号码-分机号码</td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">传真&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
                          <input name="fax" type="text" id="name7" size="30" maxlength="40"><font color=red>*&nbsp;*</font>
                          可不埴</td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">E-mail信箱&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
						<input name="shjiaemail"  type="text" id="shjiaemail">
                                            <font color=red>*&nbsp;*</font>请填写您有效的邮件地址,以便于我们为您提供有效的服务。
						</td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td width="200" height="25" align="right" valign="middle">您打算在本柜台销售多少个商品&nbsp;</td>
                        <td width="350" height="25" valign="middle">&nbsp; 
                          <input name="num" type="text" id="num" size="10" maxlength="5">
                          个&nbsp;<font color=red>*&nbsp;*</font> </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" colspan="2" valign="middle" bgcolor="#f1f1f1">&nbsp;<font color="#FF3333"> 
                          &gt;&gt;商家自定网店管理登陆名称密码</font></td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align="right" valign="middle">管理员登陆名称:&nbsp;</td>
                        <td height="25" valign="middle"> &nbsp; 
                          <input name="shjianame" type="text" id="shjianame" >
                          只能是4-16位英文或数字组成</td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align="right" valign="middle">管理员密码:&nbsp;</td>
                        <td height="25" valign="middle"> &nbsp; 
                          <input name="shjiapassword" type="password"  id="shjiapassword" >
                          长度必须大于6个字符小于20个字符,只能为英语字、数字,例如:songxf2003等。 </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align="right" valign="middle">确认管理员密码:&nbsp;</td>
                        <td height="25" valign="middle"> &nbsp; 
                          <input name="shjiapassword1" type="password" id="shjiapassword1">
                                      请将输入的密码再次输入,以免设置密码出错。</td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align="right" valign="middle">密码提问:&nbsp;</td>
                        <td height="25" valign="middle"> &nbsp; 
                          <input name="quesion"  type="text" id="quesion">
                        </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align="right" valign="middle">密码答案:&nbsp;</td>
                        <td height="25" valign="middle">&nbsp;  
                          <input name="answer" type="text"  id="answer">
                                      (密码遗忘时将验证此答案) </td>
                      </tr>
                      <tr bgcolor="#FFFFFF"> 
                        <td colspan="2" class=pad> 
                          <div align="center"> 
                            <input onClick="return checkuserinfo();" type="image" border="0" name="submit3" src="../images/xx.gif" width="54" height="18" align="middle" >
                                        (以上所有项均须填写) </div>
                        </td>
                      </tr>
                    </table>        
      </form>
	  <table width="10" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr> 
                                        <td height="7"></td>
                                      </tr>
                                    </table>
                                  </td>
                                          </tr>
                                        </table>
                                        <br>
                                      </td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                            </table>
                          </td>
                  </tr>
                </table>
              </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=760 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

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"))&"'",conn,1,1
if rs.recordcount>0 then
call usererr()
rs.close
else
rs.close

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("quesion")=trim(request("quesion"))
rs("name")=trim(request("name"))            '商店名称  
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("answer")=md5(trim(request("answer")))



rs("adddate")=now()
rs("lastlogin")=now()
'rs("logins")=1
'rs("zhifufangshi")=0
'rs("songhuofangshi")=0
'rs("reglx")=1
'rs("jifen")=0
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("songxf")("shjianame")=trim(request("username"))
'response.Cookies("songxf")("jiaoyijine")=0
'response.Cookies("songxf")("jifen")=0
'response.Cookies("songxf")("reglx")=1
'response.Cookies("shangcheng").expires=date+1

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 & "网上商城!</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=760 border=1 cellspacing=0 cellpadding=0 align=center bordercolor=#EDECEC><tr> <td  bordercolor=#FFFFFF bgcolor=#FFFFFF> "
response.Write "<table width=80% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=80 class=pad><font color=#cb6f00>商家加盟注册成功</font><br>"
response.Write "<li>恭喜您已注册成为["&webname&"]加盟商,请记好您的管理名及密码</li><br><li>我们在确认后会在24小时内开通您的商城</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=760 border=1 cellspacing=0 cellpadding=0 align=center bordercolor=#EDECEC><tr>  "
response.write "<td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center><table width=80% border=0 align=center cellpadding=2 cellspacing=0><tr><td class=pad><font color=#cb6f00>商家加盟注册失败</font></td></tr><tr>"
response.write "<td class=pad ><font color=#FF0000>·您输入的用户名或Email地址或管理员名称已存在,请返回重新输入!<br>·<a href=javascript:history.go(-1)><font color=red>点击返回上一页</font></a> </font></td></tr></table></td></tr></table>"
end sub
%>
<!--#include file="../service1.asp" -->
<!--#include file="../copyright.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -