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

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

<script src="../../js/validator.js"></script>


<% 
/***********************************
* TAG参数初始化
***********************************/

//指定显示哪一个专题
String VOTE_ID = StrUtil.getNotNullStringValue(request.getParameter("VOTE_ID"),""); 

//专题过滤器
String FILTER = StrUtil.getNotNullStringValue(request.getParameter("FILTER"),"selected"); 

//网站群节点ID
String NODE_ID = StrUtil.getNotNullStringValue(request.getParameter("NODE_ID"),"root");

//网站群节点参数
String CLUSTER_URL_PARAM = "";
if(null != request.getParameter("cluster_node_id")){
	CLUSTER_URL_PARAM = "cluster_node_id=" + request.getParameter("cluster_node_id");
}


//系统模板路径
String CONTEXT_PATH = cn.com.dekn.cms.syscfg.vo.SiteConfig.getInstance(NODE_ID).getCONTEXT_PATH();
String TEMPLET_PATH = cn.com.dekn.cms.syscfg.vo.SiteConfig.getInstance(NODE_ID).getSITE_TEMPLET_PATH();

/***********************************
* 显示特性参数初始化
***********************************/
//标题长度
//int TITLE_LENGTH = StrUtil.getNotNullIntValue(request.getParameter("TITLE_LENGTH"),24);

//每行的高度
String ROW_HEIGHT = StrUtil.getNotNullStringValue(request.getParameter("ROW_HEIGHT"),"22");

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

//结果显示页
String RESULT_PAGE = CONTEXT_PATH + TEMPLET_PATH + "/" + StrUtil.getNotNullStringValue(request.getParameter("RESULT_PAGE"),"");

/***********************************
* CSS样式 参数初始化
***********************************/
//CSS样式：外面框架
String CSS = StrUtil.getNotNullStringValue(request.getParameter("CSS"),"page_class_content");
String CSS_ITEM = StrUtil.getNotNullStringValue(request.getParameter("CSS_ITEM"),"page_class_content");

%>

<cms4j:vote_list filter="<%=FILTER%>" id="<%=VOTE_ID%>"  node_id="<%=NODE_ID%>"> 

<form action="../../do?action=vote&id=<%=vote_info.getID()%>&<%=CLUSTER_URL_PARAM%>" method="post" name="jcmsFrom" id="jcmsFrom"  onSubmit="return Validator.Validate(this,1)" target="<%=TARGET%>">
<!--投票结果显示页-->
<input name="REDIRECT" type="hidden" value="<%=RESULT_PAGE%>?id=<%=vote_info.getID()%>">

<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <!--投票标题-->
  <tr class="<%=CSS%>">
    <td height="22" align="left" valign="top"><%=vote_info.getTITLE()%></td>
  </tr>
  <!--BEGIN: 显示投票项-->
  <cms4j:vote_select>	
  <tr class="<%=CSS_ITEM%>">
    <td height="22" align="left" valign="top"><%=voteselect_info.getVoteOption()%><%=voteselect_info.getSELECT()%></td>
    </tr>
  </cms4j:vote_select>	
  <!--END: 显示投票项-->
  
  <tr class="<%=CSS%>">
    <td height="22" align="center" valign="top"><input type="submit" name="Submit" value="投上一票">
	
       <input type="button" name="Submit2" value="查看结果" onclick="location.href='<%=RESULT_PAGE%>?id=<%=vote_info.getID()%>&<%=CLUSTER_URL_PARAM%>'"/></td></tr>
</table>
</form>
</cms4j:vote_list> 