<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/cms4j" prefix="cms4j" %>

<%@ page import = "cn.com.dekn.cms.util.*,cn.com.dekn.common.util.*" %>





<% 
/***********************************
* TAG参数初始化
***********************************/
//要显示栏目的ID
String CLASS_ID = ParamUtil.getStrParam(request,"CLASS_ID","1001");

//过滤属性	use：正在使用的　	stop：停用的
String FILTER = ParamUtil.getStrParam(request,"FILTER","use");

//类别：　text:文字  popwin:弹出窗口
String TYPE = ParamUtil.getStrParam(request,"TYPE","text");

//显示日期范围　now:当前	elapse:过期
String DATE = ParamUtil.getStrParam(request,"DATE","now");

//指定显示哪一篇通告
String ANNOUNCE_ID = ParamUtil.getStrParam(request,"ANNOUNCE_ID","");


/***********************************
* 显示特性参数初始化
***********************************/
//新闻标题长度
int TITLE_LENGTH = ParamUtil.getIntParam(request,"TITLE_LENGTH",24);

//标题长度超出时显示的字符
String TITLE_OUT_STR = ParamUtil.getStrParam(request,"TITLE_OUT_STR","..");

//行数
String PAGE_SIZE = ParamUtil.getStrParam(request,"PAGE_SIZE","10");

//每行的高度
String ROW_HEIGHT = ParamUtil.getStrParam(request,"PAGE_SIZE","22"); 

//“今日最新”图片地址
String IS_NEW_IMG = ParamUtil.getStrParam(request,"IS_NEW_IMG","images/new.gif");

//显示添加日期的格式
String ADD_DATE_FORMAT = ParamUtil.getStrParam(request,"ADD_DATE_FORMAT","MM-dd"); 

//打开方式　与html中<a>的target属性相同
String TARGET = ParamUtil.getStrParam(request,"TARGET","");

//网站群节点ID
String NODE_ID = ParamUtil.getStrParam(request,"NODE_ID","root"); 

//网站群节点参数
String CLUSTER_URL_PARAM = "";
if(null != request.getParameter("cluster_node_id")){
	CLUSTER_URL_PARAM = "cluster_node_id=" + cn.com.dekn.common.util.StrUtil.encodeHTML(request.getParameter("cluster_node_id").toString());
}

/***********************************
* 元素隐显 参数初始化
***********************************/
//是否显示添加日期列
boolean IS_SHOW_ADD_DATE_COLUMN = ParamUtil.getBooleanParam(request,"IS_SHOW_ADD_DATE_COLUMN","true");

//是否查看翻页
boolean IS_SHOW_PAGE = ParamUtil.getBooleanParam(request,"IS_SHOW_PAGE","false");


/***********************************
* CSS样式 参数初始化
***********************************/
//CSS样式
String CSS = ParamUtil.getStrParam(request,"CSS","page_class_content"); 


%>

<table width="100%"  border="0" cellpadding="0" cellspacing="0">
	<cms4j:announce class_id="<%=CLASS_ID%>" type="<%=TYPE%>" filter="<%=FILTER%>" date="<%=DATE%>"  id="<%=ANNOUNCE_ID%>" top="<%=PAGE_SIZE%>" node_id="<%=NODE_ID%>">
	  <tr class="<%=CSS%>">
		<td width="8%" height="<%=ROW_HEIGHT%>" align="center" valign="top"><img src="../../images/icon/article/COMMON.gif" width="10" height="18"></td>
		<td width="92%"><a href="ShowAnnounce.jsp?id=<%=announce.getID()%>&<%=CLUSTER_URL_PARAM%>" target="<%=TARGET%>"><%=announce.getTITLE(TITLE_LENGTH,TITLE_OUT_STR)%></a>
		<!--添加日期-->
		<%
			if (IS_SHOW_ADD_DATE_COLUMN){
				out.print(" " + announce.getADD_DATE_FORMATED(ADD_DATE_FORMAT,true,true,IS_NEW_IMG));
			}
		%>
		<!--结束：添加日期-->
		</td>
	  </tr>
	</cms4j:announce>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td align="right">
	
	<% if(IS_SHOW_PAGE) {%>
		<!--BEGIN: 翻页(条件控制)-->
		<jsp:include page="../page/page_1.jsp"/>
		<!--END: 翻页-->
	<% } %>
	
	</td>
  </tr>
</table>
