?? noticelist.jsp
字號:
<%@ page contentType="text/html;charset=gb2312" %>
<%@page import="grad.util.notice.*,java.util.*,java.io.*,grad.util.user.*,grad.util.course.*;"%>
<%@ page session="true" %>
<link href="/netteaching/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function openScript(url,name, width, height){
var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
</script>
<table cellpadding="0" cellspacing="0" width="630">
<TR>
<TD width="630" bgcolor="#FFFFFF">
<%
if(((String)session.getAttribute("usercode")!=null)&&(((Integer)session.getAttribute("usertype")).intValue()==1))
{
String userid=(String)session.getAttribute("usercode");
op_user opc=new op_user();
op_notice opr=new op_notice();
ArrayList courseList =opc.getUserCourse(userid);
if(courseList!=null&&courseList.size()>0){
%>
<p align=center>
<table>
<br>
<%
for(int j=0;j<courseList.size();j++){
course cs=(course)courseList.get(j);
ArrayList al=opr.getAllnoticeByCourse(cs.getCourse_code());
if(al!=null&&al.size()>0)
{
out.print("<tr><td><td> </tr><tr><td colspan=3 class=tabletitle2>您選擇課程<font color=red>《"+(cs.getcourse_name())+"》</font>已經發布了下列公告</td></tr>");
out.print("<tr><td colspan=3></td></tr>");
%>
<tr><td class=tablebody1>公告名稱</td><td class=tablebody5>發布日期</td><td class=tablebody1>操作</td></tr>
<%
for(int i=0;i<al.size();i++)
{
notice rs=(notice)al.get(i);
%>
<tr>
<td class=tablebody1><%=(rs.gettitle())%></td>
<td class=tablebody5><%=rs.getdate()%></td>
<td class=tablebody1><a href="#" onclick="openScript('notice_detail.jsp?ID=<%= rs.getid()%>','indentlist',300,200);" >瀏覽</a> </td>
</tr>
<%
}
}else
{
out.print("<tr><td><td> </tr><tr><td colspan=3 class=tabletitle2>您選擇課程<font color=red>《"+(cs.getcourse_name())+"》</font>沒有發布任何公告</td></tr>");
}
}
%>
</table>
</p>
<%
}else{out.print("您還沒有選擇任何課程");}
}else
{ out.print("您還沒有登錄或者沒有權限進入,請<a href=../index.jsp target=_parent>返回首頁登錄</a>");
}
%>
</td>
</tr>
</table>
<table width="650">
<tr>
<td>
<%@ include file="../inc/tail.htm"%>
</td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -