📄 moreresource.jsp
字号:
<%@ page language="java" import="java.util.*,com.oa.db.*"
pageEncoding="gbk"%>
<jsp:directive.page import="java.text.SimpleDateFormat" />
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>联信OA-资源管理</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
margin-left: 2px;
margin-top: 15px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-size: 12px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.STYLE1 {
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
}
-->
</style>
<script type="text/javascript">
function moresource(a)
{
var page = document.getElementById("appointPage").value;
if(page==""){
alert("请输入要跳转的页面数");
}else if(page!=""&&isNumberString(page,"1234567890")!=1){
alert("请输入正确的页面数");
}else if(page!=""&&page>a){
alert("请输入正确的页面数");
}else if(page!=""&&page<a){
alert("请输入正确的页面数");
}else{
window.location="/oa/moreresource.do?turnpage=" + page;
}
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)
{
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
</script>
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td width="113" height="30" bgcolor="#A4B5E3" class="STYLE3">
<div align="center" class="STYLE6">
资源更新
</div>
</td>
<td width="487" height="25" bgcolor="#A4B5E3">
</td>
</tr>
<tr>
<td height="25" colspan="2" bgcolor="#FFFFFF">
</td>
</tr>
<tr>
<td height="122" colspan="2" valign="top">
<table width="800" cellpadding="0" cellspacing="0">
<tr>
<td background="<%=request.getContextPath()%>/image/line.gif"
colspan="3" height="1"></td>
</tr>
<%
int currentpage = (Integer) request.getAttribute("currentpage");
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat(
"yyyy-MM-dd HH:mm");
String bg = "";
List list = (List) request.getAttribute("list");
if (list != null && list.size() != 0) {
for (int i = 0; i < list.size(); i++) {
if (i % 2 != 0) {
bg = "bgcolor=\"#F2F2FF\"";
} else {
bg = "";
}
Resource ro = (Resource) list.get(i);
%>
<tr>
<td width="27" height="22" <%=bg%>>
<div align="center">
<%=(currentpage - 1) * 50 + i + 1%>
</div>
</td>
<td width="387" height="22" <%=bg%>>
<%
if (ro.getRealfilename() != null
&& !ro.getRealfilename().equals("null")
&& !ro.getRealfilename().equals("")
&& ro.getRealfilename() != null
&& !ro.getRealfilename().equals("null")
&& !ro.getRealfilename().equals("")) {
String[] realaddr = ro.getRealfilename().replaceAll(
"///", ",").split("\\,");
String[] addr = ro.getFilename().replaceAll("///", ",")
.split("\\,");
for (int k = 0; k < addr.length; k++) {
%>
·
<a
href="<%=request.getContextPath()%>/resource/downresourcefile.jsp?fname=<%=realaddr[k]%>&fd=<%=addr[k]%>"
target="_blank"><%=realaddr[k]%>
</a>
</br>
<%
}
%>
<%
} else {
%>
<%
}
%>
</td>
<td width="163" <%=bg%>>
<div align="center">
<%=format.format(ro.getSavedate())%>
</div>
</td>
</tr>
<%
}
}
%>
<tr>
<td background="<%=request.getContextPath()%>/image/line.gif"
colspan="3" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
<%
String turnpage = (String) request.getAttribute("turnpage");
%>
<tr>
<td bgcolor="#ffffff" colspan="10" height="15">
<div align="right">
<logic:notEmpty name="pageBean">
<table width="500" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td>
共
<font color="red"><bean:write name="pageBean"
property="totalRecoder" /> </font>条记录
</td>
<td>
当前第
<font color="red"><bean:write name="pageBean"
property="currentPage" /> </font>/
<font color="red"><bean:write name="pageBean"
property="totalPages" /> </font>页
</td>
<td>
<html:link page="/moreresource.do" paramId="currentPage"
paramName="pageBean" paramProperty="firstPage">首 页</html:link>
</td>
<td>
<html:link page="/moreresource.do" paramId="currentPage"
paramName="pageBean" paramProperty="upPage"> 上一页</html:link>
</td>
<td>
<html:link page="/moreresource.do" paramId="currentPage"
paramName="pageBean" paramProperty="downPage">下一页</html:link>
</td>
<td>
<html:link page="/moreresource.do" paramId="currentPage"
paramName="pageBean" paramProperty="lastPage">尾 页</html:link>
</td>
<td>
<input type="text" id="appointPage" size="2"
value="<%=turnpage%>">
页
<input type="button" value="GO"
onclick="return moresource('<%=turnpage %>'); ">
<input type="button" value="返回首页"
onclick="window.open('index.do','_self');">
</td>
</tr>
</table>
</logic:notEmpty>
</div>
</td>
</tr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -