<%@page contentType="text/html;charset=UTF-8"%> <%@page import="jcms.make.makepage.ModalFile"%> <%@page import="jcms.blf.webinfo.Jcms_WebinfomationBLF"%> <%@page import="java.io.File"%> <%@page import="com.hanweb.common.util.Convert"%> <%@page import="jcms.blf.module.sitesearch.Jcms_Sitesearch_ModalBLF"%> <%@page import="jcms.blf.module.Jcms_Extramodal_ModalBLF"%> <%@page import="jcms.make.makeunit.ExtraModuleUnit"%> <%@page import="jcms.entity.Jcms_ModalobjectunitEntity"%> <%@page import="jcms.blf.module.idea.IdeaTagParse"%> <% //获取appId String strAppID = "1"; //获取webid int nWebID = Convert.getParameterInt(request,"webid",1); //获取参数 int topicId = Convert.getParameterInt(request,"topicid"); int typeId = Convert.getParameterInt(request,"typeid"); //外挂路径 String strSysPath = application.getRealPath(""); String strPath = strSysPath + File.separator + "jcms_files" + File.separator + "jcms" + strAppID + File.separator + "web" + nWebID + File.separator + "site" + File.separator; String strModulePath = strPath + "module" + File.separator + "idea" + File.separator; //当前页码 int nCurrentPage = Convert.getParameterInt(request, "currpage", 1); //得到网站域名 String strDomain = Jcms_WebinfomationBLF.getWebDomain(strAppID,nWebID); Jcms_Extramodal_ModalBLF modal = new Jcms_Extramodal_ModalBLF( strAppID, nWebID); //得到模板实例的ID int nModalObjectID = modal.getModalObjectID("idea_content"+typeId); String strModal = ""; String strImgPath = ""; if (nModalObjectID > 0) { ModalFile mfile = new ModalFile(strAppID); mfile.setWebID(nWebID); mfile.setSysPath(strSysPath); java.util.Hashtable htReturn = mfile.getModalHTML(nModalObjectID); if (htReturn != null && htReturn.size() > 0) { strModal = htReturn.get("modalHTML").toString(); //模板文件 strImgPath = htReturn.get("imagePath").toString(); //图片路径 //copy模板图片 mfile.copyImageFile(strImgPath, strModulePath + "images" + File.separator, strModal); } } ExtraModuleUnit unit = new ExtraModuleUnit( strAppID,nWebID ); //检索结果的html String strFilePath = strPath + "module/idea/config/idea_content"+typeId+".xml"; String strPrint = xmlFile.getContent("vc_Print",strFilePath); String intPrintWay = xmlFile.getContent("i_PrintWay",strFilePath); String strRevert = xmlFile.getContent("vc_Revert",strFilePath); String intRevertWay = xmlFile.getContent("i_RevertWay",strFilePath); String intRow = xmlFile.getContent("i_Row",strFilePath); String ntScript = xmlFile.getContent("nt_Script",strFilePath); String intRevertWordCount = xmlFile.getContent("i_RevertWordCount",strFilePath); //得到每页显示的记录数 int nPageCount = Convert.getStringValueInt(intRow,10); //意见显示字数 int nWordCount = Convert.getStringValueInt(intRevertWordCount,20); //每页记录起始 int nMin = (nCurrentPage-1) * nPageCount + 1; int nMax = nCurrentPage * nPageCount +1; IdeaTagParse indUnit = new IdeaTagParse(String.valueOf(nWebID),strAppID); // 初始化数据 indUnit.setData( strPrint, //打印 Convert.getStringValueInt(intPrintWay), //打印图片按钮 strRevert, //发表意见 Convert.getStringValueInt(intRevertWay), //发表意见图片按钮 nPageCount, //每页意见显示数 ntScript, //显示代码 nWordCount //意见显示字数 ); String strContent = ""; indUnit.setTypeId(typeId); //回复表单 if(strContent.indexOf("")==-1) strContent += "
"; strContent = indUnit.getContent(topicId,nMin,nMax);//单元数据 /* 替换外网路径 */ if(!"".equals(strContent)) { String strPath2 = "/jcms_files/jcms" + strAppID + "/web" + nWebID + "/site"; String configPath = application.getRealPath("") + strPath2 + "/module/idea/config/config.xml"; String strwebtype = Convert.getValue(xmlFile.getContent("webtype", configPath)); String strWebServerName = Convert.getValue(xmlFile.getContent("web_in_servername", configPath)); /* WEB端过滤 /jcms/jcms_files/../site */ if("2".equals(strwebtype)) { strContent = strContent.replaceAll("/" + strWebServerName + strPath2, ""); } } String strModule = "/module/idea/que_content.jsp"; if( strModal.trim().length()> 0 ){ strModal = unit.replaceUnitTag( "意见征集",strModal,strContent ); out.println( strModal ); } else{ out.println( strContent ); } %>