修复所有数据库性能问题

This commit is contained in:
FJY
2017-11-01 23:02:30 +08:00
parent b4da65a6e3
commit bca76d88a6
31 changed files with 288 additions and 171 deletions

View File

@@ -23,9 +23,7 @@
<%
request.setCharacterEncoding("utf-8");
boolean flag = false;
PreparedStatement sql = null;
ResultSet rs = null;
Connection conn = null;
if (session.getAttribute("actualuser") == null) {
out.println(
"<script language=javascript>alert('登录超时 (1440 秒未活动)或未登录,请重新登录。');window.location.href='index.html'</script>");
@@ -41,6 +39,10 @@
String use = "root";
String password = "";
Class.forName(driver);
try{
PreparedStatement sql = null;
ResultSet rs = null;
Connection conn = null;
conn = DriverManager.getConnection(url, use, password);
sql = conn.prepareStatement("select * from show_user where userName=? and Administrator=1");
sql.setString(1, users);
@@ -51,6 +53,10 @@
rs.close();
sql.close();
conn.close();
} catch (Exception ex) {
ex.printStackTrace();
}
%>
<!-- 判断是否是管理员 -->
<%