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

📄 reg2.asp

📁 本系统基于WEB
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册新学生用户|毕业设计选题系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
</head>

<BODY leftMargin=0 topMargin=0 marginwidth="0">
  <!--#include file=../top.asp-->
<div align="center">
<table width="770" height="34" border="0" background="../image/dh_bj.jpg">
  <tr>
    <td><div align="right">
	<a href="http://www.wh.cn/"><FONT color=#ffffff>邮电与信息工程学院 | </FONT></a><a href="http://10.2.2.2/"><FONT color=#ffffff>图书馆 | </FONT></a><a href="http://www.tjcu.edu.cn/zsjy/index.htm"><FONT color=#ffffff>招生就业 |</FONT></a><a href="http://www.tjcu.edu.cn/zsjy/index.htm"><font color="#ffffff"></font></a><a href="mailto:jiaxin_li08@163.com"><FONT color=#ffffff> 联系我们</FONT></a>
	</div></td>
  </tr>
</table>

</div>
<div align="center"><td><table width="768" border="0" bgcolor="#FFFFFF"><tr><td><div align="left">
<%
Dim UID
Dim PWD
Dim UNM
Dim SEX
Dim SPE
Dim CLA
Dim TEL
Dim EML
Dim QQ
UID = Request.Form("textfield1")
PWD = Request.Form("textfield2")
UNM = Request.Form("textfield4")
SEX = Request.Form("select1")
SPE = Request.Form("select2")
CLA = Request.Form("select3")
TEL = Request.Form("textfield5")
EML = Request.Form("textfield6")
QQ = Request.Form("textfield7")
Dim conn
Set conn=Server.CreateObject("ADODB.RecordSet")
conn.ActiveConnection = "DSN=hw;User ID=sa"
conn.Source = "select * from dbo.student where stu_id='"&UID&"'"
conn.CursorType = 0
conn.LockType = 1
conn.Open()
If not(conn.eof or conn.bof) Then
  conn.Close()
  Set conn = Nothing
  response.write"<p>注册失败</p><p>学号 "&UID&" 已经被注册<br>如果你的学号被他人注册,或者忘记密码,请及时与管理员联系。</p><a href='../index.asp'>点击此处返回首页</a>"
Else
  Set conn = Nothing
  Dim conn2
  Set conn2=Server.CreateObject("ADODB.RecordSet")
  conn2.ActiveConnection = "DSN=hw;User ID=sa"
  conn2.Source = "dbo.student"
  conn2.CursorType = 1
  conn2.LockType = 3
  conn2.Open()
  conn2.addnew
  conn2("stu_id") = UID
  conn2("stu_pass") = PWD
  conn2("stu_name") = UNM
  conn2("stu_sex") = SEX
  conn2("stu_speciality") = SPE
  conn2("stu_class") = CLA
  conn2("stu_tel") = TEL
  conn2("stu_email") = EML
  conn2("stu_qq") = QQ
  conn2("stu_works") = "0"
  conn2.update
  conn2.Close()
  Set conn2 = Nothing
  session("student")=UID
  response.write"<p>注册成功</p><p>学号 "&UID&" 注册成功</p><a href='main.asp'>点击此处刷新您的资料</a>"
End If
%>
</div></td></tr></table></td></div>
  <!--#include file=../botton.asp-->
</body>
</html>

⌨️ 快捷键说明

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