| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 584 人关注过本帖
标题:如何解决这个小问题,有报酬
只看楼主 加入收藏
cc155cc
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-4-13
收藏
 问题点数:0 回复次数:4 
如何解决这个小问题,有报酬

<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim action
action=request.QueryString("action")%>
<html><head><title>[东莞商城 东莞首选购物网 珠三角最大网上商城]购物会员注册--新用户免费注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
function IsDigit()
{
return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkuserinfo()
{
if(checkspace(document.userinfo.username.value)) {
document.userinfo.username.focus();
alert("对不起,请填写用户名!");
return false;
}
if(checkspace(document.userinfo.userpassword.value) || document.userinfo.userpassword.value.length < 6 || document.userinfo.userpassword.value.length >20) {
document.userinfo.userpassword.focus();
alert("密码长度不能不能这空,在6位到20位之间,请重新输入!");
return false;
}
if(document.userinfo.userpassword.value != document.userinfo.userpassword1.value) {
document.userinfo.userpassword.focus();
document.userinfo.userpassword.value = '';
document.userinfo.userpassword1.value = '';
alert("两次输入的密码不同,请重新输入!");
return false;
}

if(document.userinfo.useremail.value.length!=0)
{
if (document.userinfo.useremail.value.charAt(0)=="." ||
document.userinfo.useremail.value.charAt(0)=="@"||
document.userinfo.useremail.value.indexOf('@', 0) == -1 ||
document.userinfo.useremail.value.indexOf('.', 0) == -1 ||
document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
{
alert("Email地址格式不正确!");
document.userinfo.useremail.focus();
return false;
}
}
else
{
alert("Email不能为空!");
document.userinfo.useremail.focus();
return false;
}
if(checkspace(document.userinfo.quesion.value)) {
document.userinfo.quesion.focus();
alert("对不起,请填写密码提问!");
return false;
}
if(checkspace(document.userinfo.answer.value)) {
document.userinfo.answer.focus();
alert("对不起,请填写密码提问的答案!");
return false;
}
if(checkspace(document.userinfo.userzhenshiname.value)) {
document.userinfo.userzhenshiname.focus();
alert("对不起,请填写真实姓名!");
return false;
}
if(checkspace(document.userinfo.shouhuodizhi.value)) {
document.userinfo.shouhuodizhi.focus();
alert("对不起,请填写收货人详细收货地址!");
return false;
}
if(checkspace(document.userinfo.youbian.value)) {
document.userinfo.youbian.focus();
alert("对不起,请填写邮编!");
return false;
}
if(document.userinfo.youbian.value.length!=6) {
document.userinfo.youbian.focus();
alert("对不起,请正确填写邮编!");
return false;
}
if(checkspace(document.userinfo.usertel.value)) {
document.userinfo.usertel.focus();
alert("对不起,请留下您的联系电话!");
return false;
}
if(checkspace(document.userinfo.songhuofangshi.value)) {
document.userinfo.songhuofangshi.focus();
alert("对不起,您还没有选择送货方式!");
return false;
}
if(checkspace(document.userinfo.zhifufangshi.value)) {
document.userinfo.zhifufangshi.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;
}
if(checkspace(document.shouhuoxx.songhuofangshi.value)) {
document.shouhuoxx.songhuofangshi.focus();
alert("对不起,您还没有选择送货方式!");
return false;
}
if(checkspace(document.shouhuoxx.zhifufangshi.value)) {
document.shouhuoxx.zhifufangshi.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">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">
<!--#include file="webtop.asp"-->
<%select case action
case ""%>
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr>
<td height="22" bgcolor="#FFFFFF" bordercolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="80%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr><td height="40" align="center"><font color=red><strong>请用户仔细阅读<%=webname%>注册条约</strong></font></td></tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="80%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#ffffff">
<td>
<%call tiaoyue()%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table name=agree border="0" cellpadding="10" cellspacing="0" align=center width="80%">
<tr align=center>
<td width="50%" align="right">
<FORM name=register method=post action=reg.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>
</td>
</tr>
</table>
</td>
</tr>
</table>

<%case "yes"%>
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF" bordercolor="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<p><font color="#FF3300"><b>请您务必详细填写您的信息,并核对无误,国内用户请留下您的真实中文姓名。<br>
未经您的允许,您的个人信息对外保密。密码提示问题及答案填写后不可更改!(带 <font color=red>**</font> 号为必填项) </b></font></p>
<form name=userinfo method=post action=reg.asp?action=save>
<table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" align="center">
<tr>
<td height=15 colspan=2 bgcolor="#f1f1f1">
<font color="#FF3300">&gt;&gt; 用户名和密码</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>用 户 名:</td>
<td width=70% class=pad>
<input class="wenbenkuang" name="username" type="text" id="username" maxLength="18">
<font color=red>**</font> 支持中文,不支持特殊符号如:*%#!-&%$</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>密  码:</td>
<td class=pad>
<input class="wenbenkuang" name="userpassword" type="password" id="userpassword" maxLength="18">
<font color=red>**</font> 不支持特殊符号如:*%#!-&%$</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>确认密码:</td>
<td class=pad>
<input class="wenbenkuang" name="userpassword1" type="password" id="userpassword1" maxLength="18">
<font color=red>**</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=right>密码提示:</td>
<td class=pad><input name="quesion" type="text" class="wenbenkuang" id="quesion" maxlength="18">
<span class="style1">** 请填入提示问题,以便您取回密码!例:MY NAME </span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=right>密码答案:</td>
<td class=pad><input name="answer" type="text" class="wenbenkuang" id="answer" maxlength="18">
<span class="style1">** 请填入密码提示答案!例:HXL</span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>电子邮箱:</td>
<td class=pad>
<input class="wenbenkuang" name="useremail" type="text" id="useremail">
<font color=red>**</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" valign="middle" bgcolor="#f1f1f1"><font color="#FF3300">&gt;&gt; 用户详细资料</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>您的真实姓名:</td>
<td class=pad>
<input class="wenbenkuang" name="userzhenshiname" type="text" id="userzhenshiname" size="10">
<font color=red>**</font> 以便发货确认
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>您的身份证号:</td>
<td class=pad>
<input class="wenbenkuang" name="MoMNo" type="text" id="MoMNo" maxlength="18" onKeyPress="event.returnValue=IsDigit();">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>姓  别:</td>
<td class=pad>
<input type=radio name=babysex id=Select1 value=0 checked>男
<input type=radio name=babysex id=Select1 value=1>女
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>用户性质:</td>
<td class=pad>
<input type=radio name=dadyname value="个人用户" checked>个人用户
<input type=radio name=dadyname value="企业用户">企业用户
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>收货(通讯)地址:</td>
<td class=pad>
<input class="wenbenkuang" name="shouhuodizhi" type="text" id="shouhuodizhi" size="40" maxlength="30">
<font color=red>**</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>邮  编:</td>
<td class=pad>
<input class="wenbenkuang" name="youbian" type="text" id="youbian" maxlength="6" size="10" onKeyPress="event.returnValue=IsDigit();">
<font color=red>**</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width=30% align=right>联系电话:</td>
<td class=pad>
<input class="wenbenkuang" name="usertel" maxlength="18" type="text" id="usertel">
<font color=red>**</font>
</td>
</tr>
<%
'////////////送货方式
response.Write "<tr bgcolor=#FFFFFF><td width=30% align=right>送货方式:</td><td class=pad><select class=wenbenkuang name=songhuofangshi id=songhuofangshi>"
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from shop_songhuo where fangshi=0 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
response.Write "</select><font color=red>**</font></td></tr>"
response.Write "<tr bgcolor=#FFFFFF><td width=30% align=right>支付方式:</td><td class=pad><select class=wenbenkuang name=zhifufangshi id=zhifufangshi>"
'////////////支付方式
rs2.Open "select * from shop_songhuo where fangshi=1 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
set rs2=nothing
response.Write "</select><font color=red>**</font></td></tr>"
%>
<tr bgcolor="#FFFFFF">
<td width=20% align="right"></td>
<td class=pad>
<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>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr></table>

<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<%case "save"%>
<!--#include file="md5.asp"-->
<%call saveuser()%>
<%
end select%>
<%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue from shop_config",conn,1,1
response.Write trim(rs("regtiaoyue"))
rs.Close
set rs=nothing
end sub

sub saveuser()
if session("regtimes")=1 then
response.Write "<table width=760 border=0 cellspacing=0 cellpadding=0 align=center><tr><td height=300 align=center><font color=red>对不起,您刚注册过用户,请稍后再进行注册!</font></td></tr></table>"
response.End
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where useremail='"&trim(request("useremail"))&"' or username='"&trim(request("username"))&"'",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 [user]",conn,1,3
rs.addnew
rs("username")=trim(request("username"))
rs("userpassword")=md5(trim(request("userpassword")))
rs("useremail")=trim(request("useremail"))
rs("quesion")=trim(request("quesion"))
rs("answer")=md5(trim(request("answer")))
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("shouhuodizhi")=trim(request("shouhuodizhi"))
rs("youbian")=trim(request("youbian"))
rs("usertel")=trim(request("usertel"))
rs("songhuofangshi")=trim(request("songhuofangshi"))
rs("zhifufangshi")=trim(request("zhifufangshi"))
rs("adddate")=now()
rs("lastlogin")=now()
rs("logins")=1
rs("reglx")=1
rs("jifen")=0
rs("jiaoyijine")=0
rs("sex")=1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
'rs("dadyname")=trim(request("dadyname"))
'rs("szShi")=trim(request("szShi"))
'rs("MoMname")=trim(request("MoMname"))
'rs("MoMNo")=trim(request("MoMNo"))
'rs("yuchan")=trim(request("yuchan"))
'rs("babysex")=trim(request("babysex"))

'论坛的
rs("face")="userface/image1.gif"
Rs("width")=request("width")
Rs("height")=request("height")
rs("bbstype")=request("bbstype")
rs("userclass")="新手上路"
rs("userWealth")=100
rs("userEP")=50
rs("usercP")=50
rs("lockuser")=0
Rs("showRe")=1
rs("userinfo")="||||||||||||||||||||||||||||||||||||||||||"
rs("usersetting")="1|||0"
rs("titlepic")="level0.gif"
rs("usergroupid")=4

rs.update
conn.execute("update config set usernum=usernum+1,lastuser='"&username&"'")
rs.close
set rs=nothing
set rs=conn.execute("select top 1 userid,face from [user] order by userid desc")
userid=rs(0)
response.Cookies("bjx")("username")=trim(request("username"))
response.Cookies("bjx")("jiaoyijine")=0
response.Cookies("bjx")("jifen")=0
response.Cookies("bjx")("reglx")=1
response.Cookies("shangcheng").expires=date+1


Response.Cookies("aspsky")("username") = trim(request("username"))
Response.Cookies("aspsky")("password") = trim(request("userpassword"))
Response.Cookies("aspsky")("userclass") = "新手上路"
Response.Cookies("aspsky")("userid") = userid
Response.Cookies("aspsky")("userhidden") = 2
Response.Cookies("aspsky").path="/shop/bbs/"
Response.Cookies("aspsky")("usercookies") = 1
Response.Cookies("aspsky").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

'发送邮件
'if Forum_Setting(47)=1 then
on error resume next
'发送注册邮件
topic="您在" & webname & "的注册资料"
getpass=trim(request("userpassword"))

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("username"))&",您好:<br><br>"
mailbody=mailbody & "欢迎您注册" & webname & "网上商城,我们将提供给您最好的服务!<br>"
mailbody=mailbody & "下面是您在" & webname & "网上商城的注册信息:<br><br>"
mailbody=mailbody & "注册名:"&trim(request("username"))&"<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("useremail"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
if SendMail="OK" then
sendmsg="<p>· 您的注册信息已经发往您的邮箱,请注意查收!</p>"
else
sendmsg="<p>· 系统出错,注册信息资料未能发送到您的邮箱!</p>"
end if
'response.write mailbody
'end if

response.Write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center> "
response.Write "<table width=450 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=260>"
response.Write "<p>· <font color=red>用户注册成功!</font></p><p>· 恭喜您注册成为 ["&webname&"] 的正式用户,请记好您的用户名及密码!</p>"
response.Write "<p>· <a href=index.asp>返回首页</a></p></td></tr></table></td></tr></table>"
end if
end sub

sub usererr()
response.write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center>"
response.write "<table width=450 border=0 align=center cellpadding=2 cellspacing=0><tr><td height=260>"
response.write "<p>· <font color=red>用户注册失败!</font></p><p>· 您输入的用户名或e-mail地址已存在,请返回重新输入!</p><p>· <a href=javascript:history.go(-1)>返回上一页</a></p> </td></tr></table></td></tr></table>"
end sub
%>
</td>
</tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>

搜索更多相关主题的帖子: function 免费注册 content include return 
2006-04-13 16:12
cc155cc
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-4-13
收藏
得分:0 

注册会员的时候 只能不能以数字开头 来注册会员, 这里是数字和中文,字母都能注册。。我要求不能注册全数字的


还有就是 注册会员成功后,,不能 正确显示 注册成功的消息、



就这两个问题,,谁能帮忙啊

我的联系QQ 83051880
2006-04-13 16:14
chenxingg
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2006-1-5
收藏
得分:0 
好长的代码!@@@

http://wycs.5188.org[URL=http://wycs.5188.org]http://wycs.5188.org[/URL]

淘服网www.
2006-04-13 19:51
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
回复:(cc155cc)注册会员的时候 只能不能以数字开...
以下是引用cc155cc在2006-4-13 16:14:00的发言:

注册会员的时候 只能不能以数字开头 来注册会员, 这里是数字和中文,字母都能注册。。我要求不能注册全数字的


还有就是 注册会员成功后,,不能 正确显示 注册成功的消息、



就这两个问题,,谁能帮忙啊

我的联系QQ 83051880

<SCRIPT language=JavaScript>
function Login()
{
try
{
var UsNameStr;
var IsNum;
UsNameStr=this.UsNameT.value;
IsNum=eval(UsNameStr.substr(0,1)+1);
}
catch(e)
{
alert('第一个字符必须是数字');
}
}
</SCRIPT>
请输入文字<INPUT name=UsNameT>
<INPUT onclick=Login(); type=button value=submit name=sub >

[此贴子已经被作者于2006-4-13 21:51:37编辑过]

2006-04-13 21:51
water123456
Rank: 5Rank: 5
等 级:贵宾
威 望:15
帖 子:3208
专家分:5
注 册:2006-2-21
收藏
得分:0 
强,没有心看.

让我们风风火火的过一生,别平平淡淡过一年。
2006-04-14 12:30
快速回复:如何解决这个小问题,有报酬
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.048786 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved