?? classmanager.jsp
字號:
<%@page contentType="text/html;charset=GBK"%>
<%@page import="java.sql.*"%>
<%@ include file="/public/checkvalidadmin.jsp"%>
<jsp:useBean id="conn" scope="page" class="test.ConnOracle"/>
<%!
ResultSet rs = null;
String classid = "";
String classname = "";
String priv_ok = "";
int totaltime = 0;
int totalques = 0;
int totalpaper = 0;
%>
<html>
<head>
<title>課程信息管理</title>
<link rel="stylesheet" href="../public/style.css">
</head>
<Body class="ss">
<center>
<%
priv_ok = (String)session.getAttribute("adminpriv");
if(priv_ok!=null && priv_ok.equals("8")) {
rs = conn.executeQuery("select * from test_classinfo");
if(!rs.next()) {
out.println("<center>");
out.println("數據庫中還沒有課程信息!<br>");
out.println("單擊這里<a href=javascript:history.back()>返回</a><br>");
out.println("</center>");
} else {
%>
<table bgColor="#00acff" border="1" borderColorDark="#ffff00" borderColorLight="#000000" cellSpacing="1" width="80%">
<tr>
<th width="20%">課程代號</th>
<th width="16%">課程名稱</th>
<th width="16%">考試時間</th>
<th width="16%">考題數目</th>
<th width="16%">試卷數目</th>
<th width="16%" colspan=2>操作</th>
</tr>
<%do {
classid = rs.getString("classid");
classname = rs.getString("classname");
totaltime = rs.getInt("totaltime");
totalques = rs.getInt("totalques");
totalpaper= rs.getInt("totalpaper");
%>
<tr align="center">
<form action="classchange.jsp" method="post">
<td><%=classid%></td>
<input type="hidden" name="classid" value="<%=classid%>">
<td><input type="text" name="classname" value="<%=classname%>"></td>
<td><input type="text" name="totaltime" value="<%=totaltime%>"></td>
<td><input type="text" name="totalques" value="<%=totalques%>"></td>
<td><%=totalpaper%></td>
<input type="hidden" name="totalpaper" value="<%=totalpaper%>">
<td><input type="submit" name="oper" value="修改"></td>
<td><input type="submit" name="oper" value="刪除"></td>
</form>
</tr>
<% } while(rs.next());%>
<tr>
<td colspan=7><hr color="white"></td>
</tr>
<form action="classadd.jsp">
<tr align="center">
<td><input type="text" name="classid" value=""></td>
<td><input type="text" name="classname" value=""></td>
<td><input type="text" name="totaltime" value=""></td>
<td><input type="text" name="totalques" value=""></td>
<td> </td>
<td colspan="2">
<Input type="submit" value="添加">
</td>
</tr>
</form>
</table>
<%
}
} else {
out.println("對不起,您的權限不足!<br>");
out.println("單擊這里<a href=javascript:history.back()>返回</a><br>");
}
%>
</form>
</center>
</Body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -