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

📄 informationlistright.jsp

📁 这个是完整的wap项目的源码 开发语言 Java 系统架构 Struts + hibernate + spring 数据库 Mysql5.0 应用服务器Tomcat5.0 开发工具 MyEc
💻 JSP
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.longtime.wap.common.enums.CategoryEnum"%>
<%@ page import="com.longtime.wap.model.Information"%>
<%@ page import="java.util.List"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="com.longtime.wap.frame.common.UserSessionVO"%>
<%@ page import="com.longtime.wap.common.WapConstant"%>
<%@ page import="com.longtime.wap.module.information.common.DateUtil"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%@ taglib uri="/page-tag" prefix="page"%>
<html:form action="/informationList.do?method=listInformation" styleId="listInformation" method="post" onsubmit="return false;">
	<%int userGroup = ((UserSessionVO) session
					.getAttribute(WapConstant.USER_SESSION)).getUserGroup();%>
	<table align="center" width="98%" class="TableBack">
		<th colspan="3" align="left">
			信息管理
		</th>
		<tr>
			<td class="tborder"></td>
			<td>
				<table width="100%" class="TableBack">
					<tr>
						<td align="left">
							信息搜索:
							<html:text property="searchValue" size="15"></html:text>
							<html:select property="searchType">
								<html:option value="title">标题</html:option>
								<html:option value="content">内容</html:option>
							</html:select>
							&nbsp;&nbsp;&nbsp;业务名称:
							<html:select property="businessId">
								<html:options collection="all_businesses" property="value" labelProperty="label" />
							</html:select>
							&nbsp;
							<input class="ButtonCss" type="button" name="search" value="搜索" onClick="formSubmit('listInformation', 'module/information/informationList.do?method=listInformation')">
						</td>

						<td align="right">
							<input type="button" value="发布" name="show" onClick="informationPublishFormSubmit('pubInformationIds', 'listInformation', 'module/information/informationList.do?method=saveInformations&isPub=true')">
							
							<input type="button" value="删除" name="delete" onClick="recordDelete('deleteInformationIds', 'listInformation', 'module/information/informationList.do?method=deleteInformations')">
							
							<input type="reset" value="重置" name="reset">
							
						</td>
					</tr>
					<logic:notEmpty name="wap_global_messages" scope="request">
						<tr>
							<TD colspan="2">
								<logic:iterate id="message" name="wap_global_messages" scope="request">
									<center>
										<font color="red">
											<li>
												<bean:write name="message" />
											</li> </font>
									</center>
								</logic:iterate>
							</TD>
						</tr>
					</logic:notEmpty>
				</table>
			</td>
			<td class="tborder"></td>
		</tr>
		<tr>
			<td class="tborder"></td>
			<td>
				<table align="center" border="1" width="100%" id="informationTable" class="TableBack2">
					<tr>
						<th>
							信息标题
						</th>
						<th>
							发布日期
						</th>
						<th>
							业务类别
						</th>
						<th>
							业务名称
						</th>
						<th>
							查看
						</th>
						<th>
							编辑
						</th>
						<th>
							发布
						</th>
						<th>
							删除
						</th>
					</tr>
					<%if (null != request.getAttribute("informations")) {
				List informations = (List) request.getAttribute("informations");
				for (int i = 0; i < informations.size(); i++) {
					Information information = (Information) informations.get(i);

					/*
					 * informationState: 0   已经发布
					 *                   1   已经过期
					 *                   2   尚未发布
					 */
					int informationState = 0;
					if (1 == information.getIsPub()) {
						if (DateUtil.isOverDue(information.getPubDate(),
								information.getBusiness().getDuration())) {
							informationState = 1;
						} else {
							informationState = 0;
						}
					} else {
						informationState = 2;
					}

					%>
					<TR>
						<TD align="left">
							<%if (informationState == 0) {

					%>
							<img src="images/canedit.gif">
							<%} else if (informationState == 1) {

					%>
							<img src="images/yellow.gif">
							<%} else if (informationState == 2) {

					%>
							<img src="images/cantedit.gif">
							<%}

					%>

							&nbsp;
							<%=information.getTitle()%>
						</TD>
						<TD align="center">
							<%if (2 != informationState) {
						SimpleDateFormat sdf = new SimpleDateFormat(
								"yyyy-MM-dd");
						out.write(sdf.format(information.getPubDate()));
					}

					%>
						</TD>
						<TD align="center">
							<%int category = information.getBusiness().getCategory();
					out.write(CategoryEnum.getValue(category).toChinese());

					%>
						</TD>
						<TD align="left">
							&nbsp;&nbsp;&nbsp;&nbsp;<%=information.getBusiness().getBusinessName()%>
						</TD>
						<TD align="center">
							<a href="javascript:formSubmit('listInformation', 'module/information/informationEdit.do?method=getInformation&type=view&id=<%=information.getInformationId()%>')" class="href">查看</a>
						</TD>
						<%if (informationState == 2) {

						%>
						<td align="center">
							<a href="javascript:formSubmit('listInformation', 'module/information/informationEdit.do?method=getInformation&type=edit&id=<%=information.getInformationId()%>')" class="href">编辑</a>
						</td>
						<%} else {

					%>
						<td align="center">
							不能编辑
						</td>
						<%}

					%>

						<td align="center">
							<%if (informationState == 2) {

						%>
							<input type="checkbox" id="pubInformationIds" name="pubInformationIds" value="<%=information.getInformationId()%>" />
							<%}

					%>
						</td>
						<TD align="center">
							<%if (informationState == 2) {

						%>
							<input type="checkbox" id="deleteInformationIds" name="deleteInformationIds" value="<%=information.getInformationId()%>" />
							<%}%>
						</TD>
					</TR>
					<%}
			}

		%>
				</table>
			</td>
			<td class="tborder"></td>
		</tr>
		<TR>
			<td class="tborder"></td>
			<td>
				<page:page_tag formName="listInformation" action="module/information/informationList.do?method=listInformation" />
			</td>
			<td class="tborder"></td>
		</TR>
		<tr>
			<td colspan="3" class="tborder"></td>
		</tr>
	</table>
</html:form>
<br>
<table width="100%" align="center">
	<tr>
		<td>
			&nbsp;&nbsp;注:
			<img src="images/canedit.gif">
			为发布信息
			<img src="images/cantedit.gif">
			为暂存信息
			<img src="images/yellow.gif">
			为过期信息
		</td>
	</tr>
</table>

⌨️ 快捷键说明

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