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

📄 newslist.jsp

📁 一个免费wap站
💻 JSP
字号:
`<?xml version="1.0" encoding="gb2312" ?><%@ page language="java" contentType="text/html; charset=gb2312"    pageEncoding="gb2312"%>
<%@ page import="com.eline.wap.common.util.*"%>
<%@ taglib uri="/WEB-INF/tlds/eline-common.tld" prefix="common" %>
<%@ taglib uri="/WEB-INF/tlds/eline-resource.tld" prefix="resource" %>
<%

int parentId = StringUtils.getInt(request.getParameter("parentId"), 0);
boolean isActiveOnly = StringUtils.getBoolean(request.getParameter("active"), true);

// Init veriables required for current page.
String actionUrl = SiteUrls.getInstance().getProperty(SiteUrls.NEWS_LIST) + "?parentId=" + parentId;
if (!isActiveOnly)
	actionUrl += "&active=0";
System.out.println("actionUrl=" + actionUrl);
%>
<!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><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>资讯列表</title><link href="../../style/default.css" type="text/css" rel="stylesheet" />
<link href="../jsp_client/flyoutmenu/flyoutmenu.css" type="text/css" rel="stylesheet" />
<jsp:include page="../common/menuData_inc.jsp" flush="true"/>
<style type="text/css">
form { MARGIN: 0px 0px 0px 0px }
</style>
<script language="javascript" src="../common/common.js"></script>
<script language="javascript" id="clientEventHandlersJS">
<!--
function buttonCreate_onclick() {
	var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.NEWS_CREATE)%>?parentId=<%=parentId%>";
	var returnValue = showDialog(url, 600, 600);

	if (returnValue == "reload")
		window.location.reload();
}

function buttonUpdate_onclick() {
	var checkGroup = document.all["CheckGroup"];
	if (checkGroup == null) {
		window.alert("Required page element(s) missing.");
		return false;
	}
	var count = checkGroup.length == null ? 1 : checkGroup.length;
	var checkedCount = 0;
	var itemId = -1;
	if (count == 1) {
		if (checkGroup.checked) {
			itemId = checkGroup.value;
			checkedCount ++;
		}
	} else {
		for (var i = 0; i < count; i ++) {
			if (checkGroup[i].checked) {
				itemId = checkGroup[i].value;
				checkedCount ++;
			}
		}
	}
	if (checkedCount != 1) {
		window.alert("当前选中了" + checkedCount + "项,您只能选中一个项来进行修改...");
		return false;
	}
	var dlgUrl = "../common/modalDialog.htm";
	var arguments = "<%=SiteUrls.getInstance().getProperty(SiteUrls.NEWS_UPDATE)%>?newsId=" + itemId;
	var features = "dialogHeight: 600px; dialogWidth: 600px; help: No; center: Yes; resizable: No; status: No;";
	var returnValue = window.showModalDialog(dlgUrl, arguments, features);
	if (returnValue == "reload")
		window.location.reload();
}

function buttonDelete_onclick() {
	var checkGroup = document.all["CheckGroup"];
	if (checkGroup == null) {
		window.alert("Required page element(s) missing.");
		return false;
	}
	var count = checkGroup.length == null ? 1 : checkGroup.length;
	var checkedCount = 0;
	var itemId = "";

	if (count == 1) {
		if (checkGroup.checked) {
			itemId = checkGroup.value;
			checkedCount ++;
		}
	} else {
		for (var i = 0; i < count; i ++) {
			if (checkGroup[i].checked) {
				itemId += checkGroup[i].value + ";";
				checkedCount ++;
			}
		}
	}

	if (checkedCount < 1) {
		window.alert("您还没选中要删除的项");
		return false;
	}

	window.alert("当前选中了" + checkedCount + "项\nID列表:" + itemId);

	var dlgUrl = "../common/modalDialog.htm";
	var arguments = "<%=SiteUrls.getInstance().getProperty(SiteUrls.NEWS_DELETE)%>?newsId=" + itemId;
	var features = "dialogHeight: 500px; dialogWidth: 550px; help: No; center: Yes; resizable: No; status: No;";
	var returnValue = window.showModalDialog(dlgUrl, arguments, features);

	if (returnValue == "reload")
		window.location.reload();
	
	return true;
}

function checkActiveOnly_onclick() {
	var element = event.srcElement;
	var currentUrl = "<%=SiteUrls.getInstance().getProperty(SiteUrls.NEWS_LIST) + "?parentId=" + parentId%>";
	if (!element.checked)
		currentUrl += "&active=0";
	window.location.href = currentUrl;
}

-->
</script>
</head><body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">
<table cellpadding="0" width="100%">
	<tr>
		<td colspan="2"><jsp:include page="../common/banner_inc.jsp" flush="true"/></td>
	<tr>
		<td valign="top" style="width: 180px">
			<jsp:include page="../common/menuBody_inc.jsp" flush="true"/>
		</td>
		<td valign="top" style="BORDER-BOTTOM: #999999 1px solid">
			<table cellpadding="0" width="100%">
				<tr>
					<td>资讯目录</td>
					<td align="right"><input name="TextSearch" type="text" maxlength="50" style="width:180px;" /><input type="button" name="ButtonSearch" value="搜索" class="button2w" /></td>
				</tr>
				<tr>
					<td colspan="2">
						<resource:newsList pageItems="15" parentId="<%=parentId%>" activeOnly="<%=isActiveOnly%>">
						<table width="100%" class="tableBorder" cellpadding="1" cellspacing="1">
							<tr>
								<td class="tableHeader" width="25"><input type="checkbox" disabled checked /></td>
								<td class="tableHeader" nowrap>标题</td>
								<td class="tableHeader" width="150">来源</td>
								<td class="tableHeader" width="50">状态</td>
								<td class="tableHeader" width="120">更新时间</td>
							</tr>
							<common:items>
							<tr>
								<td class="tableRow"><input type="checkbox" name="CheckGroup" value="<resource:newsAttribute name="id" />" /></td>
								<td class="tableRow"><a title="编辑" href="javascript:showSmartDialog('<resource:newsAttribute name="newsUrl" />', 600, 600)"><resource:newsAttribute name="displayTitle" /></a></td>
								<td class="tableRow"><resource:newsAttribute name="publisher" /></td>
								<td class="tableRow"><resource:newsAttribute name="statusStr" /></td>
								<td class="tableRow"><resource:newsAttribute name="lastUpdate" /></td>
							</tr>
							</common:items>
						</table>
						<span style="font-size: 1px">&nbsp;<br />
						</span>
						<table width="100%" class="tableBorder" cellpadding="0" cellspacing="2">
						   	<tr>
					           <td align="right">
					               <table cellspacing="0" cellpadding="0">
					                   <tr>
					                       <td noWrap align="right">
											<span class="columnText"><common:summaryForm /></span></td>
					                       <td><common:firstForm action="<%=actionUrl%>">
					                       	<input class="button2w" style="width: 50px;" type="submit" value="最前" />
					                           </common:firstForm></td>
					                       <td><common:prevForm action="<%=actionUrl%>">
											<input class="button2w" style="width: 50px;" type="submit" value="前页" />
					                           </common:prevForm></td>
					                       <td><common:nextForm action="<%=actionUrl%>">
											<input class="button2w" style="width: 50px;" type="submit" value="下页" />
					                           </common:nextForm></td>
					                       <td><common:lastForm action="<%=actionUrl%>">
											<input class="button2w" style="width: 50px;" type="submit" value="最后" />
					                           </common:lastForm></td>
					                   </tr>
					               </table>
					           </td>
					       </tr>
					   </table>
						</resource:newsList>
						<span style="font-size: 3px">&nbsp;<br />
						</span>
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td><input type="button" name="ButtonCreate" value="新建" class="button2w" onclick="return buttonCreate_onclick()" /><input type="button" name="ButtonUpdate" value="编辑" class="button2w" onclick="return buttonUpdate_onclick()" /><input type="button" name="ButtonDelete" value="删除" class="button2w" onclick="return buttonDelete_onclick()" /></td>
								<td align="right"><input type="checkbox" name="CheckActiveOnly" id="CheckActiveOnly" <%=isActiveOnly ? "checked" : ""%> onclick="return checkActiveOnly_onclick()" language="javascript" /><label for="CheckActiveOnly">仅显示有效目录</label></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" style="BORDER-TOP: #999999 1px solid">
		<table align="center" style="height: 50px" width="100%">
			<tr>
				<td><jsp:include page="../common/copyright_inc.jsp" flush="true"/></td>
			</tr>
		</table></td>
	<tr>
</table>
</body></html>

⌨️ 快捷键说明

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