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

📄 reg_student_save.asp

📁 《学校机房作业管理系统》采用ASP+Aceesss+ ServU构架
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% 
'=========================================================
' 学校机房作业管理系统 V 1.0 [创建于200812122100]
' 授权发布网站:清远ABC-http://www.qyabc.com/
' 客服QQ:418322257   E-Mail:qystu@163.com
' 注意:如想得到关于本程序免费的技术支持,
' 必须承诺使用一周后,用平邮回寄“相关文件”文件夹中的“学校机房作业管理系统调查反馈表”表格。
' 作者博客:http://www.qyabc.com/u/qin/Default.aspx
'=========================================================
%>

<!--#include file="inc/config.asp" -->
<!--#include file="Connections/master.asp" -->
<!--#include file="inc/function.asp" -->
<!--#include file="inc/md5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>保存信息登记-<%=WebName%></title>

<%
Specia=request("Specia")
MasterClass=request("MasterClass")
studentnum=request("studentnum")
studentname=request("studentname")
studentsex=request("studentsex")
rndstr =MyRandc(2)
asankpassword=request("password")
Paskk=rndstr&md5(rndstr&asankpassword)
asanconfirmpwd=request("confirmpwd")
Email=request("email")
usersort=request("usersort")
RegIp=request("regip")
%>

<% 

if   request.form("studentnum")=""   then   
response.write   "错误提示:请输入胸卡编号!"
response.end
end   if

if   request.form("studentname")=""   then   
response.write   "错误提示:请输入真实姓名!"
response.end
end   if
if   request.form("password")=""   then   
response.write   "错误提示:请输入进入密码!"
response.end
end   if
if   request.form("password")<>request.form("confirmpwd")   then   
response.write   "错误提示:两次密码不相符!"
response.end
end   if
%>
<%
Dim reg_user
Dim reg_user_numRows

Set reg_user = Server.CreateObject("ADODB.Recordset")
reg_user.ActiveConnection = MM_master_STRING
reg_user.Source = "SELECT * FROM userinfo WHERE studentNum = '" + Replace(studentnum, "'", "''") + "'"
reg_user.CursorType = 0
reg_user.CursorLocation = 2
reg_user.LockType = 1
reg_user.Open()

reg_user_numRows = 0
%>

<% if reg_user.eof then%>

<%

set insert_user = Server.CreateObject("ADODB.Command")
insert_user.ActiveConnection = MM_master_STRING
insert_user.CommandText = "INSERT INTO userinfo (Specia,MasterClass,studentnum,studentname,studentsex,Paskk,Email,usersort,RegIp)  VALUES ('"&Specia&"','"&MasterClass&"','"&studentnum&"','"&studentname&"','"&studentsex&"','"&Paskk&"','"&Email&"','"&usersort&"','"&RegIp&"') "
insert_user.CommandType = 1
insert_user.CommandTimeout = 0
insert_user.Prepared = true
insert_user.Execute()
response.redirect "reg_success.asp" 

%>

<%else%> 
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
<table width="495"  border="1" align="center" cellpadding="5" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
  <tr bgcolor="#99CCFF"> 
    <td height="25" colspan="2" align="right"><div align="left"><strong><font color="#FF0000">登记出错!</font></strong> 
      </div></td>
  </tr>
  <tr> 
    <td colspan="2" align="right" ><p align="left">怎么搞的?!写着胸卡编号的《信息登记表》已经交了一份了!</p>
      <p align="left">为了系统的安全与稳定性,您暂时不能登记。</p>
      <p align="left">假如您确定您的填写是正确的,请拿学生证或胸卡与老师联系。 </p></td>
  </tr>
  <tr align="center"> 
    <td height="25" colspan="2"> <div align="right"> <font color="#FF0000"> </font> 
        <table width="495" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><font color="#FF0000"> 
              <input type="button" name="Submit2" value="返回主页" onClick="top.location='index.asp';">
              </font> </td>
            <td><div align="right"> 
                <input type="submit" Name="Submit" value="重新登记"  onClick="top.location='reg_student.asp';">
              </div></td>
          </tr>
        </table>
      </div></td>
  </tr>
</table>
<%end   if%>

</body>
</html>
<%
reg_user.Close()
Set reg_user = Nothing
%>

⌨️ 快捷键说明

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