📄 news.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.doone.uurm.*" %>
<%@ page import="com.doone.fj1w.bbs.BBSAuth"%>
<%@ page import="com.doone.util.FileLogger"%>
<%@ page import="com.doone.data.*"%>
<%request.setCharacterEncoding("GBK");%>
<%
String sPurvICode = request.getParameter("code");
String sType = request.getParameter("type");
if ( sPurvICode == null || sPurvICode.length() == 0 ) {
sPurvICode = "BBS";
}
WebAuth auth = WebAuth.getInstance(request);
String cityCode =auth.getCityCode();
if (cityCode==null){
cityCode = "0590";}
boolean hasPurv = auth.CheckPurv(sPurvICode);
if ( ! auth.IsAuthed() ) {
out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
return;
}
//else if ( ! hasPurv ) {
// out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
// return;
//}
long parentId = Sys_Purview.getPurviewIdByCode(sPurvICode);
String sName = "";
if (sType!=null&&sType.equals("1")) {
sName = "最新动态";}
else{
sName = "优惠政策";}
boolean loadMenu = true;
try {
Sys_Purview purview = Sys_Purview.getPurviewByID(new DacClient(), parentId);
if ( sPurvICode.length() > 6 ) loadMenu = false;
}
catch(Exception ex) {
FileLogger.getLogger().warn(ex.getMessage(),ex);
}
%>
<html>
<head>
<title><%=sName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../common/style/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../../common/script/ChangeStyle.js"></script>
<script language="JavaScript" src="../../common/mainTool.js"></script>
<script language="JavaScript" src="../../common/XMLHttpClient.js"></script>
<script language="JavaScript">
<!--
var menuIdStr = "";
var menuTitle = "<%= sName%>";
var menuService = "BBSClientService";
var menuMethod = "getBoardTree";
var menuIndex = -1;
function boardTreeReload(id) {
if ( menuIndex != -1 ) {
return _menuReload(menuIndex, id);
}
return false;
}
function fn_onload() {
try {
if ( self.parent != self && BBSList != null) {
if ( parent.bottom == null ) {
document.location.replace("index.jsp?<%=request.getQueryString()%>");
return false;
}
else if ( parent.bottom.document.location.href == "about:blank" || BBSList.selectedIndex == -1 ) {
var parentElt = parent.document.all.tags("FRAMESET");
if ( parentElt.length == 1 ) {
parentElt[0].rows = "100%,0";
}
var parentElt = parent.document.all.tags("frame");
for ( i = 0 ; i < parentElt.length; i++ ) {
if ( parentElt[i].name == "bottom" ) {
// parentElt[i].noResize = true;
}
}
}
}
}
catch(ex) {}
// window.setTimeout("cltScript_Toolbar();",30);
iBtnEnabled("100011");
}
// function cltScript_Toolbar() {
// if ( self.parent != self ){
// var pel = parent.document.all.tags("frame");
// for ( i=0; i< pel.length; i++)
// {
// if ( pel(i).name == "main") {
// divTop.style.width = pel(i).width;
// divMain.style.width = pel(i).width;
// divMain.style.height = pel(i).height - divTop.clientHeight;
// }
// }
// }
// }
function CheckAll(form){
var inputs = form.all.tags("input");
var src = event.srcElement;
for (var i=0;i<inputs.length;i++){
e = inputs[i];
if(e.type == 'checkbox' && e.name == 'STAFFID'){
e.checked = src.checked;
var oTr = e.parentElement.parentElement;
oTr.style.backgroundColor = e.checked ? '#C8E6E6' : 'white';
}
}
if ( src.checked ) {
iBtnEnabled("11110011");
}
else {
iBtnEnabled("10100001");
}
}
function fSelectOne(obj)
{
document.getElementById("chkall_text").checked = false;
return false;
}
function onChoosed() {
if ( BBSList == undefined ) return false;
try {
if ( BBSList.selectedRow != null ) {
var oTr = BBSList.selectedRow;
var keyValue = oTr.getAttribute("key");
var vText = BBSList.selectedRow.cells[0].innerText;
window.opener.document.getElementById("LTITLE").value=vText;
window.opener.document.getElementById("LINK").value=keyValue;
window.opener.document.getElementById("CONTENTTYPE").value='4';
window.close();
}
}
catch(ex){}
}
function fn_dblClick() {
if ( BBSList == undefined ) return false;
try {
if ( BBSList.selectedRow != null ) {
var oTr = BBSList.selectedRow;
var keyValue = oTr.getAttribute("key");
var vText = BBSList.selectedRow.cells[0].innerText;
window.opener.document.getElementById("LTITLE").value=vText;
window.opener.document.getElementById("LINK").value=keyValue;
window.opener.document.getElementById("CONTENTTYPE").value='4';
window.close();
}
}
catch(ex){}
}
function onContentLoad() {
try {
var srcEl = event.srcElement;
// 分页处理
if ( pageSet != undefined ) {
var iPageCount = srcEl.pageCount;
var iCurrentPage = srcEl.currentPage;
var str = "";
for ( var i=0; i< iPageCount; i++ ) {
if ( iCurrentPage == i ) {
str += "<a href='#' style='color: white; font-weight: bold; font-size: 10pt;' onclick='switchPage(this,"+i+");'>";
str += "<B>" + i + "</B>";
}
else {
str += "<a href='#' style='color: white;' onclick='switchPage(this,"+i+");'>";
str += i;
}
str += "</a> ";
}
pageSet.innerHTML = str;
}
}
catch(exception) {
alert(exception.description);
return false;
}
}
var oldLinka = null;
function switchPage(that, idx){
if ( that.tagName == "A" ) {
document.getElementById("BBSList").currentPage=idx;
if ( oldLinka == null ) {
oldLinka = pageSet.children(0);
}
oldLinka.style.fontWeight = "normal";
oldLinka.style.fontSize = "9pt";
that.style.fontWeight = "bold";
that.style.fontSize = "10pt";
oldLinka = that;
}
}
function iBtnEnabled(eBtns) {
try{
var iBtns = ibtnPanel.rows(0).cells;
for (var i=0; i<iBtns.length; i++) {
if ( i >= eBtns.length ) continue;
var idx = parseInt( eBtns.substr(i,1) );
if ( idx == NaN ) idx = 0;
if (idx < 1 ) {
iBtns[i].Enabled = false;
}
else {
iBtns[i].Enabled = true;
}
} <%
// 要添加权限方面的控制,能够屏蔽某些人的添加、修改、删除权限。
try {
BBSAuth bbsAuth = BBSAuth.getInstance(auth, sPurvICode);
if ( ! bbsAuth.hasManagerPurview() ) {
// 如果没有管理权,则分别检查各个权限。
if ( ! bbsAuth.hasAddPurview() ) {
out.print("\nibtnAddContent.Enabled = false;");
}
if ( ! bbsAuth.hasDelPurview() ) {
out.print("\nibtnDelContent.Enabled = false;");
}
if ( ! bbsAuth.hasReplyPurview() ) {
out.print("\nibtnReplyContent.Enabled = false;");
}
}
}
catch(Exception ex) {
FileLogger.getLogger().warn(ex.getMessage(),ex);
}
%>
}
catch(exception){}
}
function fnToolAddContent() {
var sURL = "newContent.jsp?pid=<%= parentId%>";
windowOpen(sURL,800,600,"BBS")
}
function fnToolDelContent() {
try {
var srcURL = "";
for ( var i=0; i < BBSList.selectedAllIndexs.length; i++) {
var oTr = BBSList.rows[BBSList.selectedAllIndexs[i]];
var keyValue = oTr.getAttribute("key");
if ( keyValue != null ) {
if ( srcURL == "" ) {
srcURL = "DelContent.jsp?id=" + keyValue;
}
else {
srcURL += "&id=" + keyValue;
}
}
}
if ( srcURL != "" ) {
windowOpen(srcURL,500,400,"BBS");
}
}
catch(exception){}
}
function fnToolFilter() {
}
function fnToolFind() {
}
-->
</script>
</head>
<body onload="fn_onload();" style="margin: 0px;" scroll="yes">
<form id="Default" method="post" action="list.jsp">
<div onresize="cltScript_Toolbar();" style="width: 100%">
<div id="divTop" style="overflow: hidden">
</div>
<div id="divMain" style="overflow: auto">
<input type="hidden" id="parentID" name="parentID" value="<%= parentId%>"/>
<input id="txtSearchText" type="hidden" name="txtSearchText">
<table style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
cellpadding="0" width="100%" border="0" class="OuterTable">
<tr class="OuterHead">
<TD class="title_td" align="center" width="30%"><b><%=sName%></b></TD>
</tr>
</table>
<table id="BBSList" border="0" width="100%" cellspacing="0"
cellpadding="1"
style="behavior:url(../../../common/table.htc)"
DefaultClass="DefaltRow"
keyName="key"
refresh = "true"
SelectedClass="SelectedRow"
multiple="true"
onselected="return onChoosed();"
ontableload="return onContentLoad();"
ondblclick="return fn_dblClick();"
serviceURL="<%= request.getContextPath() + "/XmlHttpService"%>"<%
String message = "没有任何记录信息。";
if ( hasPurv ) { %>
service="BBSClientService"
dataService="getNewContentList"
rcService="getNewContentCount" <%
}
else {
message = "您没有权限访问该模块。";
} %>
class="InnerTable">
<caption>
<input type="hidden" id="cityCode" name="cityCode" value="<%=cityCode%>"/>
<input type="hidden" id="sType" name="sType" value="<%=sType%>"/>
</caption>
<tr><td class="InnerHead"><%= message%></td></tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="OuterTable">
<tr class="OuterFoot">
<td align="left" class="foot_td" nowrap width="20%" style="display:none;">
<input type="checkbox" name="chkall_text" id="chkall_text" onclick="return CheckAll(this.form);"
title='选中/取消选中 本页所有人员' /><span id="ItemTitle">全选</span>
</td>
<td align="right" class="foot_td" nowrap width="80%">分页:<span id="pageSet"></span> </td>
</tr>
</table>
</div>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -