columns_main.jsp
上传用户:junmaots
上传日期:2022-07-09
资源大小:2450k
文件大小:3k
- <%@page contentType="text/html; charset=GBK" language="java" %>
- <%@page import="com.mycompany.news.service.ColumnService" %>
- <%@page import="com.mycompany.news.dto.Column" %>
- <%@page import="java.util.List"%>
- <%
- String columnid = request.getParameter("columnid");
- if(columnid==null)return;
- ColumnService cs = new ColumnService();
- Column c = cs.getByID(Long.parseLong(columnid));
- List children = cs.listChildren(c);
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <link href="../css/common.css" rel="stylesheet" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
- <body leftmargin="0" topmargin="0" marginwidth="15" marginheight="2" CLASS="TA">
- <br>
- <br>
- <br>
- <br><br>
- <table border="0" cellpadding="0" cellspacing="0" align='left' width='70%'>
-
- <form name="form1" action="<%=request.getContextPath()%>/servlet/ModifyColumn" method="post">
- <input type="hidden" name="columnid" value="<%=c.getColumnId()%>">
- <input type="hidden" name="channelid" value="<%=c.getChannelId()%>">
- <input type="hidden" name="parentcolumn" value="<%=c.getParentColumn()%>">
- <input type="hidden" name="topcolumn" value="<%=c.getTopColumn()%>">
- <input type="hidden" name="currentlevel" value="<%=c.getCurrentLevel()%>">
- <input type="hidden" name="leafnode" value="<%=c.getLeafNode()%>">
-
- <tr>
- <td width='100'>栏目名称</td>
- <td><input name="columnname" value="<%=c.getColumnName()%>"></td>
- <td width='100'>栏目顺序</td>
- <td><input name="columnorder" value="<%=c.getColumnOrder()%>"></td>
- <td><input type='button' value="保存" class="input-button" onclick="form1.submit()"></td>
- </tr>
- </table>
- <form name="form2" action="<%=request.getContextPath()%>/servlet/AddColumn" method="post">
- <input type="hidden" name="parentcolumn" value="<%=c.getColumnId()%>">
- <input type="hidden" name="channelid" value="<%=c.getChannelId()%>">
- <tr>
- <td width='100'>子栏目名称</td>
- <td><input name="columnname" value=""></td>
- <td width='100'>子栏目顺序</td>
- <td><input name="columnorder" value=""></td>
- <td><input type='button' class="input-button" value="添加" onclick="form2.submit()"></td>
- </tr>
-
- </form>
- <br>
- <br>
- <br>
- <br>
- <table align='left' width='70%' border="0" cellpadding="0" cellspacing="0" align='center' class="tbcolor">
- <tr class="titletab">
- <th align='center'>顺序</th><th align='center'>名称</th><th align='center'>修改</th><th align='center'>删除</th>
- </tr>
- <%for(int i=0;i<children.size();i++){
- Column column = (Column )children.get(i);
- %>
- <form name="form<%=column.getColumnId()%>" action="<%=request.getContextPath()%>/servlet/DeleteColumn">
- <input type="hidden" name="columnid" value="<%=column.getColumnId()%>">
- </form>
- <tr>
- <td align='center'>· <%=c.getColumnOrder()%></td>
- <td align='center'><%=column.getColumnName()%></td>
- <td align='center'><a href='columns_main.jsp?columnid=<%=column.getColumnId()%>'><image src="../images/modify.gif" border=0/></a></td>
- <td align='center'><a href='#' onclick="deleteColumn(form<%=column.getColumnId()%>)"> <image src="../images/delete.gif" border=0/></a></td>
- </tr>
- <%}%>
- </table>
- </body>
- </html>
- <script>
- function deleteColumn(frm){
- if(confirm('确定删除栏目?')){
- frm.submit();
- }
-
- }
- </script>