📄 menulist.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<title>无标题文档</title>
<link href="css/default.css" rel="stylesheet" type="text/css">
</head>
<SCRIPT LANGUAGE=javascript>
<!--
function SetFlag(act,menuid,id)
{
var ret=false;
if (act=="dodel") if(!(confirm("删除此栏目将同时删除此栏目所属的所有内容,你确信要删除吗?"))) ret=true;
if (!ret)
{ if (act=="loadadd") {
document.menuForm.action=document.menuForm.action+"?act="+act+"&menuid="+menuid;
}else {
document.menuForm.action=document.menuForm.action+"?act="+act+"&menuid="+menuid+"&id="+id;
}
document.menuForm.submit();
}
}
//-->
</SCRIPT>
<body>
<%
String menuid=(String)request.getAttribute("menuid");
String menuName=(String)request.getAttribute("menuName");
%>
<html:form action="/MenuAction.do">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td height="252" align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="34" align="left"> 栏目管理:<%=menuName%>=>栏目列表</td>
<td height="34" align="right"> <a href="ItemAction.do?act=dolist&menuid=<%=menuid%>">文章管理</a> | <a href="MenuAction.do?act=dolist&menuid=<%=menuid%>"><FONT color="#FF0000">栏目管理</FONT></a></td>
</tr>
</table>
<hr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="right" width="100%" colspan="2">
<input type="button" name="addMenu" value="添加栏目" onclick="SetFlag('loadadd','<%=menuid%>','')">
</td>
</tr>
<tr>
<td colspan="2"><table width="100%">
<tr align="center">
<td height="30" nowrap>栏目名称</td>
<td height="30" nowrap>排列顺序</td>
<td height="30" nowrap>栏目类型</td>
<td height="30" nowrap>是否在用</td>
<td height="30" colspan="3" nowrap>操作</td>
</tr>
<logic:iterate id="menu" name="menuList">
<tr>
<td height="25" align="center" nowrap> <a href="MenuAction.do?act=dolist&menuid=<bean:write name="menu" property="ID"/>"><bean:write name="menu" property="menuName"/></a></td>
<td height="25" align="center" nowrap> <bean:write name="menu" property="menuOrder"/></td>
<td height="25" align="center" nowrap> <bean:write name="menu" property="type"/></td>
<td height="25" align="center" nowrap>
<logic:equal name="menu" property="isUse" value="1">是</logic:equal>
<logic:equal name="menu" property="isUse" value="0">否</logic:equal>
</td>
<td width="7%" height="25" align="center"><input type="button" name="editMenu" value="修改" onclick="SetFlag('loadedit','<%=menuid%>','<bean:write name="menu" property="ID"/>')"></td>
<td width="7%" height="25" align="center"><input type="button" name="delMenu" value="删除" onclick="SetFlag('dodel','<%=menuid%>','<bean:write name="menu" property="ID"/>')"></td>
<td width="7%" height="25" align="center">
<logic:equal name="menu" property="isUse" value="1">
<input type="button" name="stopMenu" value="禁用" onclick="SetFlag('dostop','<%=menuid%>','<bean:write name="menu" property="ID"/>')">
</logic:equal>
<logic:equal name="menu" property="isUse" value="0">
<input type="button" name="startMenu" value="启用" onclick="SetFlag('dostart','<%=menuid%>','<bean:write name="menu" property="ID"/>')">
</logic:equal>
</td>
</tr>
</logic:iterate>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</html:form>
<%
String reload =(String)request.getAttribute("reload");
if(reload!=null){
%>
<script langauge="javascript">
this.parent.menu_bar.location.reload();
</script>
<%}%>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -