📄 studentquery.asp
字号:
<%
if session("sNumber")="" then
response.write "<script>alert('对不起,您没有登陆,请先登陆后在访问。');document.location.href='index.asp';</script>"
response.end
end if
%>
<!--#include file="conn.asp"-->
<%
dim sName
sName=trim(request("sName"))
sNumber=trim(session("sNumber"))
'if sName="" then
' response.write "输入不能为空"
' response.end
'end if
set rs=server.createobject("adodb.recordset")
sql="select user_number,user_name,xuefen from st_info where user_number='"&sNumber&"'"
'sql="select user_name, sum(user_xuefen) as user_totlexuefen from jiangcheng where user_name='"_
'&sName&"'group by user_name"
rs.open sql,conn,1,1
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生查询结果</title>
<link rel="stylesheet" href="admin/style.css">
<script language="javascript">
function query(tar){
document.frm.action=tar;
document.frm.submit();
}
</script>
</head>
<body>
<!--#include file="top.asp"-->
<form method="POST" action="" name="frm">
<div align="center">
<table border="0">
<tr>
<td height="100"><td></tr>
</table>
<table border="1" width="400" cellspacing="0" cellpadding="5" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="100%" colspan="5">
<p align="center">查询结果</p>
</td>
</tr>
<%
if not rs.eof then
do while not rs.eof%>
<tr>
<td width="20%" align="center">学号</td>
<td width="20%" align="center">姓名</td>
<td width="20%" align="center">当前总学分</td>
<td width="20%" align="center">详细查询</td>
</tr>
<tr>
<td width="20%" align="center"><%=rs("user_number")%></td>
<td width="20%" align="center"><%=rs("user_name")%></td>
<td width="20%" align="center"><%=rs("xuefen")%></td>
<td width="20%" align="center">
<input name="adQuery" type="button" value="查询" size="6" onclick=query("studentAdquery.asp")>
</td>
</tr>
<%
rs.movenext
loop
else
%>
<tr>
<td width="100%" colspan="5"><marquee>
对不起,该生不存在,请不要非法入侵!
</marquee></td>
</tr>
<%end if%>
</table>
</div>
<%
rs.close
set rs=nothing
%>
<table border="0">
<tr>
<td height="100"><td></tr>
</table>
</form>
<!--#include file="down.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -