<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/cms4j" prefix="cms4j" %>
<%@ page import = "cn.com.dekn.cms.util.*,cn.com.dekn.common.util.*" %>
<%
//网站群节点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());
}
%>
<% 
/***********************************
* TAG参数初始化
***********************************/
//默认照片显示页
String DEF_PHOTO_SHOW_PATH = "ShowAlbumPhoto.jsp";
//要显示栏目的ID
String CLASS_ID = ParamUtil.getStrParam(request,"CLASS_ID",""); 
//过滤属性
String FILTER = ParamUtil.getStrParam(request,"FILTER",""); 
//排序属性
String ORDER = ParamUtil.getStrParam(request,"ORDER",""); 
//指定显示哪一篇相册
String PHOTO_ID = ParamUtil.getStrParam(request,"PHOTO_ID",""); 
//栏目的状态(默认显示状态为USE的)
String CLASS_STATE = 	ParamUtil.getStrParam(request,"CLASS_STATE","use");
/***********************************
* 显示特性参数初始化
***********************************/
//标题长度
int TITLE_LENGTH = ParamUtil.getIntParam(request,"TITLE_LENGTH",8);
//标题长度超出时显示的字符
String TITLE_OUT_STR = ParamUtil.getStrParam(request,"TITLE_OUT_STR","..");
//列数
int COLUMN_COUNT = ParamUtil.getIntParam(request,"COLUMN_COUNT",5); 
//行数
int PAGE_SIZE = ParamUtil.getIntParam(request,"PAGE_SIZE",20); 
//当前页
int PAGE_NUMBER = ParamUtil.getIntParam(request,"PAGE_NUMBER",-1);
//每行的高度
String ROW_HEIGHT = ParamUtil.getStrParam(request,"ROW_HEIGHT","32");
//照片宽度
String PHOTO_WIDTH = ParamUtil.getStrParam(request,"PHOTO_WIDTH","120");
//照片高度
String PHOTO_HEIGHT = ParamUtil.getStrParam(request,"PHOTO_HEIGHT","100");
//打开方式　与html中<a>的target属性相同
String TARGET = ParamUtil.getStrParam(request,"TARGET","");
//显示相册的默认页面
String SHOW_PHOTO_PAGE = ParamUtil.getStrParam(request,"SHOW_PHOTO_PAGE",DEF_PHOTO_SHOW_PATH);
//照片查询类别
String SEARCH_TYPE = ParamUtil.getStrParam(request,"SEARCH_TYPE","");
//照片查询关键字
String SEARCH = ParamUtil.getStrParam(request,"SEARCH","");
/***********************************
* 元素隐显参数初始化
***********************************/
//是否查看翻页
boolean IS_SHOW_PAGE = ParamUtil.getBooleanParam(request,"IS_SHOW_PAGE","false");
//是否显示图片标题
boolean IS_SHOW_TITLE = ParamUtil.getBooleanParam(request,"IS_SHOW_TITLE","false");
/***********************************
* CSS样式 参数初始化
***********************************/
//CSS样式
String CSS_TITLE = ParamUtil.getStrParam(request,"CSS_TITLE","");
String CSS_PHOTO = ParamUtil.getStrParam(request,"CSS_PHOTO","");
%>
<cms4j:class show="all" id="<%=CLASS_ID%>"> 
		<!--开始显示相册  CMS4J-->
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<% int rowPicCount = COLUMN_COUNT,i = 0,j=0; %>
		<cms4j:album_photo class_id="<%=CLASS_ID%>" page_size="<%=PAGE_SIZE%>" order="<%=ORDER%>" pn="<%=PAGE_NUMBER%>" search_type="<%=SEARCH_TYPE%>" search="<%=SEARCH%>" class_state="<%=CLASS_STATE%>">
		<cms4j:album_photo_list>

		<% if (i%rowPicCount == 0){ %>
		  <% j=i; %>
		  <tr>
		<% } %> 
		<td colspan="4" align="center">
			<table width="96%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="center">
						<a href="<%=DEF_PHOTO_SHOW_PATH%>?photoID=<%=photo_info.getALBUM_PHOTO_ID()%>" target="<%=TARGET%>"><img src="<%=photo_info.getURL()%>" alt="<%=photo_info.getINTRO()%>" name="AlbumPhoto" width="<%=PHOTO_WIDTH%>" height="<%=PHOTO_HEIGHT%>" border="0" class="<%=CSS_PHOTO%>"></a>
					</td>
				</tr>
				<% if(IS_SHOW_TITLE){ %>
					<tr>
					  <td align="center" title="<%=photo_info.getINTRO()%>" class="<%=CSS_TITLE%>" height="<%=ROW_HEIGHT%>"><%=photo_info.getNAME(TITLE_LENGTH,TITLE_OUT_STR)%></td>
					</tr>
				<% } %>
			</table>
		</td>
		<% if (i==j+rowPicCount){ %>
		  </tr>
		<% 
		   } 
		   i++; 
		%>
		</cms4j:album_photo_list>
		</cms4j:album_photo>
	  </table>
	  <!--相册显示结束  CMS4J-->
	<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>
</cms4j:class>
