<%@page contentType="text/html;charset=UTF-8"%> <%@page import="com.hanweb.taglib.listview.ListTable"%> <%@page import="com.hanweb.common.util.Convert"%> <%@page import="jcms.blf.module.idea.IdeaTagParse"%> <%@page import="freemarker.cache.StrongCacheStorage"%> <% //获取webid int webId = Convert.getParameterInt(request, "webid", 1); //获取appId int nUid = Convert.getParameterInt(request, "uid", 0); String strAppID = "1"; //外挂路径 String strSysPath = application.getRealPath("").replaceAll("\\\\", "/"); String strPath = strSysPath + "/jcms_files/jcms" + strAppID + "/web" + webId + "/site/"; String strConfPath = strPath+ "/module/idea/config/"; String strColumnConf = strConfPath + "idea_unit_" + nUid+ ".xml"; String strwebtype = Convert.getValue(xmlFile.getContent("webtype", strConfPath + "config.xml")); String strAppPath = Convert.getValue(xmlFile.getContent("web_in_servername", strConfPath + "config.xml")); String strModulePath = "/" + strAppPath + "/jcms_files/jcms" + strAppID + "/web" + webId + "/site/module/idea/"; //获取参数 int typeId = 0; //类别ID String strShowType = ""; //当期:now;往期:history;所有:all String strCtScript = ""; //效果源码 String strFilePath = strPath + "module/idea/config/idea_unit_" + nUid + ".xml"; //xml文件路径 int iCount = 0; //记录总数 int iTitleSize = 0; //标题字数 int iOpinionCount = 0; //显示意见条数 int iOpinionTitleSize = 0; //显示意见字数 String strOpinionScript = ""; //意见效果源码 String strIsShowOpinion = "false"; //是否显示意见 if(nUid > 0) { /*取得配置*/ typeId = Convert.getStringValueInt(xmlFile.getContent("typeid", strColumnConf), 0); strShowType = xmlFile.getContent("showtype", strColumnConf); strCtScript = xmlFile.getContent("ctscript", strColumnConf); strIsShowOpinion = xmlFile.getContent("isshowopinion", strColumnConf); iCount = Convert.getStringValueInt(xmlFile.getContent("count", strFilePath), 0); iTitleSize = Convert.getStringValueInt(xmlFile.getContent("titlesize", strFilePath), 0); iOpinionCount = Convert.getStringValueInt(xmlFile.getContent("opinioncount", strFilePath), 0); iOpinionTitleSize = Convert.getStringValueInt(xmlFile.getContent("opiniontitlesize", strFilePath), 0); strCtScript = xmlFile.getContent("ctscript", strFilePath); strOpinionScript = xmlFile.getContent("opscript", strFilePath); } else { out.println(sys.getAlert(request, "单元不存在!")); return; } /* WEB端过滤 /jcms/jcms_files/../site */ if("2".equals(strwebtype)) { strModulePath = "/module/idea/"; } //输出结果 StringBuffer strContent = new StringBuffer(); IdeaTagParse indUnit = new IdeaTagParse(String.valueOf(webId),strAppID); //当前页面 String strMore = "更多"; //初始化数据 indUnit.setData("1", //列数 Integer.toString(iCount), //行数 strCtScript, //script代码 Integer.toString(iTitleSize), //标题的字数 Integer.toString(iOpinionCount), //显示意见条数 Integer.toString(iOpinionTitleSize), //意见标题字数 strOpinionScript, //意见标签 strMore //更多页面 ); if(iCount > 0){ strContent.append(indUnit.getIdeaLink(iCount, typeId,strShowType, strModulePath, strIsShowOpinion));//单元数据 } //当前页面 String strModule = "/module/idea/que_titlelink.jsp"; //输出结果 String strTableContent = strContent.toString(); strContent = strContent.delete(0,strContent.length()); strTableContent = (Convert.replaceString(strTableContent, "\"", "\\\\\"")); strContent.append(Convert.replaceString(strTableContent, "\n", "")); String strScript = "document.write(\"\");"; out.println(strScript); if(strContent != null && strContent.toString().length() != 0){ out.println("document.write(\""+ strContent.toString() +"\");"); } else{ out.println("document.write(\"议题列表为空\");"); } %>