📄 addteacher.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>
<script language="jscript">
<!--
function Check1()
{
var NotNull
NotNull=true
if (document.form1.textfield1.value=="")
{
window.alert("请输入小组代号")
NotNull=false
}
if (document.form1.textfield2.value=="")
{
window.alert("请输入教授姓名")
NotNull=false
}
if (document.form1.textfield3.value=="")
{
window.alert("请输入教授默认密码")
NotNull=false
}
if (document.form1.textfield4.value=="")
{
window.alert("请输入讲师姓名")
NotNull=false
}
if (document.form1.textfield5.value=="")
{
window.alert("请输入讲师默认密码")
NotNull=false
}
return NotNull
}
//-->
</script>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
</head>
<BODY leftMargin=0 topMargin=0 marginwidth="0">
<!--#include file=../top.asp-->
<!--#include file=top.asp-->
<div align="center"><td><table width="768" border="0" bgcolor="#FFFFFF"><tr><td><div align="left">
<%
Dim TEAM
Function gen_key(digits)
dim char_array(50)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
randomize
do while len(output) < digits
num = char_array(Int((9 - 0 + 1) * Rnd + 0))
output = output + num
loop
gen_key = output
End Function
Do
TEAM = gen_key(4)
Dim conn
Set conn=Server.CreateObject("ADODB.RecordSet")
conn.ActiveConnection = "DSN=hw;User ID=sa"
conn.Source = "select * from dbo.teacher where tea_group='"&TEAM&"'"
conn.CursorType = 0
conn.LockType = 1
conn.Open()
Loop While not(conn.eof or conn.bof)
conn.Close()
Set conn = Nothing
%>
<p>添加教师小组</p>
<form id="form1" name="form1" method="post" action="addteacher2.asp" onsubmit="return Check1()">
小组代号
<input class="input_kuang" onmouseover="this.style.background='#D6DFF7';" onfocus="this.select(); " onmouseout="this.style.background='#FFFFFF'" name="textfield1" type="text" value="<% response.write TEAM %>" readonly />
自动生成4位数字,无法修改<br>
教师姓名
<input class="input_kuang" onmouseover="this.style.background='#D6DFF7';" onfocus="this.select(); " onmouseout="this.style.background='#FFFFFF'" type="text" name="textfield2" />
* 教授<br>
初始密码
<input class="input_kuang" onmouseover="this.style.background='#D6DFF7';" onfocus="this.select(); " onmouseout="this.style.background='#FFFFFF'" type="text" name="textfield3" />
* 教授初始密码<br>
教师姓名
<input class="input_kuang" onmouseover="this.style.background='#D6DFF7';" onfocus="this.select(); " onmouseout="this.style.background='#FFFFFF'" type="text" name="textfield4" />
* 讲师<br>
初始密码
<input class="input_kuang" onmouseover="this.style.background='#D6DFF7';" onfocus="this.select(); " onmouseout="this.style.background='#FFFFFF'" type="text" name="textfield5" />
* 讲师初始密码<br>
<input type="submit" name="Submit" value="提交" />
<input type="reset" name="Submit2" value="重置" />
</form>
<p class="notetext">注:带 * 号的项目必须填写</p>
</div></td></tr></table></td></div>
<!--#include file=botton.asp-->
<!--#include file=../botton.asp-->
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -