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

📄 main.jsp

📁 一套完整的工商12315的源程序jsp部分在12315里,后台JAVA部分在gs12315src里,没有打包数据库.
💻 JSP
📖 第 1 页 / 共 2 页
字号:

<%@	page import="java.util.*,
                 java.text.*,
                 com.powerrun.shortmsg.*,
                 com.powerrun.util.*,
                 com.powerrun.ioffice.*,
                 java.text.SimpleDateFormat,
                 com.powerrun.ioffice.util.*"
	errorPage="error.jsp"
%>

<jsp:useBean id="messageBean" scope="session"
 class="com.powerrun.shortmsg.messagebean.MessageBean"/>

<%@ page contentType="text/html;charset=gb2312"%>
<%!	////////////////////////
	// global page variables
	
	// date formatter for today's date
	private final SimpleDateFormat todayDateFormatter = 
		new SimpleDateFormat("yyyy年MM月d日");
%>

<%!	///////////////////
	// global variables
	
	// number of threads to display per page:
	private final int[] messageRange = { 15,25,50,100 };
	
	// default starting index and number of threads to display
	// per page (for paging)
	private final int DEFAULT_RANGE = 15;
	private final int START_INDEX   = 0;
%>
<%	////////////////////////
	// 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;
	}
%>

<%	///////////////////////
	// page forum variables
	// do not delete these
	IofficeFactory iofficeFactory = IofficeFactory.getInstance(authToken);
	int userID=authToken.getUserID();

	String ipaddr = request.getRemoteAddr();
	iofficeFactory.reportPulse(ipaddr,"浏览留言");

	
	User user = iofficeFactory.getProfileManager().getUser(userID);
	ComponentManager cpman = iofficeFactory.getComponentManager();
	IofficeComponent cp = cpman.getComponent( "message" );
	////////
	ShortMsgAgent agent =(ShortMsgAgent) cp.getAgentInstance();
	//long userLastVisitedTime = SkinUtils.getLastVisited(request,response);
%>
<%	//////////////////////
	// get parameters
	int range    = ParamUtils.getIntParameter(request,"range",DEFAULT_RANGE);
	
	int start    = ParamUtils.getIntParameter(request,"start",0);
	boolean doRemove = ParamUtils.getBooleanParameter(request,"doRemove");
%>
<%	//delete notification seen
	int NtfIDSeen = ParamUtils.getIntParameter(request,"NTFIDSEEN",-999);
	if ( NtfIDSeen>0 )
	{

		iofficeFactory.deleteNotification( iofficeFactory.getNotification(NtfIDSeen) )	;
		session.removeValue("notification");
	}
%>
<%	////////////////////
	String userName  = user.getName();
	int numIsnew   = agent.getIsNewCount(user);
	int ininumIsnew =agent.getIsNewCount(user);
	int usermessage[]=agent.getUsermessages(user);
	int count=usermessage.length;
	int inicount=usermessage.length;
%>
<%  if (doRemove){
	Enumeration ck = request.getParameterNames();
	int[] removeMsgID = null;
		ArrayList tempId = new ArrayList();
		while (ck.hasMoreElements()){
			String ckname=(String)ck.nextElement();
		    if (ckname.substring(0,2).equals("ck")){
			if (ParamUtils.getCheckboxParameter(request,ckname)==true){
			int ckMsgID=Integer.parseInt(ckname.substring(2));
			 tempId.add(new Integer(ckMsgID));
			 }
			} 
		}
		removeMsgID = new int[tempId.size()];
        	for (int i=0; i<removeMsgID.length; i++) {
            	removeMsgID[i] = ((Integer)tempId.get(i)).intValue();
        }
        if (removeMsgID.length>0){
        messageBean.setremoveID(removeMsgID);
	response.sendRedirect("removeMessageBat.jsp");
	return;}
 } %>
<script language="JavaScript">
<!--
function CheckAll(form)
  { for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
  
    }
 }


//-->  
</script>

<%	/////////////
	// Toolbar
	boolean showToolbar = true;
	String viewLink = null;
	String postLink = "post.jsp?mode=new&userID="+userID;
	String removeLink =null;
	String replyLink = null;
	//String searchLink = "search.jsp?forum="+forumID;
	// we can show a link to a user account if the user is logged in (handled
	// in the toolbar jsp)
	//String accountLink = "userAccount.jsp";
%>
<%
	String ipaddr2 = request.getRemoteAddr();
	session.putValue("doThing","短信一览");
	iofficeFactory.reportPulse(ipaddr2,"短信一览");
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>欢迎光临本网站</title>
<script language="javascript">
<!--



function js_callpage(htmlurl) {
(navigator.appName.indexOf("Netscape") != -1)
  {
    openwin=window.open(htmlurl,"homeWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=704,height=414");
    openwin.focus();
    return false;
  }
}

//-->
</script>
<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>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</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><font color="#000080"><b>信件总数:<%=inicount%></font>&nbsp;<font color="#000080">未读:</font><font color="#ff0000"><%= ininumIsnew %></font></b> </td>
                  </tr> 
                  <tr>
                    <td width="100%">
                     <form action="main.jsp" method="post" name="form1">
                     <input type="hidden" name="doRemove" value="true">
                        <div align="center">
                          <center>
                          <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                              <td width="100%" bgcolor="#84C1C1" height="35">
                                <p align="center" style="line-height: 200%"><input type="submit" name="remove" value="删除选定信件">
				<input type="button" name="send" value="发送新信件" onclick="location.href='post.jsp?reply=false&userID=<%=userID%>';return false;"></td>
                            </tr>
                            <tr>
                              <td width="100%">
                                <div align="center">
                                  <table border="1" cellPadding="3" cellSpacing="0" width="100%" bordercolorlight="#FF9460" bordercolordark="#FFFFFF">
                                    <tbody>
                                      <tr>
                                        <td align="middle" bgColor="#C8E3FF" width="5%">新</td>
                                        <td align="middle" bgColor="#C8E3FF" width="8%">选 
                                          择</td>
                                        <td align="middle" bgColor="#C8E3FF" width="51%">主&nbsp;  
                                          题</td> 
                                        <td align="middle" bgColor="#C8E3FF" width="18%">发信人</td> 
                                        <td align="middle" bgColor="#C8E3FF" width="18%">发信日期</td> 
                                      </tr> 
                                      <%	/////////////////////
	// get an iterator of threads
	//Iterator threadIterator = forum.threads(start,range);
	  
	if (count==0) {

⌨️ 快捷键说明

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