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

📄 select.jsp

📁 学生学籍管理系统 有三种权限
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.sql.*,bbs.DBConnect,bean.Chengji" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String paths = request.getContextPath();
String basePaths = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+paths+"/";
String id=(String)session.getAttribute("id");
String sub = request.getParameter("subject");
String pot = request.getParameter("passOrNot");
String time = request.getParameter("time");
String sql="";
 if(sub!="")
{
    sql="select * from chengji where id='"+id+"' and  kecheng='"+sub+"'";
}
else if(pot=="pass")
{
    sql="select * from chengji where id ='"+id+"' and cj>='60'";
    
    
}
else if(pot=="notPass")
{
    sql="select * from chengji where id='"+id+"' and cj<60";
    
}
else if(time!=""&&time=="052")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
else if(time!=""&&time=="061")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
else if(time!=""&&time=="062")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
else if(time!=""&&time=="071")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
else if(time!=""&&time=="072")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
else if(time!=""&&time=="081")
{
    sql="select * from chengji where id='"+id+"' and time='"+time+"'";
}
 else 
{
    sql="select * from chengji where id='"+id+"'";
}
DBConnect db=new DBConnect(sql);
ResultSet rs=db.executeQuery();
Vector v=new Vector();
while(rs.next()){
	Chengji c=new Chengji();
	c.setKecheng(rs.getString("kecheng"));
	c.setCj(rs.getString("cj"));
	c.setXueqi(rs.getString("xueqi"));
	v.add(c);
}
pageContext.setAttribute("list",v);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>成绩信息</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK media=all href="<%=paths %>/css/public.css" type=text/css rel=stylesheet>
<style type="text/css">
.button {
	BORDER-RIGHT: #1065ac 1px solid; BORDER-TOP: #1065ac 1px solid; BACKGROUND: #1065ac; FONT: bold 12px Verdana; BORDER-LEFT: #1065ac 1px solid; CURSOR: pointer; COLOR: #ffffff; BORDER-BOTTOM: #1065ac 1px solid
}
.itemValue{
	FONT: bold 12px Verdana; COLOR: #ff0000
}
</style>
<SCRIPT type=text/javascript>
        //**************************************************<![CDATA[
        window.onload=function(){
        typeof menuItem=="undefined"?alert("当前页面所属菜单项目未定义!"):parent.selectMenu(menuItem);
        if(typeof helpMsg=="undefined")helpMsg="无";
        parent.writeHelpMsg(helpMsg);
        parent.loaded(document.body.scrollHeight);
        //document.getElementById("e_focus").focus();
        if(typeof init=="function")init();
        //	gony_rollover();
        //	gony_preload();
        };
        window.onunload=parent.loading;
        //**************************************************]]>
    </SCRIPT>
</HEAD>
<BODY>
<DIV id=body>
<form action="<%=paths%>/service/student/select.jsp" method="post">
<DIV class=l_title style="margin-bottom:5px">
<span>成绩信息</span>
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="FONT: 12px Verdana; color:#000000">请输入要查询的课程</font>&nbsp;&nbsp;&nbsp;
<input name="subject" type="text"/>&nbsp;&nbsp;&nbsp;
<select name="passOrNot"><option value="pNone">未选中</option><option value="pass">全部及格成绩</option><option value="notPass">所有不及格成绩</option></select>&nbsp;&nbsp;&nbsp;
<select name="time"><option value="tNone">未选中</option><option value="052">2005-2006秋</option><option value="061">2006-2007春</option><option value="062">2006-2007秋</option><option value="071">2007-2008春</option><option value="072">2007-2008秋</option><option value="081">2008-2009春</option></select>
<input class=button type=submit value="查询">
</span>
</DIV></form>
<DIV class=l_content>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 10px; PADDING-TOP: 0px; TEXT-ALIGN: left">
<TABLE class=table cellSpacing=0 cellPadding=0 border=0>
  <THEAD><TR><TD>课程名称</TD><TD>成绩</TD><TD>学期</TD><TR></THEAD>
  <TBODY>
  <c:forEach var="ob" items="${pageScope.list}">
  <TR>
    <TD>${ob.kecheng }</TD>
    <TD>${ob.cj }</TD>
    <TD>${ob.xueqi}</TD>
  </TR>
  </c:forEach>
  </TBODY></TABLE>&nbsp;<FONT class=page_list></FONT>&nbsp;</DIV></DIV>
<SCRIPT type=text/javascript>
var menuItem="用户功能.成绩查询";
var helpMsg="该页面你可以查询自己的每个学期的每门课程的成绩";
</SCRIPT>
</DIV>
<DIV></DIV></BODY></HTML>

⌨️ 快捷键说明

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