fileManage.jsp
资源名称:wapjsp.rar [点击查看]
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:2k
源码类别:
手机WAP编程
开发平台:
Java
- <%@ page import="java.sql.*,java.util.Vector"%>
- <%@ taglib uri="http://herald.seu.edu.cn/yiwen" prefix="cyndi"%>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>艺文频道管理系统</title>
- <style type="text/css">
- a:{color:gray}
- a:link{color:gray}
- a:visited{text-decoration:none;color:gray}
- A:hover {text-decoration:none;color:red}
- </style>
- <script>
- function check()
- {
- if(document.all.item("bigclass").value=="-1")return false;
- document.all.item("bigname").value=document.all.item("bigclass").value;
- if(document.all.item("smallclass")!=null)document.all.item("smallname").value=document.all.item("smallclass").value;
- return true;
- }
- </script>
- </head>
- <body>
- <jsp:useBean id="item" scope="page" class="beanclass.FileManageBean"/>
- <jsp:setProperty name="item" property="*"/>
- <cyndi:topandbottom title="<%=item.getId()%>">
- <form METHOD=POST ACTION="fileManage.jsp?id=<%=item.getId()%>&num=<%=item.getNum()%>"><input type=submit name=hehe style="display:none">
- 添加到
- <select name="bigclass" onchange="document.all.item('hehe').click();">
- <option value="-1" selected>选择栏目</option>
- <%Class.forName("org.gjt.mm.mysql.Driver").newInstance();
- String url ="jdbc:mysql://localhost/javagame?user=nangua&password=2003herald&useUnicode=true&characterEncoding=8859_1";
- Connection con= DriverManager.getConnection(url);
- Statement statement=con.createStatement();
- ResultSet rs=statement.executeQuery("select id,classname from bigclass");
- while(rs.next()){
- %>
- <option value=<%=rs.getString("id")%> <%if(rs.getString("id").equals(item.getBigclass())){%>selected<%}%>><%=rs.getString("classname")%></option>
- <%}rs.close();%>
- </select>
- <%
- rs=statement.executeQuery("select id,classname from smallclass where parentid="+item.getBigclass());
- int i=0;
- while(rs.next()){
- %>
- <%if(i==0){%>
- 子栏目
- <select name="smallclass">
- <%i=1;
- }%>
- <option value=<%=rs.getString("id")%>><%=rs.getString("classname")%></option>
- <%}rs.close();statement.close();con.close();%>
- </select>
- </form>
- <%String tt="";
- if(item.getNum().equals("0"))tt="addFile.jsp";
- else tt="listFile.jsp";%>
- <form method=post action=<%=tt%> onsubmit="return check();">
- <input type=text name=bigname style="display:none"><input type=text name=smallname style="display:none">
- <input type=submit value="下一步">
- </form>
- </cyndi:topandbottom>
- </body>
- </html>