?? reg_teacher_save.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("Specia")
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='student_reg.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 + -