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

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


<% 
/***********************************
* TAG参数初始化
***********************************/
//指定显示哪一个专题
String SPECIAL_ID = ParamUtil.getStrParam(request,"SPECIAL_ID",""); 

//网站群节点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=" + StrUtil.encodeHTML(request.getParameter("cluster_node_id").toString());
}

/***********************************
* 显示特性参数初始化
***********************************/
//行数
int PAGE_SIZE = ParamUtil.getIntParam(request,"PAGE_SIZE",10); 

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

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


/***********************************
* 元素隐显参数初始化
***********************************/
//是否显示文章数
boolean IS_SHOW_ARTICLE_NUM = ParamUtil.getBooleanParam(request,"IS_SHOW_ARTICLE_NUM","true"); 

//是否显示文章点击数
boolean IS_SHOW_ARTICLE_CLICK_NUM = ParamUtil.getBooleanParam(request,"IS_SHOW_ARTICLE_CLICK_NUM","true"); 

//是否显示表格的标题行
boolean IS_SHOW_TITLE_BAR = ParamUtil.getBooleanParam(request,"IS_SHOW_TITLE_BAR","true");

/***********************************
* CSS样式 参数初始化
***********************************/
//CSS样式：表格边框
String CSS_TABLE_BORDER = ParamUtil.getStrParam(request,"CSS_TABLE_BORDER","table_border_bg"); 

//CSS样式：表格单元格
String CSS_TABLE_CELL =  ParamUtil.getStrParam(request,"CSS_TABLE_CELL","table_border_cell_bg"); 


%>

<table width="100%" border="0" cellpadding="0" cellspacing="1" class="<%=CSS_TABLE_BORDER%>">
  
	<%if (IS_SHOW_TITLE_BAR) {%>
		<!--专题信息表列名称栏（条件控制）-->
		<tr bgcolor="#efefef" class="<%=CSS_TABLE_CELL%>">
			<td width="59%" height="<%=ROW_HEIGHT%>" align="left">专题名称</td>
			
			<% if (IS_SHOW_ARTICLE_NUM) {%>
			<td width="21%" align="center" title="文章数">文章</td>
			<% } %>
			
			<% if (IS_SHOW_ARTICLE_CLICK_NUM) {%>
			<td width="20%" align="center" title="文章点击数">点击</td>
			<% } %>
		</tr>
	<% } %>
	<!--BEGIN: 显示专题-->
	<cms4j:article_special state="all" page_size="<%=PAGE_SIZE%>" id="<%=SPECIAL_ID%>" node_id="<%=NODE_ID%>">
	  <tr  title="<%=special.getREMARK()%>">
		<td width="59%" height="<%=ROW_HEIGHT%>" align="left"><a href="ShowSpecial.jsp?special_id=<%=special.getSPECIAL_ID()%>&<%=CLUSTER_URL_PARAM%>" target="<%=TARGET%>"><%=special.getNAME()%></a> </td>
		
		<% if (IS_SHOW_ARTICLE_NUM) {%>
		<td width="21%" align="center" title="文章数">[<%=special.getArticleCount()%>]</td>
		<% } %>
		
		<% if (IS_SHOW_ARTICLE_CLICK_NUM) {%>
		<td width="20%" align="center" title="文章点击数">[<%=special.getArticleClickCount()%>]</td>
		<% } %>
	</tr>
	</cms4j:article_special>
	<!--END: 显示专题-->
</table>