📄 folder_list.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%@ page import="com.ijipin.oa.mail.*" %>
<%
////////////////////////////列表页面所必须有的公共变量
final String strSkin = "../../" + userInfor_session.getPFLJ(); //皮肤路径
final String strLevel = "../../../"; //本页所在的层次
final String strLink = "";
final int iModuleID = 35;
DataConn dataConn = new DataConn();
Statement stmt = null;
ResultSet rs = null;
DataList dataList = null;
//获取本模块信息
Module module = new Module(dataConn);
moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);
%>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>
<%@ include file="/share/page/bar_top.jsp"%>
<%
//查询条件,在包含页面中使用
String str_search[][] = {
{"LMMC","栏目名称"}
};
int i_search = str_search.length;
int iCurrentPage = 1;
int iRecordCount = 0;
int iPageCount = 0;
int i=0;
//参数
int iYGID = userInfor_session.getYGID();
String sTable = "indollar_YJWJJ";
String sField = "WJID,WJRY,WJMC";
String sCondition = " WJRY=0 OR WJRY="+iYGID;
String sSortField = "WJID";
int iOrder = 0;
if (!searchKey.equalsIgnoreCase("")){
sCondition = searchField + " like '%" + searchKey + "%'";
}
try {
iCurrentPage = Integer.parseInt(strPage);
}
catch(Exception e) {}
Folder dataBase = new Folder(dataConn);
FolderInfor folderInfor = null;
Iterator iterList = null;
PageInfor pageInfor = null;
iterList = dataBase.getList(sCondition, sSortField, iOrder, iCurrentPage).iterator();
pageInfor = dataBase.getPageInfor();
iRecordCount = pageInfor.getRecordCount();
iPageCount = pageInfor.getPageCount();
iCurrentPage = pageInfor.getCurrentPage();
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="folder_list.jsp">
<tr class="toptr2"><td>
<table width="100%" border=0 cellpadding=3 cellspacing=1 >
<tr>
<td width="4%">
<input type="button" name="btnAdd" value="" class="buttonAdd" onClick="document.location.href='folder_add.jsp'">
</td>
<td width="4%">
<input type="button" name="btnDelete" value="" class="buttonDel" onClick="DelCheck();">
</td>
<td align="right" nowrap><%@ include file="/share/page/page_top.jsp"%></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D4D0C8">
<form name="form" method="post" action="folder_list.jsp">
<tr class="toptr">
<td width="5" height=23 align="center"> <input name="checkall" type="checkbox" onClick="CheckAll(form);" title="选中或清除选中" tabindex="105"></td>
<td>文件夹名称</td>
<td width="120" align="left">邮件数</td>
<td width="120" align="left">新邮件数</td>
<td width="150" align="left">占用空间K</td>
<td width="80" align="center">操作</td>
</tr>
<%
i = 0; //控制单行和双行
java.text.DecimalFormat floatFormat = new java.text.DecimalFormat("#0.000");
int folder_id = 0;
int folder_user = 0;
String folder_name = "";
while (iterList != null && iterList.hasNext()) {
folderInfor = (FolderInfor)iterList.next();
folder_id = folderInfor.getWJID();
folder_name = folderInfor.getWJMC();
folder_user = folderInfor.getWJRY();
i++;
%>
<tr class="toptr3" onMouseOver="javascript:this.style.background= '#ECF2FC'" onMouseOut="javascript:this.style.background = '#FFFFFF'">
<td width="5" align="center" valign="top">
<%if (folder_user==0) {%>
<input type="checkbox" name="C_id2" value="<%=folder_id%>" disabled="true">
<%} else {%>
<input type="checkbox" name="C_id" value="<%=folder_id%>">
<% } %>
</td>
<td align="left" valign="top"><a onDblClick="SelectFolder(<%=folder_id%>);" onMouseOver="this.style.cursor='hand'" title="双击进入文件夹"><%=folder_name%> </a></td>
<td width="120" align="left" valign="top" ><%=dataBase.getAllCount(folder_id, iYGID)%> </td>
<td width="120" align="left" valign="top" ><%=dataBase.getNewCount(folder_id, iYGID)%> </td>
<td width="150" align="left" valign="top" ><%=floatFormat.format(dataBase.getSize(folder_id, iYGID)/1000.0)%> </td>
<td width="80" align="center" valign="top">
<%if (folder_user != 0) {%>
<a href="folder_update.jsp?folder_id=<%=folder_id%>">修改</a>
<% } else {%>
<% }%>
</td>
</tr>
<% } %>
<% if (i==0) {%>
<tr class="toptr3">
<td width="5" align="center"> <input type="checkbox" name="C_id2"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<% }%>
</form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="form2" method="post" action="folder_list.jsp">
<tr class="toptr2"><td>
<table width="100%" border=0 cellpadding=3 cellspacing=1 >
<tr>
<td width="4%">
<input type="button" name="btnAdd" value="" class="buttonAdd" onClick="document.location.href='folder_add.jsp'">
</td>
<td width="4%">
<input type="button" name="btnDelete" value="" class="buttonDel" onClick="DelCheck();">
</td>
<td align="right" nowrap><%@ include file="/share/page/page_bottom.jsp"%></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<%@include file="/share/page/page_form.jsp"%>
<script language="javascript">
function SelectFolder(folder) {
document.location.href="mail_list.jsp?foldertype="+folder;
}
function DelCheck()
{
flag=0;
for (j=0;j<form.elements.length;j++) {
if (form.elements[j].checked==true && form.elements[j].name=="C_id"){
flag=flag+1;
break;
}
}
if (flag !=0){
if (confirm("将同时删除文件夹下的所有邮件,是否继续?!")) {
var url="folder_delete.jsp?page=<%=iCurrentPage%>";
form.action=url;
form.submit();
}
}
else
{ alert("请选择要删除的文件夹"); }
}
</script>
<%
try {
if (dataConn != null) {
dataConn.close();
}
}
catch(Exception e) {}
%>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -