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

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


<%
//当前站点的发布上下文(虚拟目录）
String CONTEXT_PATH = cn.com.dekn.cms.syscfg.vo.SiteConfig.getInstance().getCONTEXT_PATH();

//默认的文章显示页,下面会从配置信息中取
String DEF_ARTICLE_SHOW_PATH = "";

//网站群节点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());
}
%>

<cms4j:site_config node_id="<%=NODE_ID%>">
<% DEF_ARTICLE_SHOW_PATH = siteconfig_info.getARTICLE_VIEW_TEMPLET_PATH(); %>
</cms4j:site_config>


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

//过滤属性
String FILTER = 		ParamUtil.getStrParam(request,"FILTER","summary_image");

//过滤属性2
String FILTER2 = 		ParamUtil.getStrParam(request,"FILTER2","");

//排序属性
String ORDER = 			ParamUtil.getStrParam(request,"ORDER","");

//显示哪一个专题
String SPECIAL_ID = 	ParamUtil.getStrParam(request,"SPECIAL_ID",""); 

//栏目的状态(默认显示状态为USE的)
String CLASS_STATE = 	ParamUtil.getStrParam(request,"CLASS_STATE","use");

//栏目的显示方式（all 为显示所有； show 为显示“在导航中显示的” hidden为显示“在导航中不显示的”
String CLASS_SHOW = 	ParamUtil.getStrParam(request,"CLASS_SHOW","all");

//排除
String EXCLUDE = 		ParamUtil.getStrParam(request,"EXCLUDE","");

//排除2
String EXCLUDE2 = 		ParamUtil.getStrParam(request,"EXCLUDE2","");

//指定显示第几页的数据
int PN = 				ParamUtil.getIntParam(request,"PN",0);

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

//文章日期范围（all 显示所有；now 显示文章所设置的日期范围内； expire 显示过期的；notbegin 显示未开始的
String DATE = ParamUtil.getStrParam(request,"DATE","now");


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

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

//显示文章的默认页面
String SHOW_ARTICLE_PAGE = ParamUtil.getStrParam(request,"SHOW_ARTICLE_PAGE",DEF_ARTICLE_SHOW_PATH);

//图像宽度
int IMG_WIDTH =  ParamUtil.getIntParam(request,"IMG_WIDTH",490);

//图像高度
int IMG_HEIGHT =  ParamUtil.getIntParam(request,"IMG_HEIGHT",190);

//图片展播控件
String PPT_OBJECT =  ParamUtil.getStrParam(request,"PPT_OBJECT",CONTEXT_PATH + "/images/ppt_img_2.swf");

/***********************************
* 其它处理
***********************************/
//最终显示图片的URL
String imgURL = "";

%>


<script src="<%=CONTEXT_PATH%>/js/ppt_img_2.js" type=text/javascript></script>
<div id="sasFlashFocus3"></div>
<script type="text/javascript">
	<!--
	var varText = ""
	function addInfo(title,photourl,link){
		if(varText!=""){
			varText+="|||";
		}
		varText+=title+"|_|"+photourl+"|_|"+link;
	}
	
	<cms4j:article page_size="<%=PAGE_SIZE%>" class_id="<%=CLASS_ID%>" filter="<%=FILTER%>" filter2="<%=FILTER2%>" order="<%=ORDER%>" special_id="<%=SPECIAL_ID%>" node_id="<%=NODE_ID%>"  class_state="<%=CLASS_STATE%>" class_show="<%=CLASS_SHOW%>" date="<%=DATE%>" exclude="<%=EXCLUDE%>" exclude2="<%=EXCLUDE2%>" pn="<%=PN%>">
		<cms4j:article_list>
		<%
			//首页摘要图片,summary_image
			//文章摘要图片,article_image
			//栏目摘要图片1,class_image_1
			//栏目摘要图片2,class_image_2
			//栏目摘要图片3,class_image_3
			if(FILTER.equalsIgnoreCase("summary_image")){
				imgURL = article_info.getHOMEPAGE_IMAGE();
			}else if(FILTER.equalsIgnoreCase("article_image")){
				imgURL = article_info.getARTICLE_IMAGE();
			}else if(FILTER.equalsIgnoreCase("class_image_1")){
				imgURL = article_info.getCLASS_IMAGE_1();
			}else if(FILTER.equalsIgnoreCase("class_image_2")){
				imgURL = article_info.getCLASS_IMAGE_2();
			}else if(FILTER.equalsIgnoreCase("class_image_3")){
				imgURL = article_info.getCLASS_IMAGE_3();
			}else{
				imgURL = article_info.getHOMEPAGE_IMAGE();
			}
		%>
		addInfo("<%=article_info.getTITLE(TITLE_LENGTH,TITLE_OUT_STR,"","","",false)%>","<%=imgURL%>","<%=article_info.getURL(SHOW_ARTICLE_PAGE,CLUSTER_URL_PARAM)%>");
		</cms4j:article_list>
	</cms4j:article>	
			

	var flash_ppt_img_2 = new sohuFlash("<%=PPT_OBJECT%>", "sasFlashFocus3", <%=IMG_WIDTH%>, <%=IMG_HEIGHT%>, "8");
	flash_ppt_img_2.addParam("quality", "high");
	flash_ppt_img_2.addParam("wmode", "transparent");
	flash_ppt_img_2.addVariable("info",varText);
	flash_ppt_img_2.write("sasFlashFocus3");
	//-->
</script>
	  
	  
