📄 checkout_meeting.jsp
字号:
<%@page contentType="text/html;charset=Gb2312"
import="java.sql.*,java.util.Date"%>
<jsp:useBean id="pool" scope="application" class="com.PoolBean"/>
<%
String strLoginUser = (String)session.getAttribute("LoginUser");
if (strLoginUser == null || strLoginUser.length() == 0)
response.sendRedirect("Login.jsp");
%>
<html>
<head>
<title><h1>退出会议</h1></title>
</head>
<body>
<center>
<font size=5 color=blue></font>退出会议</font>
</center>
<hr>
<%
String user_name="";
String num = request.getParameter("num");
String meeting_title = new
String(request.getParameter("title").getBytes("8859_1"));
try
{
if (pool.getConnectionSize() == 0)
{
pool.initializePool();
}
Connection con = null;
Statement stmt = null;
ResultSet rs=null;
con = pool.getConnection();
stmt= con.createStatement();
if (strLoginUser != null && strLoginUser.length() != 0)
{
String sql="select name from user where code ='"+strLoginUser+"'";
rs = stmt.executeQuery(sql);
if(rs.next())
{
user_name=rs.getString("name");
}
}
String strDel ="delete from meetingperson where num="+ num+" and name='"
+user_name+"'";
stmt.executeUpdate(strDel);
stmt.close();//关闭Statement对象
pool.releaseConnection(con);
response.sendRedirect("default.jsp");
}
catch (Exception e)
{
out.println(e.getMessage());
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -