📄 dir_bottom.jsp
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.InputStream" %>
<%@ page import="java.util.*" %>
<%@ page import="cn.js.fan.web.*" %>
<%@ page import="cn.js.fan.db.*" %>
<%@ page import="cn.js.fan.util.*" %>
<%@ page import="com.redmoon.forum.*" %>
<%@ page import="com.redmoon.forum.plugin2.*" %>
<%@ page import="com.redmoon.forum.ui.*" %>
<%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<LINK href="../common.css" type=text/css rel=stylesheet>
<LINK href="default.css" type=text/css rel=stylesheet>
</head>
<body>
<jsp:useBean id="dir" scope="page" class="com.redmoon.forum.Directory"/>
<jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
<%
if (!privilege.isMasterLogin(request)) {
out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
return;
}
%>
<%
String parent_code = ParamUtil.get(request, "parent_code");
if (parent_code.equals(""))
parent_code = "root";
String parent_name = ParamUtil.get(request, "parent_name");
String code = ParamUtil.get(request, "code");
String name = ParamUtil.get(request, "name");
String description = ParamUtil.get(request, "description");
String op = ParamUtil.get(request, "op");
boolean isHome = false;
int type = 0;
if (op.equals(""))
op = "AddChild";
Leaf leaf = null;
if (op.equals("modifydo")) {
boolean re = true;
try {
re = dir.update(application, request);
}
catch (ErrMsgException e) {
out.print(StrUtil.Alert(e.getMessage()));
}
if (re)
out.print(StrUtil.Alert(SkinUtil.LoadString(request, "res.label.forum.admin.dir_bottom", "op_success_need_refresh")));
}
String action = "dir_top.jsp";
String target = "dirmainFrame";
if (op.equals("modify") || op.equals("modifydo")) {
leaf = dir.getLeaf(code);
Leaf parentLeaf = leaf.getLeaf(leaf.getParentCode());
parent_name = parentLeaf.getName();
name = leaf.getName();
description = leaf.getDescription();
type = leaf.getType();
isHome = leaf.getIsHome();
op = "modifydo";
action = "dir_bottom.jsp";
target = "_self";
}
%>
<TABLE
style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid"
cellSpacing=0 cellPadding=3 width="95%" align=center>
<!-- Table Head Start-->
<TBODY>
<TR>
<TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%"><lt:Label res="res.label.forum.admin.dir_bottom" key="dir_add_or_del"/></TD>
</TR>
<TR class=row style="BACKGROUND-COLOR: #fafafa">
<TD align="center" style="PADDING-LEFT: 10px"><table class="frame_gray" width="88%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td align="center"><table width="98%">
<form name="form1" method="post" action="<%=action%>?op=<%=op%>&code=<%=code%>" target="<%=target%>" enctype="MULTIPART/FORM-DATA">
<tr>
<td width="118" rowspan="8" align="left" valign="top"><br>
父结点:<br>
<font color=blue><%=parent_name.equals("")?SkinUtil.LoadString(request, "res.label.forum.admin.dir_bottom", "dir_root"):parent_name%></font>
<br>
<%
if (op.equals("modify") || op.equals("modifydo")) {
if (leaf.getLogo()!=null && !leaf.getLogo().equals(""))
out.print("<img src='../images/board_logo/" + leaf.getLogo() + "'>");
}
%></td>
<td width="93" align="right"> <lt:Label res="res.label.forum.admin.dir_bottom" key="code"/></td>
<td width="316" align="left"><input name="code" value="<%=code%>" <%=(op.equals("modify") || op.equals("modifydo"))?"readonly":""%>></td>
</tr>
<tr>
<td width="93" align="right"><lt:Label res="res.label.forum.admin.dir_bottom" key="name"/></td>
<td align="left"><input name="name" value="<%=name%>">
<select name="delMode">
<option value="<%=Leaf.DEL_DUSTBIN%>">
<lt:Label res="res.label.forum.admin.dir_bottom" key="del_dustbin"/>
</option>
<option value="<%=Leaf.DEL_FOREVER%>">
<lt:Label res="res.label.forum.admin.dir_bottom" key="del_forever"/>
</option>
</select>
<script>
<%if (op.equals("modify") || op.equals("modifydo")) {%>
form1.delMode.value = "<%=leaf.getDelMode()%>"
<%}%>
</script>
</td>
</tr>
<tr>
<td width="93" align="right"><lt:Label res="res.label.forum.admin.dir_bottom" key="desc"/></td>
<td align="left"><textarea name="description" cols="40" rows="3"><%=description%></textarea>
<input type=hidden name=parent_code value="<%=parent_code%>"></td>
</tr>
<tr>
<td width="93" align="right">
<script>
// var root_code = window.parent.dirmainFrame.getRootCode();
// document.write("<input type=hidden name=root_code value='" + root_code + "'");
</script> </td>
<td align="left"><%
String disabled = "";
if (op.equals("modify") && leaf.getType()>=1) {
disabled = "disabled"; %>
<input type=hidden name="type" value="<%=leaf.getType()%>">
<%}%>
<lt:Label res="res.label.forum.admin.dir_bottom" key="type"/>
<select name="type" <%=disabled%>>
<option value="0"><lt:Label res="res.label.forum.admin.dir_bottom" key="field"/></option>
<option value="1" <%=!parent_code.equals("root")?"selected":""%>><lt:Label res="res.label.forum.admin.dir_bottom" key="board"/></option>
</select>
<script>
<%if (op.equals("modify") || op.equals("modifydo")) {%>
form1.type.value = "<%=type%>"
<%}%>
</script>
<%
ThemeMgr tmmgr = new ThemeMgr();
Vector v = tmmgr.getAllTheme();
Iterator ir = v.iterator();
String options = "";
while (ir.hasNext()) {
Theme tm = (Theme) ir.next();
options += "<option value='" + tm.getCode() + "'>" + tm.getName() + "</option>";
}
String theme = "";
if (leaf!=null)
theme = StrUtil.getNullString(leaf.getTheme());
// if (theme.equals(""))
// theme = "default";
%>
<lt:Label res="res.label.forum.admin.dir_bottom" key="topic"/>
<select name="theme">
<option value=""><lt:Label res="res.label.forum.admin.dir_bottom" key="none"/></option>
<%=options%>
</select>
<%
SkinMgr skmgr = new SkinMgr();
v = skmgr.getAllSkin();
ir = v.iterator();
String skinoptions = "";
while (ir.hasNext()) {
Skin skin = (Skin) ir.next();
skinoptions += "<option value='" + skin.getCode() + "'>" + skin.getName() + "</option>";
}
String skin = "";
if (leaf!=null)
skin = StrUtil.getNullString(leaf.getSkin());
// if (skin.equals(""))
// skin = "default";
%>
<lt:Label res="res.label.forum.admin.dir_bottom" key="skin"/>
<select name="skin">
<option value=""><lt:Label res="res.label.forum.admin.dir_bottom" key="none"/></option>
<%=skinoptions%>
</select>
<script>
<%if (op.equals("modify") || op.equals("modifydo")) {%>
form1.theme.value = "<%=theme%>"
form1.skin.value = "<%=skin%>"
<%}%>
</script> </td>
</tr>
<tr>
<td width="93" align="right"> </td>
<td align="left">
<%if (op.equals("modifydo")) {%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -