- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
message.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:2k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <%@ page import="java.util.Date,java.text.SimpleDateFormat"%>
- <jsp:useBean id="messageQun" class="MyFly.Bean.messageQun" scope="request"/>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>无标题文档</title>
- </head>
- <%!
- String fun(String str)
- {
- try
- {
- return new String(str.getBytes("ISO8859_1"));
- }
- catch(Exception e)
- {
- return "";
- }
- }
- %>
- <%
- SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd");//将显示"1999-10-1 21:03:10"的格式.
- Date currentTime_1 = new Date();
- String msgid1 = request.getParameter( "checkbox" );
- String appendTime = formatter.format(currentTime_1);
- String content = request.getParameter("content");
- if(content.equals("")||msgid1.equals("")||msgid1==null)
- {
- out.println("<script language=javascript>alert('您还没选中用户');JavaScript:location.href='customerQun.jsp';</script>");
- }
- else{
- String[] msgid = request.getParameterValues( "checkbox" );
- int t=msgid.length;//提高效率
- for(int i=0;i<t;i++)
- {
- messageQun.setRecontent(fun(content));
- messageQun.setAppendTime(appendTime);
- messageQun.setUsername(fun(msgid[i]));
- messageQun.sendMessage();
- // messageQun.passmessage(fun(msgid[i]));
- }
- out.println("<script language=javascript>alert('发送成功');JavaScript:location.href='customerQun.jsp';</script>");
- }
- %>
- <body>
- </body>
- </html>