?? 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 "輸入學(xué)號錯誤,請重新輸入!"
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">下面是數(shù)據(jù)庫中該學(xué)生的基本信息!</font></b></p>
<p align="center"><font color="#0000FF">學(xué)生姓名:</font><font color="#FF0000"><%=rs("name")%>
<p align="center"><font color="#0000FF">學(xué)號:</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>已經(jīng)成功添加學(xué)生信息</b></font></p>
<hr color="#008080" width="80%">
<p align="center"><font color="#0000FF">學(xué)生姓名:</font><font color="#FF0000"><%=name%></font></p>
<p align="center"><font color="#0000FF">學(xué)號:</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -