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

📄 stulook.asp

📁 学生成绩管理系统
💻 ASP
字号:
<%
if session("pwd")<>"" then
%>
<!-- #include file="inc/top.asp"-->
<!-- #include file="inc/conn.asp"-->
<%
		'从表单获取关键词

        xh=session("user")
        kc=request.form("kc")
        cj=request.form("cj")
        xq=request.form("xq")
        lx=request.form("lx")
        al=request.form("al")
		xm=request.form("xm")
		

		

if lx="" and kc="" and cj="" and xm	="" and xq="" and al="" then
    response.write "<script language=JavaScript>" & chr(13) & "alert('请输入你要查询的条件');" & "history.back()" & "</script>"    '服务端发送script提示
    Response.End
end if
%>
<table>
  <!-- #include file="inc/stumenu.asp"-->
</table>
<%

		'根据不同的关键词生成不同的查询条件SQL语句


if request("kc")<>"" then
    sql="select * from bbs1 where kc like '" & kc & "' and xh like '" & xh & "'"
elseif request("cj")<>"" then
    sql="select * from bbs1 where cj like '" & cj & "' and xh like '" & xh & "'"
elseif request("xm")<>"" then
    sql="select * from bbs1 where user like '%%" & xm & "%%' and xh like '" & xh & "'"             '注意 user like '%%" & xm & "%%'部分 是中文查询的特殊地方
elseif request("xq")<>"" then
    sql="select * from bbs1 where xq like '" & xq & "' and xh like '" & xh & "'"
elseif request("lx")<>"" then
    sql="select * from bbs1 where lx like '" & lx & "' and xh like '" & xh & "'"
else
    sql="select * from bbs1 where xh like '" & xh &"'"
end if

rs.Open sql,conn,3,3
totalput=rs.RecordCount


%>
<%
if rs.EOF and  rs.BOF then
    Response.Write "<br>当前没有符合条件的成绩"
else
%>
<table width="752"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25"><table width="752" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td bgcolor="#EEEEEE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="unnamed2_14">班级:</span><%=rs("bj")%></td>
        </tr>
      </table>
      <table width="752" border="0" cellpadding="0" cellspacing="0" height="25">
        <tr>
          <td width="14%" align="center" height="25">姓名</td>
          <td width="14%" align="center" height="25">课程</td>
          <td width="14%" align="center" height="25">成绩</td>
          <td width="14%" align="center" height="25">学期</td>
          <td width="14%" align="center" height="25">类型</td>
        </tr>
      </table>
      <table width="752" height="22" border="0" cellpadding="0" cellspacing="0">
        <%
    do while not rs.eof
%>
        <%
    if rs("cj")>=60 then
     %>
        <tr>
          <td width="14%" align="center"><%=rs("user")%></td>
          <td width="14%" align="center"><%=rs("kc")%></td>
          <td width="14%" align="center"><%=rs("cj")%></td>
          <td width="14%" align="center"><%=rs("xq")%></td>
          <td width="14%" align="center"><%=rs("lx")%></td>
        </tr>
        <%
   else
      %>
        <tr>
          <td width="14%" align="center"><font color=red><%=rs("user")%></font></td>
          <td width="14%" align="center"><font color=red><%=rs("kc")%></font></td>
          <td width="14%" align="center"><font color=red><%=rs("cj")%></font></td>
          <td width="14%" align="center"><font color=red><%=rs("xq")%></font></td>
          <td width="14%" align="center"><font color=red><%=rs("lx")%></font></td>
        </tr>
        <%
end if

  %>
        <%
    rs.movenext
    loop
end if
rs.Close 
set rs=nothing
set conn=nothing
%>
      </table></td>
  </tr>
</table>
<table width="752" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<!-- #include file="inc/copyr.asp" -->
<%
else 
response.write("<script language=JavaScript>" & chr(13) & "alert('请输入你要查询的学号');" & "history.back()" & "</script>")
%>
<%
end if 
%>

⌨️ 快捷键说明

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