%@page import="com.hanweb.jcms.entity.Jcms_WebinfomationEntity"%>
<%@page import="com.hanweb.jcms.service.website.Jcms_WebinfomationBLF"%>
<%@page import="com.hanweb.jcms.plugins.search.service.Jcms_SearchBLF"%>
<%@page import="com.hanweb.common.util.NumberUtil"%>
<%@page import="com.hanweb.common.util.StringUtil"%>
<%@page import="com.hanweb.common.util.mvc.Script"%>
<%@page import="java.net.URLEncoder"%>
<%@page contentType="text/html;charset=UTF-8" %>
<%@page import="com.hanweb.jcms.plugins.voting.service.VotingFun" %>
<%@page import="com.hanweb.jcms.plugins.voting.service.Jcms_Voting_KindBLF" %>
<%@page import="java.util.*"%>
<%@page import="com.hanweb.jcms.sys.service.SysInfo"%>
<%@page import="com.hanweb.jcms.plugins.voting.entity.Jcms_Voting_ListEntity"%>
<%@page import="com.hanweb.jcms.plugins.voting.entity.Jcms_Voting_KindEntity"%>
<%@page import="com.hanweb.jcms.util.AccessUtil"%>
<%@include file="./config.jsp" %>
<%
Script script = Script.getInstanceOnly();
if(!AccessUtil.checkAccess(request)){ //阻止跨站点请求伪造
out.print(script.addScript("location.href='../../';").getScript());
return;
}
int tempWebId = NumberUtil.getInt(request.getParameter("webid"),0);
if(tempWebId > 0){
strWebID = ""+tempWebId;
}
//调用方式:是嵌入在单元中显示 yes;通过URL直接调用 no
String strInlay = StringUtil.getSafeString(request.getParameter("inlay"));
if(StringUtil.equals(strInlay, "")){
strInlay = "yes";
}
String strM = StringUtil.getSafeString(request.getParameter("m"));
String strPath = VotingFun.getPath(application.getRealPath(""), strAppID, NumberUtil.getInt(strWebID));
//得到调查类别的ID
int kindid = 0;
//调查类型 strScope=0 为当前调查 strScope = 1 为往期调查
int iscope = NumberUtil.getInt(request.getParameter("scope"), -1);
//页码的hidden值
String strHidden = "\n"
+ " \n"
+ ""
+ "" ;
//当前页
int nCurrent = NumberUtil.getInt(request.getParameter("currpage"),1); // 当前页码
String strUnitPath = "";
strUnitPath = strPath + "config/initnormallist.xml";
String strConfigPath = strPath + "config/config.xml";
int pageNum = 10; // 每页显示记录数
String strPageCount = xmlFile.getContent( "pagelistnum", strUnitPath ); // 更多列表页显示的记录数
strPageCount = StringUtil.getString(strPageCount);
pageNum = "".equals(strPageCount) ? 10 : NumberUtil.getInt(strPageCount);
String strScript = xmlFile.getContent( "columlist", strUnitPath ); // 更多的script
strScript =StringUtil.getString(strScript);
String strwebtype = xmlFile.getContent( "webtype", strConfigPath ); // 1 制作端; 2 web服务器端
strwebtype = StringUtil.getString(strwebtype);
String strWebServerName = xmlFile.getContent( "web_in_servername", strConfigPath );
strWebServerName = StringUtil.getString(strWebServerName);
//系统路径
String strSysPath = "/";
if(strwebtype.equals("1")){
strSysPath = "/" + strWebServerName + "/jcms_files/jcms"+strAppID+"/web"+strWebID+"/site/";
}
if(strwebtype.equals("2")){
strSysPath = "/";
}
Jcms_Voting_KindBLF vBLF = Jcms_Voting_KindBLF.getInstance().init(strAppID, NumberUtil.getInt(strWebID));
ArrayList kindsEn = vBLF.getEntities(0,0,iscope);//一般调查的问题实体,第二个参数0表示是一般调查类型
String kindIds = "";
if(kindsEn!=null&&kindsEn.size()>0){
for(int i=0;i" );
int nEnd = strScript.indexOf( "" );
String strHead = "";
String strForTr = "";
String strEnd = "";
String strContent = "";
String strDisplay = "none";
if( nStart != -1 && nEnd != -1 && nEnd > nStart )
{
strHead = strScript.substring(0,nStart );
strForTr = strScript.substring( nStart+10,nEnd );
strEnd = strScript.substring( nEnd+11 );
}
String strMoreUrl = "";
String strUrl = "";
String strDepiction = "";
Vector v_label = new Vector(4);
v_label.add( "");
v_label.add( "" );
v_label.add( "" );
v_label.add( "" );
Vector v_value = new Vector(4);
StringBuffer sbContent = new StringBuffer();
String strLabel = "";
String strKindName = "";
String strEndtime = "";
int nScope = 0;
int seq = (nCurrent-1)*pageNum+1; // 问题的序号初始值
for( int i=0; i";
int queId = listEn.getI_id();
int scope = listEn.getI_sparefield();
strUrl = strSysPath + "module/voting/que_commondetail.jsp?classid="+listEn.getI_kindid()
+"&queid="+queId+"&scope="+scope+"&m=yes"+"&inlay="+URLEncoder.encode(strInlay,"UTF-8")+"&webid="+strWebID;
v_value.add( String.valueOf(seq+i) );
v_value.add( strUrl );
v_value.add( strKindName );
v_value.add( strLabel );
for( int j=0;j",strDisplay);
strContent = StringUtil.replace(strContent,"",strMoreUrl);
strContent = StringUtil.replace(strContent,"",strDepiction);
strContent = StringUtil.replace(strContent,"","");
/* 分页代码 */
Jcms_SearchBLF searchBlf = Jcms_SearchBLF.getInstance().init(strAppID,NumberUtil.getInt(strWebID));
Jcms_WebinfomationBLF webBlf = Jcms_WebinfomationBLF.getInstance();
Jcms_WebinfomationEntity webEn = webBlf.achieveWebEntity(NumberUtil.getInt(strWebID));
String strPages = searchBlf.getPaginationView("./que_normalvotinglist.jsp?inlay="+strInlay+"&m="+strM+"&scope="+iscope+"&webid="+strWebID,totalNum,pageNum,nCurrent,webEn);
strContent += "
"+strPages;
String strModal = "";
strModal = VotingFun.getModal(NumberUtil.getInt(strWebID), strAppID, application.getRealPath(""), strwebtype, strWebServerName );
strModal = StringUtil.getString(strModal);
if(strModal.length() > 0){
String strFrom1 = "";
int nPos1 = strModal.indexOf( strFrom1 );
int nPos2 = strModal.indexOf( strFrom2, nPos1 );
if( nPos1!=-1 && nPos2!=-1 && nPos2>nPos1 )
strContent = strModal.substring(0,nPos1) + strContent + strModal.substring( nPos2+strFrom2.length() );
}
strContent = StringUtil.replace(strContent,"\n","");
strContent = StringUtil.replace(strContent,"\r","");
if(sbContent.length() > 0){
sbContent.delete(0,sbContent.length());
}
out.println( strContent );
%>