");
mainHtml.append("| ");
mainHtml.append("").append(mainSiteEn.getVc_webname()).append(" | ")
.append(" ")
.append("+全部部门 | ");
mainHtml.append("
");
mainHtml.append("");
}
html.append("");
for (int m = 0; m < list.size(); m++) {
entity = (Jcms_WebinfomationEntity) list.get(m);
strKey = String.valueOf(entity.getI_id());
MyWebName = entity.getVc_webname();
if (entity != null) {
if (m % 4 == 0) { // 输出每行的 + |
html.append(" |
");
}
html.append("| ")
.append(MyWebName)
.append(" | ");
if (m % 4 == 3) { // 输出末行的 + |
html.append("");
}
}
}
int last = list.size() % 4;
if (list.size() > 4 && last % 4 != 0) {
for (int n = 0; n < 4 - last; n++) {
html.append(" | ");
}
html.append("");
}
html.append("");
tpl.put("{tpl_target}", mainHtml.toString()+html.toString());
} else {
html.delete(0, html.length());
html.append("").append(MyWebName);
tpl.put("{tpl_target}", html.toString());//需要接口支持,由WebID 获取部门名称
}
tpl.put("{tpl_c_applytime}", DateFormat.getStrCurrentDate("yyyy-MM-dd")); //时间
/*显示验证码*/
ConfigCodeEntity cEn = new ConfigCodeEntity();
ConfigCodeBLF cBLF = new ConfigCodeBLF(request);
String index_code = "";
String code= "";
String hf1 = "";
cEn = cBLF.getEntity();
if (cEn != null) {
index_code = Convert.getValue(cEn.getIndex_code());
}
code=index_code;
if (index_code.equals("1")) {
index_code = "验证码 "
+ "
";
tpl.put("{index_code}", index_code);
hf1 = "";
} else {
hf1 = "none";
}
tpl.put("{URL}","");
tpl.put("{code}",code);
tpl.put("{tpl_hf1}", hf1);
tpl.put("{tpl_jdid}", "" + web_id);
tpl.put("{tpl_showdep}", showSubDep);
/* 隐藏参数 */
StringBuffer strHiddenForm = new StringBuffer();
strHiddenForm .append("");
/*必填项配置*/
/*定义变量*/
ConfigRequireBLF requireBlf = new ConfigRequireBLF();
ConfigRequireEntity requireEn = new ConfigRequireEntity();
String strName = ""; //姓名
String strWork = ""; //工作单位
String strCredentials = ""; //证件名称
String strCrenumber = ""; //证件号码
String strAddress = ""; //通讯地址
String strPost = ""; //邮政编码
String strTel = ""; //联系电话
String strEmail = ""; //电子邮件
String strOrganize = ""; //名称
String strOrgnumber = ""; //组织机构代码
String strLicence = ""; //营业执照
String strPerson = ""; //法人代表
String strPername = ""; //联系人姓名
String strPertel = ""; //联系人电话
String strPeremail = ""; //联系人邮箱
String strTime = ""; //申请时间
String strFax = ""; //传真
String strContent = ""; //内容描述
String strPurpose = ""; //用途描述
String strFree = ""; //是否申请减免费用
String strRequirinfo = ""; //指定提供方式
String strGetinfo = ""; //获取信息方式
String strPeraddress = "";
/*配置文件的路径*/
String strAppPath = application.getRealPath("").replaceAll( "\\\\", "/" );;
String strRequire = " *";
requireEn = requireBlf.getRequireConfig(strAppPath);
if(requireEn != null){
strName = Convert.getValue(requireEn.getStrName()); //姓名
strWork = Convert.getValue(requireEn.getStrWork()); //工作单位
strCredentials = Convert.getValue(requireEn.getStrCredentials()); //证件名称
strCrenumber = Convert.getValue(requireEn.getStrNumber()); //证件号码
strAddress = Convert.getValue(requireEn.getStrAddress()); //通讯地址
strPost = Convert.getValue(requireEn.getStrPost()); //邮政编码
strTel = Convert.getValue(requireEn.getStrTel()); //联系电话
strEmail = Convert.getValue(requireEn.getStrEmail()); //电子邮件
strOrganize = Convert.getValue(requireEn.getStrOrganize()); //名称
strOrgnumber = Convert.getValue(requireEn.getStrOrgnumber()); //组织机构代码
strLicence = Convert.getValue(requireEn.getStrLicence()); //营业执照
strPerson = Convert.getValue(requireEn.getStrPerson()); //法人代表
strPername = Convert.getValue(requireEn.getStrPername()); //联系人姓名
strPertel = Convert.getValue(requireEn.getStrPertel()); //联系人电话
strPeremail = Convert.getValue(requireEn.getStrPeremail()); //联系人邮箱
strTime = Convert.getValue(requireEn.getStrTime()); //申请时间
strFax = Convert.getValue(requireEn.getStrFax()); //传真
strContent = Convert.getValue(requireEn.getStrContent()); //内容描述
strPurpose = Convert.getValue(requireEn.getStrPurpose()); //用途描述
strFree = Convert.getValue(requireEn.getStrFree()); //是否申请减免费用
strRequirinfo = Convert.getValue(requireEn.getStrRequirinfo()); //指定提供方式
strGetinfo = Convert.getValue(requireEn.getStrGetinfo()); //获取信息方式
strPeraddress = Convert.getValue(requireEn.getStrPeraddress());
/*隐藏变量赋值*/
tpl.put("{name_val}", strName);
tpl.put("{work_val}", strWork);
tpl.put("{cred_val}", strCredentials);
tpl.put("{number_val}", strCrenumber);
tpl.put("{adress_val}", strAddress);
tpl.put("{post_val}", strPost);
tpl.put("{tel_val}", strTel);
tpl.put("{email_val}", strEmail);
tpl.put("{org_val}", strOrganize);
tpl.put("{orgnum_val}", strOrgnumber);
tpl.put("{licence_val}", strLicence);
tpl.put("{person_val}", strPerson);
tpl.put("{pername_val}", strPername);
tpl.put("{pertel_val}", strPertel);
tpl.put("{peremail_val}", strPeremail);
tpl.put("{time_val}", strTime);
tpl.put("{fax_val}", strFax);
tpl.put("{content_val}", strContent);
tpl.put("{purpose_val}", strPurpose);
tpl.put("{free_val}", strFree);
tpl.put("{requirinfo_val}", strRequirinfo);
tpl.put("{getinfo_val}", strGetinfo);
tpl.put("{peraddress_val}",strPeraddress);
/*是否显示必填*/
if(strName.equals("1")){
tpl.put("{name_require}", strRequire);
}
else{
tpl.put("{name_require}", "");
}
if(strWork.equals("1")){
tpl.put("{work_require}", strRequire);
}
else{
tpl.put("{work_require}", "");
}
if(strCredentials.equals("1")){
tpl.put("{credentials_require}", strRequire);
}
else{
tpl.put("{credentials_require}", "");
}
if(strCrenumber.equals("1")){
tpl.put("{number_require}", strRequire);
}
else{
tpl.put("{number_require}", "");
}
if(strAddress.equals("1")){
tpl.put("{address_require}", strRequire);
}
else{
tpl.put("{address_require}", "");
}
if(strPost.equals("1")){
tpl.put("{post_require}", strRequire);
}
else{
tpl.put("{post_require}", "");
}
if(strTel.equals("1")){
tpl.put("{tel_require}", strRequire);
}
else{
tpl.put("{tel_require}", "");
}
if(strEmail.equals("1")){
tpl.put("{email_require}", strRequire);
}
else{
tpl.put("{email_require}", "");
}
if(strOrganize.equals("1")){
tpl.put("{organize_require}", strRequire);
}
else{
tpl.put("{organize_require}", "");
}
if(strOrgnumber.equals("1")){
tpl.put("{orgnumber_require}", strRequire);
}
else{
tpl.put("{orgnumber_require}", "");
}
if(strLicence.equals("1")){
tpl.put("{licence_require}", strRequire);
}
else{
tpl.put("{licence_require}", "");
}
if(strPerson.equals("1")){
tpl.put("{person_require}", strRequire);
}
else{
tpl.put("{person_require}", "");
}
if(strPername.equals("1")){
tpl.put("{pername_require}", strRequire);
}
else{
tpl.put("{pername_require}", "");
}
if(strPertel.equals("1")){
tpl.put("{pertel_require}", strRequire);
}
else{
tpl.put("{pertel_require}", "");
}
if(strPeremail.equals("1")){
tpl.put("{peremail_require}", strRequire);
}
else{
tpl.put("{peremail_require}", "");
}
if(strTime.equals("1")){
tpl.put("{time_require}", strRequire);
}
else{
tpl.put("{time_require}", "");
}
if(strFax.equals("1")){
tpl.put("{fax_require}", strRequire);
}
else{
tpl.put("{fax_require}", "");
}
if(strContent.equals("1")){
tpl.put("{content_require}", strRequire);
}
else{
tpl.put("{content_require}", "");
}
if(strPurpose.equals("1")){
tpl.put("{purpose_require}", strRequire);
}
else{
tpl.put("{purpose_require}", "");
}
if(strFree.equals("1")){
tpl.put("{free_require}", strRequire);
}
else{
tpl.put("{free_require}", "");
}
if(strRequirinfo.equals("1")){
tpl.put("{requirinfo_require}", strRequire);
}
else{
tpl.put("{requirinfo_require}", "");
}
if(strGetinfo.equals("1")){
tpl.put("{getinfo_require}", strRequire);
}
else{
tpl.put("{getinfo_require}", "");
}
}
SysInit.init();
tpl.put("{area}",""+SysInit.b_area);
String strFileName = "application.html";
if (SysInit.b_area == 3) {//表示是太仓
strFileName = "application_tc.html";
tpl.put("{peraddress_val}",strPeraddress);
if(strPeraddress.equals("1")){
tpl.put("{peraddress_require}", strRequire);
}
else{
tpl.put("{peraddress_require}", "");
}
}
//+"/m_5_e/site/zfxxgk/ysqgk/html/application.html";
String strPath = application.getRealPath("") + "/jcms_files/jcms"
+ strAppID + "/web" + web_id + "/site/zfxxgk/ysqgk/html/"
+ strFileName;
String strTpl = tpl.generator(strPath, "UTF-8");
/*得到模板文件*/
int nModalType = 1;
Ysqgk_ModalBLF modalblf = new Ysqgk_ModalBLF(strAppID, web_id);
Ysqgk_ModalEntity modalEn = modalblf.getSelectModal(nModalType);
if (modalEn == null) {
out.println(strTpl);
} else {
String strModalPath = application.getRealPath("")
+ "/jcms_files/jcms" + strAppID + "/web" + web_id
+ "/site/zfxxgk/ysqgk/modal/" + nModalType + "/";
String strImgaePath = application.getRealPath("")
+ "/jcms_files/jcms" + strAppID + "/web" + web_id
+ "/site/zfxxgk/ysqgk/images/";
String strModalFileName = strModalPath
+ modalEn.getVc_modalfilename();
Convert convert = new Convert();
String strModal = convert.readInputStream(strModalFileName,
"UTF-8");
if (Convert.getValue(strModal).length() == 0) {
out.println(strTpl);
return;
}
/*copy模板图片*/
Ysqgk_ModalBLF.copyImageFile(strModalPath, strImgaePath,
strModal);
/*替换模板单元*/
strTpl = Ysqgk_ModalBLF
.replaceUnit(strModal, "依申请公开表单", strTpl);
out.println(strTpl);
}
%>