📄 listed.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.util.TheProperties"%>
<%@ page import="cn.com.aheadsoft.recordset.MailInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat,java.util.StringTokenizer" %>
<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<%
int u22 = upm.getUserPopInt(userinfo,"2","2","u");
int d22 = upm.getUserPopInt(userinfo,"2","2","d");
String MI_Title=(String)request.getAttribute("MI_Title");
String MI_AcceptName=(String)request.getAttribute("MI_AcceptName");
String MI_Date=(String)request.getAttribute("MI_Date");
String module=request.getParameter("module");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>已发留言列表</title>
<script src="/krm/jsp/jscript/Calendar.js"></script>
<script>
<!--
function MonthAnalysis() {
document.MIform.submit();
}
function changeMI_Date(){
document.MIform.MI_Date.disabled=!document.MIform.chMI_Date.checked;
}
function changeMI_AcceptName(){
document.MIform.MI_AcceptName.disabled=!document.MIform.chMI_AcceptName.checked;
}
function changeMI_Title(){
document.MIform.MI_Title.disabled=!document.MIform.chMI_Title.checked;
}
function atDelete() {
return confirm("您确定要删除吗?");
}
function openWin(url) {
window.open(url,'','toolbar=no,location=no,menubar=no,resizable=1,scrollbars=yes,left=0,top=0,width=800,height=600');
}
function Jumping(){
document.PageForm.submit();
}
-->
</script>
</head>
<%
//added by aoxiang fo Fengye
String totalpage = request.getParameter("totalpage");
int inttotalpage=Integer.parseInt(totalpage);//得到总页数
String topage=request.getParameter("topage");
int inttopage=Integer.parseInt(topage);//得到要到的页数
//added by aoxiang end
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr class="trA">
<td > 您的位置:通讯管理 >> 留言薄 >> <font class="fontcolor">已发留言列表</font></td>
</tr>
<tr height="8">
<td>
</td>
</tr>
<tr>
<td align="center">
<table border="0" width="98%" cellpadding="0" cellspacing="0">
<form name="MIform" method="post" action="/krm/servlet/MailInfoServlet?status=q&module=mailsearched">
<tr class="common">
<td >
<input type="checkbox" name="chMI_Title" value="" onClick="changeMI_Title()" >标题<input type="text" name="MI_Title" style="font-size:9pt;font-color:#FFFFFF;width:130" class="middle" <%if((MI_Title!=null)&&!(MI_Title.equals(""))){%> value=<%=MI_Title%><%}%> disabled>
<input type="checkbox" name="chMI_AcceptName" value="" onClick="changeMI_AcceptName()" >接收人<input type="text" name="MI_AcceptName" style="font-size:9pt;font-color:#FFFFFF;width:60" class="middle" <%if((MI_AcceptName!=null)&&!(MI_AcceptName.equals(""))){%> value=<%=MI_AcceptName%><%}%> disabled>
<input type="checkbox" name="chMI_Date" value="" onClick="changeMI_Date()" >发送时间<input readonly type="text" name="MI_Date" style="font-size:9pt;font-color:#FFFFFF;width:70" class="middle" <%if((MI_Date!=null)&&!(MI_Date.equals(""))){%> value=<%=MI_Date%><%}%> disabled> <a href="javascript:show_calendar('MIform.MI_Date');"><image src="/krm/jsp/image/selectdate.gif" border="0"></a>
<input type="button" value="查 询" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="javascript:MonthAnalysis();">
</td>
</tr>
</form>
</table>
<table border="0" width="98%" align="center" height="30%" class="collapse">
<tr>
<td class="tdA" colspan="9" align="center"><div align="left">
已发留言列表</div></td>
</tr>
<tr>
<td width="7%" class="tdB" align="center">序号</td>
<td width="53%" class="tdB" align="center">标题</td>
<td width="10%" class="tdB" align="center">接收人</td>
<td width="14%" class="tdB" align="center">发送时间</td>
<td width="9%" class="tdB" align="center">状态</td>
<td width="7%" class="tdB" align="center">操作</td>
</tr>
<%
MailInfoRecordSet recordset = (MailInfoRecordSet)request.getAttribute("mail");
//session.removeAttribute("mail");
if(recordset != null && recordset.size() > 0) {
int num = 1;
while(recordset.next()) {
String retmp = recordset.getMI_AcceptName().equals("")?"无":StringFormat.Source2GB(recordset.getMI_AcceptName());
if(!recordset.getMI_AcceptName().equals("")){
StringTokenizer fenxi = new StringTokenizer(retmp,",");
int k = fenxi.countTokens();
fenxi.hasMoreTokens();
if(k == 1){
retmp = fenxi.nextToken();
}else{
retmp = fenxi.nextToken()+"…";
}
}
%>
<tr <%
if(num%2==0){
%> class="bgcolor"<%}%>>
<td width="7%" class="common" align="center" ><%= num %></td>
<td width="53%" class="common" align="left" >
<a href="javascript:openWin('/krm/servlet/MailInfoServlet?status=q&module=vd&MI_ID=<%= recordset.getMI_ID() %>')"><%= StringFormat.Source2GB(recordset.getMI_Title()).trim().equals("")?"无标题":StringFormat.Source2GB(recordset.getMI_Title()).trim() %></a>
</td>
<td width="10%" class="common" align="center" ><%
String username = retmp.trim();
// if(!TheProperties.ENCODE.equalsIgnoreCase("GB2312")){
// username=new String(username.getBytes("GB2312"), "ISO8859_1");
// }
out.println(username);
%></td>
<td width="14%" class="common" align="center" ><%= StringFormat.Source2GB(recordset.getMI_Date()) %></td>
<td width="9%" class="common" align="center" ><%if((recordset.getMI_Accept().equals("#")) || (recordset.getMI_Accept().equals(""))){%><font color="#808080">阅读完</font><%}else{%><strong>阅读中</strong><%}%></td>
<td width="7%" class="common" align="center" >
<%
if((recordset.getMI_Accept().equals("#")) || (recordset.getMI_Accept().equals(""))) {
%>
<a <%if(d22 > 0){%> href="/krm/servlet/MailInfoServlet?status=d&module=send&MI_ID=<%= recordset.getMI_ID() %>&topage=<%=inttopage%>&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>" onclick="return atDelete()" <%}%>>删除</a>
<%}else {%>
<font color="#808080">删除</font>
<%}%>
</td>
</tr>
<%
num++;
}
}
%>
<%
int prev=inttopage-1;//定义前一页
int nextt=inttopage+1;//定义上一页
%>
<tr>
<td class="tdC common" align="center" colspan="6">
<form method="post" name="PageForm" action="/krm/servlet/MailInfoServlet?<%if(null !=module){%>module=mailsearched<%}%>&status=q&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>">
第<%=inttopage%>页共<%=inttotalpage%>页
<%if(inttopage>1){%>
<a href="/krm/servlet/MailInfoServlet?<%if(null !=module){%>module=mailsearched<%}%>&status=q&topage=1&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>">
首页</a> <a href="/krm/servlet/MailInfoServlet?<%if(null !=module){%>module=mailsearched<%}%>&status=q&topage=<%=prev%>&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>">
上一页</a>
<%}%>
<%if(inttopage<inttotalpage){%>
<a href="/krm/servlet/MailInfoServlet?<%if(null !=module){%>module=mailsearched<%}%>&status=q&topage=<%=nextt%>&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>">
下一页</a> <a href="/krm/servlet/MailInfoServlet?<%if(null !=module){%>module=mailsearched<%}%>&status=q&topage=<%=inttotalpage%>&<%if(MI_Title!=null){%>MI_Title=<%=MI_Title%><%}%>&<%if(MI_AcceptName!=null){%>MI_AcceptName=<%=MI_AcceptName%><%}%>&<%if(MI_Date!=null){%>MI_Date=<%=MI_Date%><%}%>">
尾页</a>
<%}%>
转到第
<select name="topage" onChange="Jumping()">
<% for(int j=1;j<=inttotalpage;j++) {
if (j== inttopage){
%>
<option selected value=<%=j%>><%=j%></option>
<%}else{%>
<option value=<%=j%>><%=j%></option>
<%}}%>
</select>
页
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -