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

📄 view.jsp

📁 学生档案管理系统 eclipse开发 数据库用的是SQL Sever 详细见里面的说明
💻 JSP
字号:
<%@ page language="java" import="java.sql.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <base href="<%=basePath%>">
    
    <title>管理学生成绩</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css" href="styles.css">
  </head>
    <jsp:include page="inc/head.html"/>
  <body>
  		<jsp:useBean id="view" class="Beans.ViewBean">
		<jsp:setProperty name="view" property="*"/></jsp:useBean>
		<%
			try
				{
					String type1=(String)session.getValue("type");
					int t=Integer.parseInt(type1);
					int test,test1;
					test=((t/4)%2);
					test1=((t/8)%2);
					if (test!=1&&test1!=1) out.print("<script language='javascript'>alert('你没有这个权限!');location.href='main.jsp'</script>");
				}
			catch(Exception e)
			{
				response.sendRedirect("Login.jsp");
			}
				ResultSet rs=null;
			  	try
				{
					String id=(String)session.getValue("id");	
					rs=view.getrs(id);	
				}
				catch(Exception e)
				{
					response.sendRedirect("Login.jsp");
				}		
		 %>
    <table width="100%" height="100%">
		<tr>
			<td width="25%">
			<form method="POST" action="View.jsp">
						<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
			<table width="100%">
				<!-- MSTableType="layout" -->
				<tr height="30">
					<td valign="top" >学生ID
											
					</td>
					<td valign="top" ><input type="text" name="uid" size="20"></td>
				</tr>
				<tr height="30">
					<td valign="top" >
					姓名</td>
					<td valign="top" >
					<input type="text" name="name" size="20"></td>
				</tr>
				<tr height="30">
					<td valign="top" >
					按学分升序排序</td>
					<td valign="top" >
					<input type="checkbox" name="up" value="ON"></td>
				</tr>
			</table>
						<p>
						<input type="submit" value="提交" name="B1" style="float: right"></p>
			</form>
			</td>
			<td width="75%">
			<%
		
			out.print("<TABLE class=datagridstyle id=DataGrid1 style='WIDTH: 100%; BORDER-COLLAPSE: collapse' cellSpacing=0 cellPadding=3 border=0><tr><td><b>姓名</b><td><b>学号</b><td><b>平均成绩</b><td><b>学分</b><td><b>班号</b>");
			
			while(rs.next())
			{
				//out.print("<tr class=datagrid1212><td><input type=radio name=delete value="+rs.getString("Users_ID")+">");
				out.print("<tr class=datagrid1212><td>"+rs.getString("Users_Name")+"</td>");
				out.print("<td>"+rs.getString("Users_ID")+"</td>");
				out.print("<td>"+rs.getString("Avage")+"</td>");
				out.print("<td>"+rs.getString("Score")+"</td>");
				out.print("<td>"+rs.getString("Class_id")+"</td></tr>");


								
			}
			out.print("</table>");
			
		 %>
		  </td>
		</tr>
	</table>
    <br>
  </body>
</html>

⌨️ 快捷键说明

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