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

📄 scorequery1_1.asp

📁 一篇不错的好论文
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/StudentConn.asp" -->
<%
Dim Recordset1__MMColParam,Recordset2__MMColParam,Recordset3__MMColParam
Dim strSheetName, strStudentNum, strName, strGrade, strClass
strSheetName = Request("SheetName")
Recordset2__MMColParam = Request("SheetName")
Session("txtSheetName")=Request("SheetName")

%>

<%
set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_StudentConn_STRING
Recordset2.Source = "SELECT SheetName, TestName FROM TestName WHERE SheetName = '" + Replace(Recordset2__MMColParam, "'", "''") + "'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 3
Recordset2.Open()
Recordset2_numRows = 0
%>
<%
strStudentNum= Request("StudentNum")
strName=Request("Name")
strGrade=Request("Grade")
tmpGrade=Request("Grade")
strClass=Request("ClassSelect")

set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_StudentConn_STRING

if (strStudentNum <> "") then
  Recordset3__MMColParam =strStudentNum
  Recordset3.Source = "SELECT *  FROM " & strSheetName & " WHERE StudentNum like '%" & Recordset3__MMColParam & "%'  ORDER BY StudentNum"
elseif (strName<>"") then
  Recordset3__MMColParam =strName
  Recordset3.Source = "SELECT *  FROM " & strSheetName & " WHERE Name like '%" & Recordset3__MMColParam & "%'  ORDER BY StudentNum"
else  
  If len(Year(Now()))<=2 Then
    NewYear="20" & Year(Now())
  Else
    NewYear=Year(Now())
  End If
  If len(Month(Now()))<=1 Then
    NewMonth="0" & Month(Now())
  Else
    NewMonth=Month(Now())
  End If
  if NewMonth<9 then
    strStudentNum=NewYear-strGrade-1
  else
    strStudentNum=NewYear-strGrade
  end if
  if strClass="All" then strClass=""
  if Len(strClass)=1 then
    strClass="0" & strClass
  end if
  Recordset3__MMColParam =strStudentNum & strClass
  Recordset3.Source = "SELECT *  FROM " & strSheetName & " WHERE StudentNum like '" & Recordset3__MMColParam & "%'  ORDER BY StudentNum"
end if

Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 3
Recordset3.Open()
Recordset3_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
Recordset3_numRows = Recordset3_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim Recordset3_total
Dim Recordset3_first
Dim Recordset3_last

' set the record count
Recordset3_total = Recordset3.RecordCount

' set the number of rows displayed on this page
If (Recordset3_numRows < 0) Then
  Recordset3_numRows = Recordset3_total
Elseif (Recordset3_numRows = 0) Then
  Recordset3_numRows = 1
End If

' set the first and last displayed record
Recordset3_first = 1
Recordset3_last  = Recordset3_first + Recordset3_numRows - 1

' if we have the correct record count, check the other stats
If (Recordset3_total <> -1) Then
  If (Recordset3_first > Recordset3_total) Then
    Recordset3_first = Recordset3_total
  End If
  If (Recordset3_last > Recordset3_total) Then
    Recordset3_last = Recordset3_total
  End If
  If (Recordset3_numRows > Recordset3_total) Then
    Recordset3_numRows = Recordset3_total
  End If
End If
%>

<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (Recordset3_total = -1) Then

  ' count the total records by iterating through the recordset
  Recordset3_total=0
  While (Not Recordset3.EOF)
    Recordset3_total = Recordset3_total + 1
    Recordset3.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (Recordset3.CursorType > 0) Then
    Recordset3.MoveFirst
  Else
    Recordset3.Requery
  End If

  ' set the number of rows displayed on this page
  If (Recordset3_numRows < 0 Or Recordset3_numRows > Recordset3_total) Then
    Recordset3_numRows = Recordset3_total
  End If

  ' set the first and last displayed record
  Recordset3_first = 1
  Recordset3_last = Recordset3_first + Recordset3_numRows - 1
  
  If (Recordset3_first > Recordset3_total) Then
    Recordset3_first = Recordset3_total
  End If
  If (Recordset3_last > Recordset3_total) Then
    Recordset3_last = Recordset3_total
  End If

End If
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>学生成绩查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link href="home.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
   
  <TR> 
    <TD vAlign=top width=46 background=images/p_left_2.gif></TD>
    <TD width=20>&nbsp;</TD>
    <TD valign="top"> 
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<tr> 
            
          <td height=30 width="20%"><img src="images/friendsite.GIF" width="19" height="19"> 
            <a href="ScoreInputStep1.asp">录入学生成绩</a></td>
            
          <td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19"> 
            <a href="ScoreQueryStep1.asp">查询学生成绩</a></td>
            
          <td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19"> 
            <a href="ScoreModifyDel.asp">修改/删除学生成绩</a></td>
            
          <td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19"> 
            <a href="ScoreOrder.asp">计算总分与排名</a></td>
          <td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19"><a href="TargetManage.asp">目标分管理</a></td>
        </tr>
      </TABLE>
      <table width="100%" border=0 cellpadding=0 cellspacing=0>

⌨️ 快捷键说明

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