scorelist.asp

来自「《动态网页设计基础教程》,胡杰,科学出版社」· ASP 代码 · 共 111 行

ASP
111
字号
<!-- #include file="adoconn.asp" -->

<script language="vbscript" for="B1" event="onclick" >
 history.back
</script>

<%  
Dim sql  
Dim reccount  
Dim fieldi,recordi  
Dim t1,t2,t3,r1,r2  
Dim ps,mypagesize,ys,mypage  
Dim maxcount 

Certificate()

d1=request("D1")
d2=request("D2")
t1=d1 & "至" & d2  
d3=request("D3") 
d4=request("D4") 

IF d4 = "所有部门"  THEN 
  sql="select * from ScoreInfo where YeartoYear='" & t1 & "' AND term='" & d3 & "'"
ELSE
  sql="select * from ScoreInfo where YeartoYear='" & t1 & "' AND term='" & d3 & "' AND Tcollege='" & d4 & "'"
END IF

SQL=SQL+ " ORDER BY Tcollege,Tdepartment,Tname,Testdate DESC"

Set rs=GetRecordset(sql)

IF not rs.eof then  
   Reccount=rs.RecordCount 
   
   Page=Request.QueryString("Page")
   Psize=Request.QueryString("PageSize")
   
   If Psize="" Then
      Psize=6
   End if
   
   Rs.PageSize=Psize
    
   Pages=Rs.PageCount 
   
   If Page<1 Then Page=1
   If Page=NULL Then Page=1
   'If Page>Pages Then Page=Pages
   
   Rs.AbsolutePage=Page 
End if
%>  
<head>
<link rel="stylesheet" href="comCSS.css">
</head>  
<form method="post">  
<p align="center">
<%=(t1)%><font size="1" color="#000080"><b>学年第<%=(d3)%>学期<%=(d4)%>教师评分记录表  [记录总数:<%=rs.recordcount%>]</b></font>                                                     
</p>  
<div align="left">                               
  <table border="1" width="1178" >                             
  <tr bgcolor=#ccccc7>                                 
    <td width="105" align="center"><font color="#000080"><b>教师编号</b></font></td>                       
    <td width="74" align="center"><font color="#000080"><b>教师名称</b></font></td>                      
    <td width="86" align="center"><font color="#000080"><b>评分项目</b></font></td>                       
    <td width="308" align="center"><font color="#000080"><b>评分内容</b></font></td>                       
    <td width="52"><font color="#000080"><b>满分值</b></font></td>      
    <td width="35"><font color="#000080"><b>权重</b></font></td>      
    <td width="53"><font color="#000080"><b>打分值</b></font></td>      
    <td width="87" align="center"><font color="#000080"><b>打分者名称 </b></font></td>                       
    <td width="156" align="center"><font color="#000080"><b>打分日期</b></font></td>                       
    <td width="64" align="center"><font color="#000080"><b>打分者</b></font></td>                      
  </tr>                  
                      
    <%for recordi=1 to  Rs.PageSize                     
      if rs.Eof then Exit for                     
      if recordi mod 2=0 then                  
         color="#ddddd7"                  
      else                  
         color="#eeeeef"                  
      end if                  
                      
      response.write ("<tr bgcolor=" + color +">")                  
    %>                       
      <td width="105"><input type="Checkbox" name="Selected" checked value=<%=rs("Tid")%>><% =rs("Tid") %></td>                                  
      <td width="74"><% =rs("Tname") %></td>                
      <td width="86"><% =rs("Category")%></td>                   
      <td width="308"><% =rs("Content")%></td>         
      <td width="52"><% =rs("FullScore") %></td>                
      <td width="35"><% =rs("Weight")%></td>                   
      <td width="53"><% =rs("Score")%></td>     
      <td width="87"><% =rs("OperatorName")%></td>     
      <td width="156"><% =rs("TestDate")%></td>     
      <td width="64"><% =rs("Kind")%> </td>     
    <%response.write ("</tr>")%>                       
    <% rs.movenext%>                       
    <%next%>                       
  </table>                       
</div>                       
<%                   
  Set rs=nothing                   
  Set Adoconn=nothing                   
%>

<%scriptname=request.servervariables("script_name")%>        
<br>        
<a href="<%=scriptname%>?Page=1&PageSize=<%=Psize%>&D1=<%=d1%>&D2=<%=d2%>&D3=<%=d3%>&D4=<%=d4%>">第一页</a>&nbsp;          
<a href="<%=scriptname%>?Page=<%=(Page+1)%>&PageSize=<%=Psize%>&D1=<%=d1%>&D2=<%=d2%>&D3=<%=d3%>&D4=<%=d4%>">下一页</a>&nbsp;            
<a href="<%=scriptname%>?Page=<%=(Page-1)%>&PageSize=<%=Psize%>&D1=<%=d1%>&D2=<%=d2%>&D3=<%=d3%>&D4=<%=d4%>">上一页</a>&nbsp;&nbsp;            
<a href="<%=scriptname%>?Page=<%=(Pages)%>&PageSize=<%=Psize%>&D1=<%=d1%>&D2=<%=d2%>&D3=<%=d3%>&D4=<%=d4%>">最后一页</a>&nbsp;&nbsp;

⌨️ 快捷键说明

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