⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messagewrite.jsp

📁 JSP购物车(SQLserver版) ================== 简单的JSP电子商务网站购物车 带结算功能,带注册系统 大二时自己编写的,供大家参考学习 功能不是很详尽,美工
💻 JSP
字号:
<%@ page language="java" contentType="text/html;charset=UTF-8" %><%@ include file="../inc/common.jsp" %><%
FriendJsp friendJsp = new FriendJsp(request,response);
com.yeqiangwei.club.controller.form.MessageForm messageForm = messageJsp.getMessageForm();
%><!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>
<title>写短信 - 短消息管理(${basic.name})</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="${basic.keywords}"/>
<meta name="description" content="${basic.description}"/>
<meta name="author" content="YeQiangWei.com"/>
<link href="images/favicon.ico" rel="Bookmark" /> 
<link href="images/favicon.ico" rel="icon" type="image/x-icon" />
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<club:html type="css" />
<club:html type="csspath" value="member.css" />
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="scripts/utils.js"></script>
<script>
function writeMessage(){
	if(c.o("userNames").value.length==0){
		c.o("userNames").focus();
		alert("收件人不能为空!");
		return false;
	}
	else if(c.o("title").value.length==0){
		c.o("title").focus();
		alert("标题不能为空!");
		return false;
	}
	else if(c.o("content").value.length==0){
		c.o("content").focus();
		alert("内容不能为空!");
		return false;
	}
	c.p('qwSubmit',true);
	return true;
}
</script>
</head>
<body>
<%@ include file="../inc/nav.jsp" %><%@ include file="../inc/header.jsp" %>
<div class="sitemap">
<ul>
<li>您的位置:</li><li><a href="/club/" target="_parent">社区首页</a>&gt;&gt;</li><li><a href="main.jsp" target="_self">进站画面</a>&gt;&gt;</li><li><a href="message.jsp">站内短信管理</a>&gt;&gt;</li><li><strong>写短信</strong></li>
</ul>
</div>
<%@ include file="/club/inc/msgHint.jsp" %>
<div class="part">
<ul>
<li><a href="message.jsp?act=take">收件箱</a></li>
<li><a href="message.jsp?act=write" class="bg">写短信</a></li>
<li><a href="message.jsp?act=send">已发送</a></li>
<li class="normal"><a href="message.jsp?act=trash">废件箱</a></li>
<li class="normal"><a href="message.jsp?act=blacklist">黑名单</a></li>
<li class="normal"><a href="userSettings.jsp">设置</a></li>
</ul>
<div class="r">&nbsp;&nbsp;</div>
</div>
<div class="tabpart">
<div class="list">
<form name="Gforms" id="Gforms" method="post" action="message.do?act=write" onSubmit="return writeMessage();">
<div style="float:right; width:28%; height:100%;">
<strong>单击好友名字可自动加入到收件人!</strong><br/>
<select name="friends" id="friends" style="width:130px; height:200px; padding:4px;" multiple><%
java.util.List list = friendJsp.findBestFriendByMyUserId(50);
if(com.yeqiangwei.util.Validator.isEmpty(list)){
	out.print("<option value=\"0\" selected>暂无好友</option>");
}else{
	out.print("<option value=\"0\" selected>好友列表</option>");
%><c:forEach var="f" items="<%=list%>">
<option value="<c:out value="${f.user.userId}"/>"><c:out value="${f.user.userName}"/></option>
</c:forEach>
<%}%></select>
</div>
<form id="gform" name="gform" action="message.do?act=write" method="post" onsubmit="return writeMessage();">
<table style="width:70%;">
<tbody>
<tr>
<th scope="row" class="t_2">收件人:</th><td>
<club:html type="input" name="userNames" id="userNames" htmlType="text" value="<%=messageForm.getUserNames()%>" property=" style=\"width:300px;\""/>
<br/>
多个用户名请用逗号隔开,最多可发送5个用户。
</td>
</tr>
<tr>
<th scope="row" class="t_2">标题:</th><td><club:html type="input" name="title" id="title" htmlType="text" value="<%=messageForm.getTitle()%>" property=" style=\"width:300px;\""/></td>
</tr>
<tr>
<th scope="row" class="t_2" valign="top">内容:</th><td><textarea name="content" id="content" style="width:300px; height:100px;"><%=messageForm.getContent()%></textarea></td>
</tr>
<tr>
<th scope="row" class="t_2"></th><td><input type="submit" id="qwSubmit" name="qwSubmit" value="确定发送" class="btn"/></td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function setUserNames(){
	c.o("friends").onchange = function(){
		var o = c.t(c.o("friends"),"OPTION");
		for(var i=0;i<o.length;i++){
			var opt = o[i];
			if(opt.selected){
				if(opt.value>0){
					if(c.o("userNames").value.length==0){
						c.o("userNames").value = opt.text;
					}else{
						if(c.o("userNames").value.indexOf(opt.text)==-1){
							c.o("userNames").value = c.o("userNames").value + "," + opt.text;
						}else{
							c.o("userNames").value = c.o("userNames").value.replace("," + opt.text,"");
						}
					}
				}
			}
		}
	}
}
setUserNames();
</script>
</form>
</div>
</div>
<%@ include file="../inc/footer.jsp" %>
</body>
</html>
<!-- Powered by www.YeQiangWei.com -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -