📄 articles.jsp
字号:
<%@ page language="java" import="java.util.*,domain.*"
pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
int pages = 1;
int totalPage = 0;
pages = (Integer)request.getAttribute("whichpage");
totalPage = (Integer)request.getAttribute("totalPage");
%>
<html>
<head>
<title>交易撮合</title>
<style type="text/css">
<!--
.STYLE3 {
font-family: "宋体";
font-size: 14px;
}
.tasklist {
BORDER-TOP: #aad1ef 1px solid; WIDTH: 900px; BORDER-BOTTOM: #aad1ef 1px solid
}
.listtable {
MARGIN: 0px auto; WIDTH: 900px
}
.listtable TH {
BORDER-RIGHT: #e4e4e4 1px solid; PADDING-RIGHT: 6px; BORDER-TOP: #e4e4e4 1px; PADDING-LEFT: 6px; FONT-WEIGHT: normal; BACKGROUND: #e4effa; PADDING-BOTTOM: 10px; BORDER-LEFT: #e4e4e4 1px solid; PADDING-TOP: 10px; BORDER-BOTTOM: #e4e4e4 1px solid
}
.listtable TD {
BORDER-RIGHT: #e4e4e4 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #e4e4e4 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 6px; VERTICAL-ALIGN: middle; BORDER-LEFT: #e4e4e4 1px solid; COLOR: #333; LINE-HEIGHT: 18px; PADDING-TOP: 6px; BORDER-BOTTOM: #e4e4e4 1px
}
-->
</style>
<meta http-equiv="content-type" content="text/html;charset=gbk">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=25>
您现在的位置:文章管理
</TD>
</TR>
<TR>
<TD bgColor=#2650a6>
<IMG height=1 src="images\blank(1).gif" width=1>
</TD>
</TR>
<TR>
<TD>
<IMG height=2 src="images\blank(1).gif" width=574>
</TD>
</TR>
</TBODY>
</TABLE>
<div align="right"><a href="/webpk/admin/addarticletype.jsp">添加文章类别</a></div>
<br>
<div align="center">
<DIV class=tasklist>
<table class=listtable cellpadding="0" cellspacing="0">
<tr bgcolor="#e4effa" height="31">
<!-- <td>
文章ID
</td> -->
<th>
文章名称
</th>
<th>
文章类别ID
</th>
<th>
开始时间
</th>
<th>
点击率
</th>
<th>
模块位置
</th>
<th>
删除文章
</th>
</tr>
<logic:present name="articles" scope="request">
<logic:iterate id="dept" name="articles" type="domain.Articles">
<tr>
<!-- <td>
<bean:write name="dept" property="articlesid"/>
</td> -->
<td>
<bean:write name="dept" property="title" />
</td>
<td>
<bean:write name="dept" property="kindid" />
</td>
<td>
<bean:write name="dept" property="post_time"/>
</td>
<td>
<bean:write name="dept" property="hits"/>
</td>
<td>
<bean:write name="dept" property="address"/>
</td>
<td align="center">
<a href="/webpk/htdelarticle.do?id=<bean:write name="dept" property="articlesid"/>" onClick="return check();">删除</a>
</td>
</tr>
</logic:iterate>
</logic:present>
</table>
</DIV>
<br>
<%
if(pages != 1){
out.println("<a href=/webpk/htarticle.do?Page=1>首页</a>");
out.println("<a href=/webpk/htarticle.do?Page="+(pages - 1)+">上一页</a>");
}
if(pages != totalPage){
out.println("<a href=/webpk/htarticle.do?Page="+(pages + 1)+">下一页</a>");
out.println("<a href=/webpk/htarticle.do?Page="+totalPage+">尾页</a>");
}
%>
第<%=pages%>页/共<%=totalPage%>页
<form action="/webpk/htarticle.do" method="post" onsubmit="return checkform();">
输入页数:
<input type="text" name="Page" id="Page"/>
<input type="submit" value="GO" /> <a href="/webpk/articletype.do">添加文章</a>
</form>
<table width="100%" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
技术支持 电话:010-51778949; E-Mail:yuxiangqian@hotmail.com; MSN:yuxiangqian@hotmail.com; QQ:641593276
</td>
</tr>
<tr>
<td align="center">
Copyright 2004-2008 蜘蛛工作室:www.zhzhcn.cn All Rights Reserved
</td>
</tr>
</table>
</div>
<script>
function check(){
if(confirm("确定要删除么?") == false){
return false;
}else{
return true;
}
}
function checkform(){
var page = document.getElementById("Page").value;
var regString = /^[0-9]{0,9}$/;
if(!page.match(regString)){
alert("您输入的页码有错误!");
return false;
}
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -