📄 student.asp
字号:
<!-- #include file="cookies.asp" -->
<!-- #include file="conn/conn.asp" -->
<%
id=request.cookies("username")
%>
<html>
<head>
<title>考生信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
background-color: #0099FF;
}
-->
</style></head>
<body text="#000000">
<div align="center">
</div>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><div align="center">
<table width="760" border="0" bgcolor="#FFFFFF">
<tr>
<td height="10"> </td>
</tr>
<tr>
<td> <div align="left"><b>用户信息</b></div></td>
</tr>
</table>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from student where id='"&trim(id)&"'"
rs.open sql,conn,1,1
if not rs.eof then
%>
<table width="760" border="0" bgcolor="#FFFFFF">
<form name="form1" method="post" action="kaoshengsave.asp" onsubmit="return check();">
<tr>
<td width="50%">考生姓名:<%=trim(rs("name"))%></td>
<td> 学 号:<%=trim(rs("cid"))%></td>
</tr>
<tr>
<td width="50%">
<input type="button" name="chang" value="编辑个人信息" onclick="window.open('stud_edit.asp?id=<%=trim(rs("id"))%>','intr','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=1,resizable=0,width=530,height=200,top=80,left=100');return false;">
</td>
<td> </td>
</tr>
</form>
</table>
<%
end if
sname=trim(rs("name"))
rs.close
set rs=nothing
%>
</div>
<hr width="760">
<form name="form2" method="post" action="">
<table width="750" border="0" align="center" bgcolor="#CCCCCC">
<tr>
<td width="45%">
<div align="center">试题名称</div>
</td>
<td width="25%">
<div align="center">课程</div>
</td>
<td width="15%">
<div align="center">试题编号</div>
</td>
<td width="15%">
<div align="center">分数</div>
</td>
</tr>
<%
if request("page")="" then
page="1"
else
page=request("page")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from examstop where id='"&trim(id)&"'"
rs.open sql,conn,1,1
if not rs.eof then
rs.pagesize=30
rs.Absolutepage=clng(page)
if cstr(page)=cstr(rs.PageCount) and (rs.RecordCount mod rs.PageSize <> 0) then
recend=rs.RecordCount mod rs.PageSize
else
recend=rs.PageSize
end if
if request("page")<>"" then
if fix(trim(request("page")))>rs.pagecount then
response.redirect "student.asp?page="&(request("page")-1)
end if
end if
for i=1 to recend
if i mod 2=1 then
color="#f8f8f8"
else
color="#E4e4e4"
end if
set rs1=server.createobject("adodb.recordset")
sql1="select * from exam where ename='"&trim(rs("ename"))&"' and eid='"&trim(rs("eid"))&"'"
rs1.open sql1,conn,1,1
%>
<tr bgcolor="<%=color%>">
<td width="45%"><%=trim(rs1("text"))%></td>
<td width="25%"><%=trim(rs("ename"))%></td>
<td width="15%" align="center"><%=trim(rs("eid"))%></td>
<td width="15%" align="center"><%=trim(rs("score"))%></td>
</tr>
<%
rs1.close
set rs1=nothing
rs.movenext
next
%>
</table>
</form>
<table border="0" width="750" align="center" bgcolor="<%=tablebgcolor_2%>">
<tr>
<td>
<div align="left"><font color="#000000">共有考试记录<%=rs.recordcount%>条,每页30个,目前<%=page%>/<%=rs.pagecount%>页</font></div>
</td>
<td width="40" align="center"> <font color="#000000">
<% if page="1" then %>
首页
<%else%>
<a href=student.asp?t=students>首页</a>
<% end if %>
</font></td>
<td width="40" align="center"> <font color="#000000">
<% if page="1" then %>
上页
<%else%>
<a href=student.asp?page=<%=page-1%>&t=students>上页</a>
<% end if %>
</font></td>
<td width="40" align="center"> <font color="#000000">
<% if page=cstr(rs.pagecount) then %>
下页
<%else%>
<a href=student.asp?page=<%=page+1%>&t=students>下页</a>
<% end if %>
</font></td>
<td width="40" align="center"> <font color="#000000">
<% if cstr(page)-cstr(rs.pagecount)=0 then%>
尾页
<% else %>
<a href=student.asp?page=<%=rs.pagecount%>&t=students>尾页</a>
<% end if %>
<%
else
response.write "还没有参加过任何考试!"
end if
rs.close
set rs=nothing
%>
</font></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -