⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 man_manage.jsp

📁 此为图书管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
BODY {
	BACKGROUND-IMAGE: none; BACKGROUND-COLOR: #ade3ff
}
.STYLE5 {color: #FFFFFF; font-weight: bold; }
.STYLE6 {
	font-family: "楷体_GB2312";
	color: #FF0000;
}
-->
</style>
<jsp:useBean id="ConnBean" scope="page" class="com.bean.db.conn" />

</head>
<body><div align="center">
<h1 align="center" class="STYLE6">图书管理员管理</h1>
<table width="50%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr align="center">
    <td width="23%" bgcolor="#000099"><span class="STYLE5">帐号</span></td>
    <td width="14%" bgcolor="#000099"><span class="STYLE5">密码</span></td>
    <td width="12%" bgcolor="#000099"><span class="STYLE5">操作</span></td>
  </tr>
  <%
try{
String str=request.getParameter("act");
String id=request.getParameter("id");
if (str.equals("del"))
{
String sql="delete from admin where id="+id;
if(ConnBean.execute(sql).equals("OK")){
	out.println("<script language='javascript'>alert('删除管理员成功!');window.location.href='man_manage.jsp';</script>");
}

}
}
 catch(Exception e){}
  for(ResultSet rs = ConnBean.executeQuery("select * from admin");rs.next();){
  String ids=rs.getString("id");
  %>
  <tr>
    <td>&nbsp;<%=rs.getString("user")%></td>
    <td>&nbsp;<%=rs.getString("pass")%></td>
    <td align="center"><a href="?act=del&id=<%=ids%>" >删除</a> </td>
  </tr>
  <%
 }
%>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -