<%@ 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 NODE_ID = ParamUtil.getStrParam(request,"NODE_ID","root");

/***********************************
* 显示特性参数初始化
***********************************/
//每行的高度
String ROW_HEIGHT = ParamUtil.getStrParam(request,"ROW_HEIGHT","22"); 

//是否显示：今日访问量
boolean IS_SHOW_SITE_TODAY_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SITE_TODAY_COUNTER","true");

//是否显示：总访问量
boolean IS_SHOW_SITE_TOTAL_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SITE_TOTAL_COUNTER","true");

//是否显示：平均访问量
boolean IS_SHOW_SITE_AVG_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SITE_AVG_COUNTER","true"); 

//是否显示：月访问量
boolean IS_SHOW_SITE_MONTH_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SITE_MONTH_COUNTER","true"); 

//是否显示：开始统计日期（网站成立日期）
boolean IS_SHOW_BEGIN_STAT_DATE = ParamUtil.getBooleanParam(request,"IS_SHOW_BEGIN_STAT_DATE","true"); 

//是否显示：文章总数
boolean IS_SHOW_ARTICLE_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_ARTICLE_COUNTER","true");

//是否显示：专题总数
boolean IS_SHOW_SPECIAL_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SPECIAL_COUNTER","true"); 

//是否显示：专题文章数
boolean IS_SHOW_SPECIAL_ARTICLE_COUNTER = ParamUtil.getBooleanParam(request,"IS_SHOW_SPECIAL_ARTICLE_COUNTER","true"); 

/***********************************
* CSS样式 参数初始化
***********************************/
//标题样式
String TITLE_CSS = ParamUtil.getStrParam(request,"TITLE_CSS","").trim().toLowerCase(); 

//统计数样式
String STAT_CSS = ParamUtil.getStrParam(request,"STAT_CSS","").trim().toLowerCase();

%>


<cms4j:stat node_id="<%=NODE_ID%>">
<table width="100%"  border="0" cellpadding="0" cellspacing="0">

<% if(IS_SHOW_SITE_TODAY_COUNTER) { %>
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">今日访问:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getDAY_COUNT()%> 人</td>
  </tr>
<% } %>

<% if(IS_SHOW_SITE_TOTAL_COUNTER) { %>
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">总访问量:</td>
    <td width="46%" height="22" class="<%=STAT_CSS%>"><%=stat_info.getSITE_COUNT()%> 人</td>
  </tr>
<% } %>

<% if(IS_SHOW_SITE_AVG_COUNTER) { %>  
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">平均日访量:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getAVG_COUNT()%> 人</td>
  </tr>
<% } %>

<% if(IS_SHOW_SITE_MONTH_COUNTER) { %>
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">本月访量:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getMONTH_COUNT()%> 人</td>
  </tr>
<% } %>

<% if(IS_SHOW_BEGIN_STAT_DATE) { %>  
  <tr>
    <td width="54%" align="left" class="<%=TITLE_CSS%>">网站运行日期:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getBEGIN_STAT_DATE()%></td>
  </tr>
<% } %>

<% if(IS_SHOW_ARTICLE_COUNTER) { %>  
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">文章总数:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getARTICLE_COUNT()%> 篇</td>
  </tr>
<% } %>

<% if(IS_SHOW_SPECIAL_COUNTER) { %>  
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">专题总数:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getSPECIAL_COUNT()%> 个</td>
  </tr>
<% } %>

<% if(IS_SHOW_SPECIAL_ARTICLE_COUNTER) { %>  
  <tr>
    <td height="22" align="left" class="<%=TITLE_CSS%>">专题内文章数:</td>
    <td height="22" class="<%=STAT_CSS%>"><%=stat_info.getSPECIAL_ARTICLE_COUNT()%> 篇</td>
  </tr>
<% } %> 
</table>
</cms4j:stat>
