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

📄 removemessagebat.jsp

📁 一套完整的工商12315的源程序jsp部分在12315里,后台JAVA部分在gs12315src里,没有打包数据库.
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@	page import="java.util.*,
                 java.text.*,
                 com.powerrun.shortmsg.*,
                 com.powerrun.ioffice.*,
                 com.powerrun.util.*,
                 com.powerrun.ioffice.util.*"
	errorPage="error.jsp"
%>
<jsp:useBean id="messageBean" scope="session"
 class="com.powerrun.shortmsg.messagebean.MessageBean"/>

<%	////////////////////////
	// Authorization check
	// check for the existence of an authorization token
	Authorization authToken = SkinUtils.getUserAuthorization(request,response);
	//Authorization authToken = AuthorizationFactory.getAuthorization("root", "123");
	if( authToken == null ) {
		response.sendRedirect("../login.jsp?referer=index.jsp");
		return;
	}
%>

<%	////////////////////
	// Security check
	// make sure the user is authorized to administer users:
	IofficeFactory iofficeFactory = IofficeFactory.getInstance(authToken);
	ProfileManager manager = iofficeFactory.getProfileManager();
	int userID= authToken.getUserID();
%>

<%	////////////////////
	// get parameters
	//String mode   = ParamUtils.getParameter(request,"mode");
	int  removemsgid[] = messageBean.getremoveID();
	
	boolean doDelete = ParamUtils.getBooleanParameter(request,"doDelete");
%>
<%	//////////////////////////////////
	// global error variables
	String errorMessage = "";
%>

<%	/////////////////////
	// delete  if specified
	if( doDelete ) {
		String userName1 = manager.getUser(userID).getName();
		String url1 = "delete.jsp";
		ComponentManager cpman = iofficeFactory.getComponentManager();
		IofficeComponent cp = cpman.getComponent( "message" );
		ShortMsgAgent agent =(ShortMsgAgent) cp.getAgentInstance();
		   for(int j=0;j<removemsgid.length;j++){
			int msgid=removemsgid[j];
			try {
			   iofficeFactory.createNotification(userID, new Date(), 1440*2, 1, 
        		   userName1+"删除了短信"+"["+msgid+"]", url1, 0);
			   agent.removeUsermessage(msgid);
			}
			catch( MessageNotFoundException fnfe ) {

				errorMessage = "No message found";
				}
			}
		
		response.sendRedirect("main.jsp");
		return;
	}
%>
 
<html>
<head>	<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
	<title></title>
<style>
<!--
table{ font-family: 宋体; font-size: 10pt }
a:link{ font-family: 宋体; font-size: 10pt; color: #000000; text-decoration: none }
a:visited{  font-family: 宋体; font-size: 10pt; color: #000000; text-decoration: none }
a:hover{ font-family: 宋体; font-size: 10pt; color: red; text-decoration:underline }
-->
</style>

</head>
<body topmargin="0" leftmargin="0" >

<table border="0" cellpadding="0" cellspacing="0" width="770">
  <tr>
    <td width="91" background="../images/rq21.gif" valign="top"><img border="0" src="../images/rq20.gif" width="144" height="339">
      <p> </td>
    <td width="675" valign="top">
      <div align="right">
                <table width="100%">
                  <tr>
                    <td vAlign="bottom" width="100%">
                      <img border="0" src="images/duanxin.gif" width="622" height="51">
                    </td>
                  </tr>
                  <tr>
                    <td width="100%" height="30">
                    
                  
                    
                    </td> 
                  </tr> 
                  <tr>
                    <td width="100%">
                      
                        <div align="center">
                          <center>
                          <table border="0" cellpadding="0" cellspacing="0" width="90%">
                            <tr>
                              <td width="100%" bgcolor="#eeeeee" height="35">
                    <%	///////////////////////
	// pageTitleInfo variable (used by include/pageTitle.jsp)
	String[] pageTitleInfo = { "信件管理", "删除信件" };
%>

<%-- header --%>
<%	if( pageTitleInfo != null ) { %>
	<table bgcolor="#BFDFFF" cellpadding="3" cellspacing="0" border="0" width="100%">
	<td><table bgcolor="#BFDFFF" cellpadding="3" cellspacing="0" border="0" width="100%">
	<td>
	<span class="pageTitle">
	<%	for( int i=0; i<pageTitleInfo.length; i++ ){ %>
		<%= pageTitleInfo[i] %>
		<%	if( (i+1)<pageTitleInfo.length ) { %>
			:&nbsp;
		<%	} %>
	<%	} %>
	</span>
	</td>
	</table></td>
	</table>
<%	} %>
<p><%
 String messageName="您所选定的信件";
%>
<font color=blue><b>&nbsp;删除选定信件 </b></font>                               
<ul>
警告: 本操作将从信箱中永久性的删除<b><font color="FF8000">[<%= messageName %>]</font></b>,  请确认是否删除信件!
</ul></td>
                            </tr>
                            <tr>
                              <td width="100%" bgcolor="#eeeeee">
                                <div align="center">
                                 <form action="removeMessageBat.jsp" name="deleteForm" method="post">
<input type="hidden" name="doDelete" value="true">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="submit" value=" 删除信件">
	&nbsp;
	<input type="submit" name="cancel" value=" 取消 " style="font-weight:bold;"
	 onclick="location.href='main.jsp';return false;">
</form> 
                                </div> 
                              </td> 
                            </tr> 
                            
                          </table>
                          </center>
                        </div>
                      </form>
                    </td> 
                  </tr> 
                </table>   
      </div>  
    </td>   
  </tr>   
</table>   
<table border="0" cellpadding="3" cellspacing="0" width="775">  
  <tr>  
    <td width="100%" bgcolor="#0065CE">  
      <%
                	String edition = PropertyManager.getProperty("edition");
                	if(edition==null)
                	{
                		edition = "Copyright ?2001 北京四通搏运软件技术有限公司 版权所有.";
                	}
                	else
                	{
                		edition = StringUtils.getChnString(edition);
                	}
      %>
      <p align="center"><font color="#FFFF00"><%=edition%></font></td>       
  </tr>       
  <tr>       
    <td width="100%"><img border="0" src="../images/rq11.gif" width="774" height="2"></td>      
  </tr>      
</table>      

<script language="JavaScript" type="text/javascript">
<!--
document.deleteForm.cancel.focus();
//-->
</script>      
</body>      

</html>

⌨️ 快捷键说明

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