⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showall.asp

📁 一个较完备的交互式网络教学系统 开发语言为 asp
💻 ASP
字号:
<!--#include file="Check.asp"-->
<!-- #Include File="Conn.asp" !-->
<style>
BODY   
{
	FONT-FAMILY: "宋体";
	FONT-SIZE: 9pt;
	background-color: #B1DB99;
}
.p1{FONT-FAMILY: "宋体";font-size:9pt ; }
body,td,th {
	font-size: 12px;
}
</style>
<body>
<table width="100%" height="18" border="0" cellspacing="1" bordercolor="#C0C0C0" bgcolor="#D9ECFF" class="p1" id="AutoNumber2" style="border-collapse: collapse">
  <tr> 
    <td width="100%" background="../images/Down_bg.gif"> ★ <strong>当前位置: <font color="#FF0000">用户信息</font></strong>&nbsp;&nbsp;
      <%
sql="select distinct DoTitle from TestCount"
set rss=server.createobject("adodb.recordset")
rss.open sql,conn,1,1
%>
<select id=M onChange="JavaScript:location.href='ShowAll.asp?DoTitle='+this.value">
<option value="">显示全部数据</option>
<%while not rss.eof%>
<option value="<%=rss(0)%>"><%=rss(0)%></option>
<%
rss.MoveNext
wend
rss.close
%>
</Select></td>
  </tr>
</table>
<br>

<table border="0"  width="100%" height="76" >
  <tr align=center background="../images/Down_bg.gif" > 
    <td  height=19><font color="#666666"><strong>ID</strong></font></td>
    <td  height=19><strong><font color="#666666">测试者</font></strong></td>
    <td  height=19><font color="#666666"><strong>自测类别</strong></font></td>
    <td  height=19><font color="#666666"><strong>时间</strong></font></td>
    <td  height=19><font color="#666666"><strong>自测所用时间</strong></font></td>
    <td  height=19><font color="#666666"><strong>取得成绩</strong></font></td>
  </tr>
  <%
DelAll=Request("DelAll")
	If DelAll=1 Then
		iSQL = "delete from TestCount"
		Conn.execute(iSQL)
		Response.Write "<script>alert('信息全部已经被清除!')</script>"
	End if


  Set Rs=Server.CreateObject("adodb.recordSet")

  DoTitle=Trim(Request.QueryString("DoTitle"))
  if DoTitle<>"" then
    Sql_Add="where DoTitle='"& DoTitle &"'"
	Message="<font color=red>显示全部数据</a>"
  Else
    Sql_Add=""
  End If

  Sql_0="Select * From TestCount "& Sql_Add &" order by id desc"
  
  
  Rs.Open Sql_0,conn,1,1
  counter=RS.RECORDCOUNT'总记录条数
if int(counter)>0 then
       Psize=10
	   RS.PageSize = Psize'在CONN页面
       Page = CLng(Request("Page"))
       if page<1 or page="" then page=1
	   if int(page)>int(RS.pagecount) then page=RS.pagecount
       RS.absoluteposition=(page-1)*RS.pagesize+1    
       if page=RS.pagecount then
         xxx=counter-(RS.pagecount-1)*Psize
       else
         xxx=Psize
       end if
else
  Response.Write "<p><center><font color='#ff0000'>无记录!</font><BR><BR></center>"
  Response.End
end if
for i=1 to xxx  %>
  <tr align=center> 
    <td  height=25><%=rs("id")%></td>
    <td  height=25><%=rs("UserName")%></td>
    <td  height=25><%=rs("DoTitle")%></td>
    <td  height=25><%=rs("DoTime")%></td>
    <td  height=25><%=rs("EndTime")%></td>
    <td  height=25><%=rs("DoResult")%> 分</td>
  </tr>
  <%
  b=b+rs("DoResult")
  Rs.MoveNext
  next
  b=b/xxx
  b=formatnumber(b,1)
  if b<1 then b="0"&b
%>
  <tr> 
    <td align=right colspan=6>平均分:<font color=red><%=b%></font> 分</td>
  </tr>
</table>
<br>
<table border="1"   bordercolor="#CCCCCC" width="100%" class=p1>
  <tr>
    <td>&nbsp;<a href='ShowAll.asp?page=1'><font color=#990033 title=首页>首页</font></a>	
      <%if (page-1)<1 then%>
      <font color=cccccc>上一页</font> 
      <%else%>
      <a href='ShowAll.asp?page=<%Response.Write page-1 %>'><font color=#990033 title=上一页>上一页</font></a> 
      <%end if%>
      <%if (page)<RS.pagecount then%>
      <a href='ShowAll.asp?page=<%Response.Write page+1 %>'><font color=#990033 title=下一页>下一页</font></a> 
      <%else%>
      <font color=cccccc>下一页</font> 
      <%end if%>
      <a href='ShowAll.asp?page=<%Response.Write RS.pagecount %>'><font color=#990033 title=尾页>尾页</font></a>&nbsp;&nbsp; 
      共有 <font color=red> <%=counter%> </font>人作过自测&nbsp;&nbsp;每页:<%=Psize%>&nbsp;页数:<font color=red><%=page%></font>/<%=RS.pagecount%>&nbsp;<a href="JavaScript:history.go(0)">刷新</a> 
      <a href="ShowAll.asp?DelAll=1" onClick="return confirm('警告:这样会清空所有用户信息!');">清空所有数据</a> </td>
    <script>document.write("<form action="+this.location+" method=post>");</script><td width=50 align=right><input type=text value="<%=page%>" size=1 class=input Name="Page"><input type=submit value=GO class=input>
</td>
</form>
</tr>
</table>
</body>
<%
rs.close

If DoTitle<>"" Then
%>
<Script Language=JavaScript>
document.all.M.value="<%=DoTitle%>";
</Script>
<%End If%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -