用户注册及跟踪代码(三)

2. ASP代码(设立一DSN,请改动begin.asp)
----------------------------------
-----文件reg_step2.asp
<%
ValidCodeLogin=Request.QueryString("VailCodeLogin")
u_name=Request.QueryString("name")

if ValidCodeLogin="" or u_name="" then
Response.Redirect "reg_step1.asp"
Response.end
end if
%>
<html>
<head>
<title>详细信息填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/lotsty1.css">
<SCRIPT LANGUAGE="JavaScript1.1">
function isPosInteger(inputVal) {
    inputStr = inputVal.toString()
    for (var i = 0; i < inputStr.length; i++) {
        var oneChar = inputStr.charAt(i)
        if (oneChar < "0" || oneChar > "9") {
            return false
        }
    }
    return true
}

function CheckForm(form) {
    for (i = 0; i <document.forms[0].elements.length; i++) {
        if (document.forms[0].elements[i].type == "text" && document.forms[0].elements[i].value == ""){
            alert("所有内容必须填写!")
            return false;
        }
    }
    if (document.forms[0].email.value.indexOf("@")==-1 || document.forms[0].email.value.indexOf(".")==-1 || document.forms[0].email.value.indexOf("@.")!=-1 || document.forms[0].email.value=="" || document.forms[0].email.value==null || document.forms[0].email.value.indexOf("@")==0){
    alert('E-mail未输入或格式有误,请查看!')
    return false
    }

    if(!isPosInteger(document.forms[0].year.value)){
    alert("年份必须是数字!")
    return false
    }
    if(!isPosInteger(document.forms[0].month.value)){
    alert("月份必须是数字!")
    return false
    }
    if(!isPosInteger(document.forms[0].date.value)){
    alert("日期必须是数字!")
    return false
    }
return true;
}
</SCRIPT>
<link rel="stylesheet" href="../css/sty1.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#333333">
<table width="750" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="46"> </td>
  </tr>
  <tr>
    <td height="426">
      <table width="777" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="149" valign="top" height="386">  </td>
          <td width="628" valign="top" height="386">
            <table width="620" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="474" height="12" valign="top"> </td>
                <td width="146" height="12" valign="top"> </td>
              </tr>
              <tr>
                <td width="474" valign="top" height="367">
                  <table width="474" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="12"  valign="top" height="368"> </td>
                      <td width="462" valign="top" class="txt105" height="368">
                        <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
                          <tr align="center">
                            <td width="100%" class="txt105" height="20"><font color="#006600">个人详细信息填写
                              </font></td>
                          </tr>
                          <tr valign="top">
                            <td width="100%" height="346">
                              <form method="post"action="reg_step2_sub.asp" >
                                <table width="400" border="0" cellspacing="4" cellpadding="0" align="center">
                                  <tr>
                                    <td colspan="2" class="txt9">
                                      <hr size="1" align="left" color="#669999">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right" valign="bottom"><font color="#336600">真实姓名:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <input type="text" name="true_name" size="10" class="txt9">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right" valign="bottom"><font color="#336600">性别:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <select name="sex" class="txt9">
                                        <option value="男" selected>男</option>
                                        <option value="女">女</option>
                                      </select>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right" valign="bottom"><font color="#336600">生日:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <input type="text" name="year" size="4" class="txt9">
                                      年
                                      <input type="text" name="month" size="2" class="txt9">
                                      月
                                      <input type="text" name="date" size="2" class="txt9">
                                      日 </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right"><font color="#336600">身份证编号:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <input type="text" name="idcard" class="txt9">
                                      <br>
                                      作为取货凭证,请务必正确填写。 </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right" valign="bottom"><font color="#336600">联系地址:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <input type="text" name="address" class="txt9">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right" height="23"><font color="#336600">联系电话:</font></td>
                                    <td width="277" class="txt9" valign="top" height="23">
                                      <input type="text" name="telephone" class="txt9">
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="111" class="txt9" align="right"><font color="#336600">Email地址:</font></td>
                                    <td width="277" class="txt9" valign="top">
                                      <input type="text" name="email" class="txt9">
                                      <br>
                                      中奖信息将以此E-mail地址发送。 </td>
                                  </tr>
                                  <tr>
                                    <td colspan="2" class="txt9">
                                      <hr size="1" align="left" color="#669999">
                                    </td>
                                  </tr>
                                  <tr align="center">
                                    <td colspan="2" class="txt9">
                                      <input type="submit" name="Submit" value="提交" class="txt9">
                                      <input type="reset" name="reset" value="重填" class="txt9">
                                      <input type="hidden" name="isLogin" value="<%=ValidCodeLogin%>" >
                                      <input type="hidden" name="u_name" value="<%=u_name%>" >
                                    </td>
                                  </tr>
                                  <tr align="center">
                                    <td colspan="2" class="txt9">
                                      <hr size="1" align="left" color="#669999">
                                    </td>
                                  </tr>
                                  <tr align="center">
                                    <td colspan="2" class="txt9">
                                      <table width="353" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="353" class="txt9" height="26"><font color="#FF6666">请查看上述信息的正确性,我们将据此来确认您的真实身份。
                                            </font></td>
                                        </tr>
                                      </table>
                                    </td>
                                  </tr>
                                </table>
                              </form>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
                <td width="146" valign="top" height="367"> </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>

</html>

---文件reg_step2_sub.asp

<%
islogin=Request("isLogin")
u_name=Request("u_name")

if islogin="" or u_name="" then
Response.Redirect "reg_step1.asp"
Response.end
end if
%>
<!-- #include file = "../inc/adovbs.inc" -->
<!-- #include file = "../inc/begin.asp" -->
<html>
<head>
<title>详细信息填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/lotsty1.css">
<link rel="stylesheet" href="../css/sty1.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#333333">
<table width="750" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="50"> </td>
  </tr>
  <tr>
    <td>
      <table width="777" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="149" valign="top">  </td>
          <td width="628" valign="top">
            <table width="620" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="474" height="12" valign="top"> </td>
                <td width="146" height="12" valign="top"> </td>
              </tr>
              <tr>
                <td width="474" valign="top">
                  <table width="471" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="14" valign="top"> </td>
                      <td width="457" valign="top" class="txt105">
<%
true_name=Request("true_name")
sex=Request("sex")
birth=Request("year")&"-"&Request("month")&"-"&Request("date")

if IsDate(birth) then
birth=FormatDateTime(birth,1)
    if Year(birth)<=999 then %>
    <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr align="center">
                            <td width="400" class="txt9" height="120"><font color="#CC0000">出生日期输入错误,<a href="javascript:history.go(-1)" class="link8">返回。</a></font></td>
        </tr>
      </table>
      <%
Response.write "</body></html>"
Response.end
end if
else%>
      <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr align="center">
                            <td width="400" class="txt9" height="120"><font color="#CC0000">出生日期输入错误,<a href="javascript:history.go(-1)" class="link8">返回。</a></font></td>
        </tr>
      </table>
      <%
Response.write "</body></html>"
Response.end
end if

idcard=Request("idcard")
address=Request("address")
email=Request("email")
telephone=Request("telephone")

'response.write birth
'response.end

strSql="proc_UserInfoUpdate"
strSql=strSql & "  '" & islogin & "'"
strSql=strSql & " ,'" & true_name & "'"
strSql=strSql & " ,'" & sex & "'"
strSql=strSql & " ,'" & birth & "'"
strSql=strSql & " ,'" & idcard & "'"
strSql=strSql & " ,'" & address & "'"
strSql=strSql & " ,'" & email & "'"
strSql=strSql & " ,'" & telephone & "'"
Set rs = Con.Execute(strSql)
ret=rs.fields("resultID")
%>
                        <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
                          <%if ret=0 then%>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center"><font color="#006600">您的个人信息填写如下:</font></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">
                              <hr size="1" align="left" color="#669999">
                            </td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">真实姓名:<%=true_name%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">性别:<%=sex%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">生日:<%=birth%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">身份证:<%=idcard%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">地址:<%=address%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">Email:<%=email%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">联系电话:<%=telephone%></td>
                          </tr>
                          <tr>
                            <td width="400" class="txt9" height="20" align="center">
                              <hr size="1" align="left" color="#669999">
                            </td>
                          </tr>
                          <tr align="center">
                            <td width="400" class="txt105" height="22">
                              <table width="320" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="320" class="txt9" height="26"><font color="#FF6666">请查看上述信息的正确性,我们将据此来确认您的真实身份。</font></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <tr align="center">
                            <td width="400" class="txt9" height="17">
                              <p>请注意您现在已处于登录状态。</p>
                              <p><a href="winload.asp">>>登出--临时用<<</a></p>
                            </td>
                          </tr>
                          <%elseif MyCommand("ReturnCode")=-1 then %>
                          <tr>
                            <td width="400" class="txt105" height="120" align="center"><font color="#CC0000">请先登录。</font></td>
                          </tr>
                          <%elseif MyCommand("ReturnCode")=-2 then %>
                          <tr>
                            <td width="400" class="txt105" height="120" align="center"><font color="#CC0000">用户超时</font></td>
                          </tr>
                          <%elseif MyCommand("ReturnCode")=-3 then %>
                          <tr>
                            <td width="400" class="txt105" height="120" align="center"><font color="#CC0000">用户资料输入错误</font></td>
                          </tr>
                          <%else%>
                          <%end if%>
                        </table>
                       
                      </td>
                    </tr>
                  </table>
                </td>
                <td width="146" valign="top"> </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr align="center">
    <td height="76"> </td>
  </tr>
</table>
<%Con.Close%>
</body>
</html>

---文件winload.asp

<!-- #include file = "../inc/adovbs.inc" -->
<!-- #include file = "../inc/begin.asp" -->
<%
validlogin=Session("lotto_isLogin")
if validlogin<>"" then
Set MyComquit=Server.CreateObject("ADODB.Command")
Set MyComquit.ActiveConnection=Con
MyComquit.CommandType=adCmdStoredProc
MyComquit.CommandText="proc_UserLogout"
MyComquit.Parameters.Append MyComquit.CreateParameter("ReturnCode",adInteger,adParamReturnValue)
MyComquit.Parameters.Append MyComquit.CreateParameter("quitid",adVarChar,adParamInput,30)
MyComquit.Parameters("quitid")=validlogin
MyComquit.Execute()
end if
Session("lotto_isLogin")=""
Session("lotto_username")=""
Session("lotto_UserLevel")=""
%>
<%Con.Close%>
<meta http-equiv=refresh content='0;url=http://myang.533.net'>

时间: 2024-09-29 08:07:54

用户注册及跟踪代码(三)的相关文章

用户注册及跟踪代码(一)

用户注册册及确认在线的ASP程序.1. SQL的表及储存过程---------------------------------------------CREATE TABLE [dbo].[userbaseinfo] (    [userid] [varchar] (50) NOT NULL ,    [password] [varchar] (50) NOT NULL ,    [validcodelogin] [char] (50) NOT NULL ,    [userlevel] [ch

用户注册及跟踪代码(二)

2. ASP代码(设立一DSN,请改动begin.asp)----------------------------------------文件begin.asp<%Set Con = Server.CreateObject( "ADODB.Connection" )Con.Open "test" ,"test","test"%>-----文件reg_step1.asp<html><head>

特征融合的粒子滤波目标跟踪代码

问题描述 特征融合的粒子滤波目标跟踪代码 30C 请问哪位大神有'粒子滤波视频目标跟踪'的完整实现代码啊?最近在研究这个,却一直束手无措,急求啊,感谢分享~ 解决方案 目标跟踪-粒子滤波粒子滤波 目标跟踪目标跟踪之粒子滤波

视频-求用opencv实现的车辆检测跟踪代码,高分悬赏,急

问题描述 求用opencv实现的车辆检测跟踪代码,高分悬赏,急 有人有用opencv实现的车辆检测跟踪代码吗?能在原视频上框出车辆并且有跟踪轨迹.高分悬赏,多谢! 解决方案 http://www.codeforge.cn/article/218179

Google的跟踪代码 动态加载js代码方法应用_javascript技巧

复制代码 代码如下: <script type="text/javascript"> var _gaq = _gaq || []; //如果变量 _gaq 存在,就等于他自己,否则为一个空数组 _gaq.push(['_setAccount', 'UA-24479793-2']); //是个2维数组 _gaq[0] = array(0=>'_setAccount', 1=>'UA-24479793-2');(设置本跟踪代码所对应的Google帐户) _gaq.p

treeview-明明Treeview1有很多节点,但是跟踪代码却只有1个节点,为什么?

问题描述 明明Treeview1有很多节点,但是跟踪代码却只有1个节点,为什么? 请各位大神帮忙,确定TREEVIEW1里面有很多节点,treeview1.nodes.count只有1个? Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click mycn.ConnectionString = "Data Source=" &am

分享非常有用的Java程序 (关键代码) (三)---创建ZIP和JAR文件

原文:分享非常有用的Java程序 (关键代码) (三)---创建ZIP和JAR文件  import java.util.zip.*; import java.io.*; public class ZipIt { public static void main(String args[]) throws IOException { if (args.length < 2) { System.err.println("usage: java ZipIt Zip.zip file1 file2

用 PHP 开发健壮的代码(三):编写可重用函数

函数 在本系列文章(有关如何在实际情况下开发有效的 PHP 代码)的第 3 部分中,Amol Hatwar 讨论了如何构建最有效的功能型函数,使用这些函数不会牺牲太多性能或可管理性.作者重点阐述了如何编写可重用函数,并介绍了如何避免与该任务相关的一些最常见问题.欢迎回来.在本系列文章的第 1 部分中,我讨论了一些基本的 PHP 设计规则,并介绍了如何编写安全.简单.与平台无关且快速的代码.在第 2 部分中,我介绍了变量,并讨论了它们在 PHP 编码中的用法 - 好的和坏的实践. 在本文中,您将了

在设计期跟踪代码 (.NET)

设计 在开发中碰到这样的问题: winform窗口中定义了基类窗体,在设计器中打开子类窗体的时候出现诸如"窗口无法使用设计器进行进行设计,发生了......的异常"的信息,并且窗体无法打开,也就没办法使用窗体设计器进行界面的设计.但是运行起来一切正常. 这个问题的原因就是在解决方案资源管理器中双击窗体打开进行设计的时候,会去执行它的基类,也就是父窗体中的一些代码,例如: 建立一个基类窗体,名为FormBase,再建立一个子类窗体FormDerive,从FormBase继承public