- <%@page contentType="text/html; charset=GBK" language="java"%>
- <%@page import="com.mycompany.news.service.*"%>
- <%
- String channelID = request.getParameter("channelid");
- ChannelService channelService = new ChannelService();
- StringBuffer sb = channelService.getTreeString(
- "columns_main.jsp?columnid=", Long.valueOf(channelID));
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <link href="../css/common.css" rel="stylesheet" type="text/css">
- <title>JavaScript Navigation Tree</title>
- <style>
- /* Style for tree item text */
- .t0i {
- font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif, 宋体;
- font-size: 11px;
- color: #000000;
- background-color: none;
- text-decoration: none;
- }
- /* Style for tree item image */
- .t0im {
- border: 0px;
- width: 19px;
- height: 16px;
- }
- </style>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- </head>
- <body leftmargin="0" topmargin="0" marginwidth="15" marginheight="2"
- CLASS="TA">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <table width="80%" border="0" align="center" cellpadding="0"
- cellspacing="0">
- <tr>
- <td>
- <font size="2">栏目管理</font>
- </td>
- <td>
- <font size="2"><a
- href="columnnews_left.jsp?channelid=<%=channelID%>">栏目新闻管理<a>
- </font>
- </td>
- </tr>
- <tr>
- <td>
- <script language="JavaScript" src="../js/tree.js"></script>
- <script language="JavaScript">
- var TREE_ITEMS = [
- <%=sb.toString()%>
- ];
- </script>
- <script language="JavaScript" src="../js/tree_tpl.js"></script>
- <script language="JavaScript">
- new tree (TREE_ITEMS, tree_tpl);
- </script>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <form name="form1"
- action="<%=request.getContextPath()%>/servlet/AddColumn">
- <input name="parentcolumn" type='hidden' value="0">
- <input name="channelid" type='hidden' value="<%=channelID%>">
- <tr>
- <td>
- 栏目名称
- <input name="columnname" type='text'>
- </td>
- </tr>
- <tr>
- <td>
- 栏目顺序
- <input name="columnorder" type='text'>
- </td>
- </tr>
- <tr>
- <td>
- <input type='button' class="input-button" value='添加根栏目'
- onclick="form1.submit()">
- </td>
- </tr>
- </body>
- </html>