📄 reademail.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ 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" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>无标题文档</title>
<style>
<!--
a{TEXT-DECORATION:none}
body{ font-size:12px}
-->
</style>
<script>
function go(){
location.href="${pageContext.request.contextPath}/email.do?method=receiveBox&emailtype=0&receiveid=${sessionScope.user.uno}";
}
function init() {
var select_left = emailForm.arryusername;
var select_right = emailForm.senduser;
}
//left to right
function right() {
var select_left = emailForm.arryusername;
var select_right = emailForm.senduser;
var len = select_left.options.length;
for (var i = 0; i < len; i++) {
try {
if (select_left.options[i].selected == true) {
var tmp = select_left.options[i];
var oOption = document.createElement("OPTION");
oOption.text = tmp.text;
oOption.value = tmp.value;
//oOption.selected="selected";
select_right.add(oOption);
select_left.options[i] = null;
i--;
}
}
catch (e) {
}
}
}
//right to left
function left() {
var select_left = emailForm.arryusername;
var select_right = emailForm.senduser;
var len = select_right.options.length;
for (var i = 0; i < len; i++) {
try {
if (select_right.options[i].selected == true) {
var tmp = select_right.options[i];
var oOption = document.createElement("OPTION");
oOption.text = tmp.text;
oOption.value = tmp.value;
select_left.add(oOption);
select_right.options[i] = null;
i--;
}
}
catch (e) {
}
}
}
function selecttrue() {
var select_right = emailForm.senduser;
var len = select_right.options.length;
for (var i = 0; i < len; i++) {
select_right.options[i].selected = "selected";
}
}
</script>
<script>
function ToRight(){
init();
var moveright =document.getElementById("rightmove");
right();
}
function ToLeft(){
init();
var moveleft= document.getElementById("leftmove");
left();
}
function check(method){
var user = emailForm.senduser;
if(user.options.length<=0){
alert("请右下角选择要转发的用户");
return false;
}
for(var i = 0; i<user.options.length; i++){
user.options[i].selected = true;
}
document.getElementById("method").value=method;
emailForm.submit();
}
function back(id,name){
location.href="${pageContext.request.contextPath}/email.do?method=writeEmail&sendid="+id+"&checkeduserList="+name;
}
</script>
</head>
<body>
<html:form action="/email" method="post">
<html:hidden property="method" value=""/>
<table width="100%" border="1">
<tr>
<td colspan="2">操作:
<a href="${pageContext.request.contextPath}/email.do?method=writeEmail&sendid=<bean:write name='emailForm' property='sendid'/>&checkeduserList=<bean:write name='emailForm' property='sendname'/>" style="margin-left:10px">回复</a>-
<a href="${pageContext.request.contextPath}/email.do?method=delToRublish&emailid=<bean:write name='emailForm' property='emailid'/>" style="margin-left:10px">删除</a>-
<a href="${pageContext.request.contextPath}/email.do?method=delForever&emailid=<bean:write name='emailForm' property='emailid'/>" style="margin-left:10px">彻底删除</a>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="1">
<html:hidden name="emailForm" property="emailid"/>
<tr>
<td width="14%">日期</td>
<td width="86%">
<bean:write name="emailForm" property="sendtime"/>
</td>
</tr>
<tr>
<td >发件人</td>
<td>
<bean:write name="emailForm" property="sendname"/>
</td>
</tr>
<tr>
<td>收件人</td>
<td>
<bean:write name="emailForm" property="receivename"/>
</td>
</tr>
<tr>
<td>主题</td>
<td>
<bean:write name="emailForm" property="title"/>
</td>
</tr>
<tr>
<td>附件</td>
<td>
<logic:notPresent name="emailForm" property="fujian">
无附件
</logic:notPresent>
<logic:present name="emailForm" property="fujian">
<logic:empty name="emailForm" property="fujian">
无附件
</logic:empty>
<logic:notEmpty name="emailForm" property="fujian">
<logic:iterate id="temp" name="emailForm" property="fujian">
<a href="${pageContext.request.contextPath}/downLoadServlet?filepath=${temp.filepath}&filename=${temp.filename}" style="margin-left: 20px">
<bean:write name="temp" property="filename" />
</a>
</logic:iterate>
</logic:notEmpty>
</logic:present>
</td>
</tr>
<tr>
<td >
<textarea cols="80" rows="15" readonly="readonly">
<bean:write name="emailForm" property="content" />
</textarea>
</td>
<td>
<table width="100%" border="0" align="center">
<tr>
<td colspan="3" align="center">
<font color="red">转发请选择发送的用户</font>
</td>
</tr>
<tr>
<td width="44%" align="right">
<select name="arryusername" size=15 multiple style="width: 100px">
<c:forEach var="temp" items="${requestScope.userList}">
<option value="${temp.uno},${temp.uname}">${temp.uname}</option>
</c:forEach>
</select>
</td>
<td width="11%" align="center"><br /><br />
<input type="button" id="rightmove" value=">>" onclick="ToRight();" /><br /><br />
<input type="button" id="leftmove" value="<<" onclick="ToLeft();" /><br /><br />
</td>
<td width="45%" align="left">
<html:select property="senduser" multiple="true" size="15" style="width: 100px">
</html:select>
<!--<select name="senduser" size=15 multiple>
</select>
-->
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2">
<input type="button" value="回复" onclick="back('<bean:write name='emailForm' property='sendid'/>','<bean:write name='emailForm' property='sendname'/>');"/>
<input type="button" value="转发" onclick="return check('sendToOther');"/>
<input type="button" value="返回" onclick="go();"/>
</td>
</tr>
</table>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -