📄 add_tree_page.jsp
字号:
<%@ page contentType="text/html; charset=GBK" language="java" errorPage=""%>
<%request.setCharacterEncoding("GBK");%>
<%@ page import="java.text.*"%>
<%@ page import="com.doone.webtemplate.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.doone.util.FileLogger"%>
<%@ page import="com.doone.upload.*"%>
<%@ page import="com.doone.uurm.WebAuth"%>
<%String sPurvICode="NGB007007";%>
<%
WebAuth auth = WebAuth.getInstance(request);
if ( ! auth.IsAuthed() ) {
out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
return;
}
else if ( ! auth.CheckPurv(sPurvICode) ) {
out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
return;
}
String city_code;
if(auth.getCityCode()==null || auth.getCityCode().equals(""))
city_code = "0590";
else
city_code = auth.getCityCode();
String action = request.getParameter("action");
String menucode = request.getParameter("menucode");
String name = request.getParameter("name");
String desc = "";
String code = request.getParameter("code");
desc = request.getParameter("desc");
try{
if("add".equals(action)){
//增加
if(city_code != null && desc != null && name != null && code != null){
//out.print("编码:"+code);
//只有当扩展名为html或htm时
ModuleConfig mc = TemplateFactory.getModuleConfig(code);
PageConfig pc = mc.newPageConfig();
int b = name.indexOf("?");
//查看路径是否带有参数
if(b == -1){
pc.setName(name+"?city_code_id="+city_code);
}else{
pc.setName(name+"&city_code_id="+city_code);
}
pc.setDesc(desc);
Date now = new Date();
pc.setCreateTime(now);
pc.setParam("citycode", city_code);
mc.appendPage(pc);
//out.print("name="+name+",desc="+desc+",city_code="+city_code);
TemplateFactory.saveConfig();
//TemplateFactory.loadConfig();
}
}
if("del".equals(action)){
if(name != null && code != null){
//删除
ModuleConfig mc = TemplateFactory.getModuleConfig(code);
mc.removePage(name);
TemplateFactory.saveConfig();
}
}
if("update".equals(action)){
if(name != null && code != null && desc != null){
ModuleConfig mc = TemplateFactory.getModuleConfig(code);
mc.updatePage(name,desc);
TemplateFactory.saveConfig();
}
}
}catch(Exception sue){
FileLogger.getLogger().error("更新首页模板出错;"+sue.getMessage());
}
%>
<style>
.botton {
font-size: 12px;
color: #804000;
BORDER-RIGHT: #666666 1px solid;
BORDER-TOP: #666666 1px solid;
BORDER-LEFT: #666666 1px solid;
BORDER-BOTTOM: #666666 1px solid;
BACKGROUND-COLOR: #ffffff;
}
.add_zl {
font-size: 12px;
line-height: 18px;
color: #333333;
text-decoration: none;
}
body {
margin-top: 0px;
}
.biaoti {
font-size: 12px;
color: #FFFFFF;
text-decoration: none;
}
.style4 {
color: #FF0000;
font-weight: bold;
font-size: 12px;
}
</style>
<link href="../../common/style/main.css" rel="stylesheet" type="text/css" />
<table id="ibtnPanel" style="font-size: 9pt; border-bottom: #efefef 1px outset" cellspacing="0"
cellpadding="0" width="100%" border="0">
<tr bgcolor="#efefef" height="33">
<td align="left" valign="middle" id="ibtnaddResearch" title="" onClick="return fnToolAddResearch();" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="add_zl">
<tr>
<td height="27" bgcolor="#f5f5f5"> <a href="edit_web_index.jsp">返回修改首页导航</a></td>
</tr>
</table></td>
</tr>
</table>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0" class="add_zl">
<tr>
<td> </td>
</tr>
<tr>
<td align="center">正在执行您的操作,请稍候!!!</td>
</tr>
<tr>
<td align="center"><span id=BackSecs class="style4"></span></td>
</tr>
</table>
<script>
function countDown(Secs) {
BackSecs.innerText=Secs;
if(Secs>0) {
setTimeout("countDown("+Secs+"-1)",1000);
}
else {
window.location.href = "tree_page.jsp?code=<%=code%>&menucode=<%=menucode%>";
}
}
countDown(5);
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -