%@page import="java.net.URLEncoder"%>
<%@page contentType="text/html;charset=UTF-8" %>
<%@page import="com.hanweb.taglib.listview.ListTable"%>
<%@page import="jcms.extramodule.comment.VotingFun" %>
<%@page import="jcms.blf.module.voting.Jcms_Voting_KindBLF" %>
<%@page import="java.util.*"%>
<%@page import="jcms.sys.SysInfo"%>
<%@page import="com.hanweb.common.util.Convert" %>
<%@page import="jcms.entity.module.Jcms_Voting_ListEntity"%>
<%@page import="jcms.entity.module.Jcms_Voting_KindEntity"%>
<%@page import="jcms.util.AccessUtil"%>
<%@include file="./config.jsp" %>
<%
if(!AccessUtil.checkAccess(request)){ //阻止跨站点请求伪造
out.print(Convert.getAlterScript("location.href='../../';"));
return;
}
int tempWebId = Convert.getParameterInt(request,"webid",0);
if(tempWebId > 0)
strWebID = ""+tempWebId;
//调用方式:是嵌入在单元中显示 yes;通过URL直接调用 no
String strInlay = Convert.getParameter(request, "inlay","yes",true,true);
String strM = Convert.getParameter(request,"m","",true,true);
String strPath = VotingFun.getPath(application.getRealPath(""), strAppID,strWebID );
//得到调查类别的ID
int kindid = 0;
//调查类型 strScope=0 为当前调查 strScope = 1 为往期调查
int iscope = Convert.getParameterInt(request,"scope",-1);
//页码的hidden值
String strHidden = "\n"
+ " \n"
+ ""
+ "" ;
//当前页
int nCurrent = Convert.getParameterInt(request,"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 = Convert.getValue(strPageCount);
pageNum = "".equals(strPageCount) ? 10 : Convert.getStringValueInt(strPageCount);
String strScript = xmlFile.getContent( "columlist", strUnitPath ); // 更多的script
strScript =Convert.getValue(strScript);
String strwebtype = xmlFile.getContent( "webtype", strConfigPath ); // 1 制作端; 2 web服务器端
strwebtype = Convert.getValue(strwebtype);
String strWebServerName = xmlFile.getContent( "web_in_servername", strConfigPath );
strWebServerName = Convert.getValue(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 = new Jcms_Voting_KindBLF(strAppID, 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";
//}
//else if(nScope==1){
// strLabel = "截至: "+strEndtime;
// strKindName = "" +strKindName+ "";
//}
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 = Convert.replaceString( strContent,"",strMoreUrl);
strContent = Convert.replaceString( strContent,"",strDepiction);
strContent = Convert.replaceString( strContent,"","");
/* 分页代码 */
ListTable listtable = new ListTable(request);
String strPages = listtable.getPages( "./que_normalvotinglist.jsp",totalNum,pageNum,nCurrent,"",strHidden); // 分页代码
strContent += "
"+strPages;
String strModal = "";
strModal = VotingFun.getModal( strWebID, strAppID, application.getRealPath(""), strwebtype, strWebServerName );
strModal = Convert.getValue(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 = Convert.replaceString(strContent,"\n","");
strContent = Convert.replaceString(strContent,"\r","");
if(sbContent.length() > 0)
sbContent.delete(0,sbContent.length());
out.println( strContent );
%>