listFile.jsp
资源名称:wapjsp.rar [点击查看]
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
Java
- <%@ page import="java.sql.*"%>
- <%@ 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:{text-decoration:none;color:gray}
- a:link{text-decoration:none;color:gray}
- a:visited{text-decoration:none;color:gray}
- A:hover {text-decoration:none;color:red}
- </style>
- </head>
- <body>
- <jsp:useBean id="item" scope="page" class="beanclass.ListFileBean"/>
- <jsp:setProperty name="item" property="*"/>
- <%if(item.getDeleteid()!=null){String s="delete from class"+item.getBigname()+" where id="+item.getDeleteid();%>
- <cyndi:sqlexecute sql="<%=s%>"/>
- <%}%>
- <cyndi:topandbottom title="文章列表">
- <table border="0" cellpadding="0" cellspacing="0" width=80%>
- <Tr><td>
- <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
- <tr>
- <td width="70%" bgcolor="#304D7C">
- <div align="center"><font color="#FFFFFF">文章标题</font></div>
- </td>
- <td width="10%" bgcolor="#304D7C">
- <div align="center"><font color="#FFFFFF">修改</font></div>
- </td>
- <td width="10%" bgcolor="#304D7C">
- <div align="center"><font color="#FFFFFF">删除</font></div>
- </td>
- <td width="10%" bgcolor="#304D7C">
- <div align="center"><font color="#FFFFFF">移动</font></div>
- </td>
- </tr>
- <%
- 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();
- String str="";
- if(item.getSmallname()!=null)str="select id,title from class"+item.getBigname()+" where parentid="+item.getSmallname();
- else str="select id,title from class"+item.getBigname();
- ResultSet rs=statement.executeQuery(str);
- while(rs.next()){
- %>
- <tr bgcolor="#FFFFFF">
- <%String id=rs.getString("id");%>
- <td width="70%" align="left"> <a href=../view.jsp?id=<%=rs.getString("id")%>&big=<%=item.getBigname()%> target="_blank"><font color=black><%=rs.getString("title")%></font></a></td>
- <td width="10%" align="center"><a href="editFile.jsp?id=<%=id%>&bigname=<%=item.getBigname()%>&smallname=<%=item.getSmallname()%>" target="_blank">修改</a></td>
- <td width="10%" align="center"><a href="listFile.jsp?deleteid=<%=id%>&bigname=<%=item.getBigname()%>&smallname=<%=item.getSmallname()%>">删除</a></td>
- <td width="10%" align=center>移动</td>
- </tr>
- <%}
- rs.close();
- statement.close();
- con.close();%>
- </table>
- </td></tr></table>
- </cyndi:topandbottom>
- </body>
- </html>