📄 classstudentshuruok.asp
字号:
<!--#include file="connectionstring.asp"-->
<%
IdClass=request.cookies("IdClass")
if IdClass=" " then
response.write "非法操作!"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body background="Back1.jpg">
<%
name=request("name")
id=request("id")
age=request("age")
sex=request("sex")
class1=request("class")
pwd=request("pwd")
response.Cookies("id")=id
idc=left(id,8)
if idc<>IdClass then
response.write "输入学号错误,请重新输入!"
response.end
end if
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open strConn
class2=left(class1,6)
sql1 = "select * from classid where id='"&Idclass&"'"
Set rs1=conn.Execute(sql1)
class2=left(rs1("name"),6)
class3=left(class1,6)
if class3<>class2 then
response.write "输入班级名称错误,请重新输入!"
response.end
end if
sql = "select * from stu where id='"&id&"'"
Set rs=conn.Execute(sql)
if not rs.eof then
sql1="update stu set name='" & name & "',class='" &class1 & "',sex='" &sex & "',age='"&age&"' where id='"&id&"'"
conn.execute sql1
sql = "select * from stu where id='"&id&"'"
Set rs=conn.Execute(sql)
%>
<p align="center"><b><font color="#0000FF" size="4">下面是数据库中该学生的基本信息!</font></b></p>
<p align="center"><font color="#0000FF">学生姓名:</font><font color="#FF0000"><%=rs("name")%>
<p align="center"><font color="#0000FF">学号:</font><font color="#FF0000"><%=rs("id")%></font></p>
<p align="center"><font color="#0000FF">年龄:</font><font color="#FF0000"><%=rs("age")%></font></p>
<p align="center"><font color="#0000FF">性别:</font><font color="#FF0000"><%=rs("sex")%></font></p>
<p align="center"><font color="#0000FF">班级:</font><font color="#FF0000"><%=rs("class")%></font></p>
<p align="center"><font color="#0000FF">初始密码:</font><font color="#FF0000"><%=rs("pwd")%></font></p>
<hr color="#008080" width="80%">
<p align="center"></font><font color="#FF0000"><input type="button" value="输入下一个" onClick="history.back()" name="dd"></p>
<%
rs.close
response.end
end if
sql="Insert Into stu (id,name,sex,age,class,pwd) Values('"
sql=sql&id&"', '"
sql=sql&name&"', '"
sql=sql&sex &"', "
sql=sql&age &", '"
sql=sql&class1&"', '"
sql=sql&pwd &"')"
conn.Execute (sql)
%>
'<form method="POST" action="classStudentshuruok1.asp" name="classStudentshuruok1.asp">
<p align="center"><font color="#0000FF" size="5"><b>已经成功添加学生信息</b></font></p>
<hr color="#008080" width="80%">
<p align="center"><font color="#0000FF">学生姓名:</font><font color="#FF0000"><%=name%></font></p>
<p align="center"><font color="#0000FF">学号:</font><font color="#FF0000"><%=id%></font></p>
<p align="center"><font color="#0000FF">年龄:</font><font color="#FF0000"><%=age%></font></p>
<p align="center"><font color="#0000FF">性别:</font><font color="#FF0000"><%=sex%></font></p>
<p align="center"><font color="#0000FF">班级:</font><font color="#FF0000"><%=class1%></font></p>
<p align="center"><font color="#0000FF">初始密码:</font><font color="#FF0000"><%=pwd%></font></p>
<hr color="#008080" width="80%">
<p align="center" style="margin-top: 0; margin-bottom: 0"> <input type="button" value="输入下一个" onClick="history.back()" name="dd"></p>
<%
abc=0
sql="select * from groupxuan where classgp= '" &class1& "' order by time"
set rs=conn.execute(sql)
if not rs.eof then
while not rs.eof
sql="Insert Into sels (ids,idc,time,yuxiscore,caozuoscore,baogaoscore) Values('"
sql=sql&id&"','"
sql=sql&rs("kemu")&"', '"
sql=sql&rs("time")&"', '"
sql=sql&abc &"', "
sql=sql&abc &", '"
sql=sql&abc&"')"
conn.Execute (sql)
rs.Movenext
wend
end if
rs.close
conn.close
%>
</font>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -