?? comment_admin.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="xwfb.connectDB" />
<html>
<head>
<title>評論管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function deal(para)
{
if(para == 1)
{
add_form.submit();
}
if(para == 2)
{
window.close();
opener.location.reload();
}
}
</script>
</head>
<body>
<%
String newsid = request.getParameter("newsid");
ResultSet rs = null;
try
{
String sql = "select * from XWFB_COMMENT where news_id = "+newsid;
rs = db.executeQuery(sql);
if(rs.next())
{
%>
<form name="add_form" method="post" action="comment_modify.jsp?newsid=<%=newsid%>">
<table>
<tr>
<td colspan="3">
<input type="button" class="logbutton" value="刪除" onclick="deal(1)">
<input type="button" class="logbutton" value="關閉" onclick="deal(2)">
</td>
</tr>
<tr>
<td width="20%"></td>
<td width="40%" align="center">評論</td>
<td width="40%" align="center">時間</td>
</tr>
<tr>
<td width="20%"><input type="checkbox" name="choose" value="<%=rs.getInt("id")%>"></td>
<td width="40%" align="center"><%=rs.getString("comment_content")%></td>
<td width="40%" align="center"><%=rs.getString("comment_date")%></td>
</tr>
<%
while(rs.next())
{
%>
<tr>
<td width="20%"><input type="checkbox" name="choose" value="<%=rs.getInt("id")%>"></td>
<td width="40%" align="center"><%=rs.getString("comment_content")%></td>
<td width="40%" align="center"><%=rs.getString("comment_date")%></td>
</tr>
<%
}
%>
</table>
</form>
<%
}
else
{
%>
評論不存在!<br>
<%
}
}
catch(Exception e)
{
session.setAttribute("error","1");
response.sendRedirect("error.jsp");
}
finally
{
try
{
db.closeDB();
rs.close();
}
catch(Exception ee)
{
session.setAttribute("error","1");
response.sendRedirect("error.jsp");
}
}
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -