<%@page import="com.hanweb.common.util.file.LocalFileUtil"%> <%@page import="com.hanweb.common.util.StringUtil"%> <%@page import="com.hanweb.common.util.NumberUtil"%> <%@page contentType="text/html;charset=UTF-8"%> <%@page import="com.hanweb.jcms.service.plugin.Jcms_Extramodal_ModalBLF"%> <%@page import="com.hanweb.jcms.service.column.Jcms_CataloginfoBLF"%> <%@page import="com.hanweb.jcms.entity.Jcms_CataloginfoEntity"%> <%@include file="config.jsp"%> <% int cataId = NumberUtil.getInt(request.getParameter("cataid"), 0); int isOpen = NumberUtil.getInt(request.getParameter("open")); LocalFileUtil fileUtil = LocalFileUtil.getInstance(); if(cataId <= 0) { out.println("
请输入正确的参数cataid值!
"); return; } Jcms_CataloginfoBLF cataBlf = Jcms_CataloginfoBLF.getInstance().init(strAppID, strWebID); Jcms_CataloginfoEntity cataEn = cataBlf.getEntity(cataId, NumberUtil.getInt(strWebID)); if(cataEn == null) { out.println("
请输入正确的参数cataid值!
"); return; } // 配置文件路径 String configPath = fileUtil.getAbsolutePath("jcms_files/jcms"+strAppID+"/web"+strWebID+"/site/module/sceneservice/config/unit.xml"); // 每行显示个数 int linenum ; linenum = NumberUtil.getInt(xmlFile.getContent("rownum",configPath), 4); // 单选按钮标题显示的字符个数 int catalen ; catalen = NumberUtil.getInt(xmlFile.getContent("catalen",configPath), 10); // 标题显示的字数 int titlelen ; titlelen = NumberUtil.getInt(xmlFile.getContent( "sub_wordcount",configPath ), 20); // 标题显示 String sub_script = xmlFile.getContent("sub_script", configPath); sub_script = StringUtil.getString(sub_script); sub_script = sub_script.length()==0?"":sub_script; int catawidth; catawidth = NumberUtil.getInt(xmlFile.getContent("catawidth",configPath), 160); int showwidth; showwidth = NumberUtil.getInt(xmlFile.getContent("showwidth",configPath), 700); int sub_row; sub_row = NumberUtil.getInt(xmlFile.getContent("sub_row",configPath), 20); int sub_col; sub_col = NumberUtil.getInt(xmlFile.getContent("sub_col",configPath), 2); //获取模板文件 String strModalHtml = Jcms_Extramodal_ModalBLF.getModal(NumberUtil.getInt(strWebID), strAppID, request.getRealPath(""), "sceneservice"); if(strModalHtml.length() == 0){ out.println("
"); } else { String strToPath =fileUtil.getAbsolutePath( "jcms_files/jcms" + strAppID + "/web" + strWebID +"/site/module/sceneservice/"); //读外网用户模板 String strComment = fileUtil.readFileToString(strToPath + "tpl/frm_sceneservice.html","UTF-8"); String strFrom1 = ""; int nPos1 = -1; int nPos2 = -1; String strAll = ""; if(strModalHtml.length() > 0){ //找标签位置 nPos1 = strModalHtml.indexOf( strFrom1 ); nPos2 = strModalHtml.indexOf( strFrom2, nPos1 ); } //获取完整前台注册文件 if( nPos1 >= 0 && nPos2 > 0) strAll = strModalHtml.substring(0,nPos1) + strComment + strModalHtml.substring( nPos2+strFrom2.length() ); else strAll = "
"; //输出 out.println(strAll); } %>