严智鑫
2025-03-14 c41e1c8b82b8f4c7b149e0576c9a37bc5b2dbb85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<%@page import="javax.swing.text.html.HTML"%>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 <%@include file="../mysqlconnect.jsp"%>
             <%
 String zdygh=request.getParameter("adminid");
 
 
                        
                                
                                            
             Class.forName(driverClass);{
                    Connection con=DriverManager.getConnection( urlglass,user,password);
                    
                 //通过connection数据库链接对象 创建一个statement对象数据库操作对象
                     Statement stmts=con.createStatement();
                    //执行sql语句
                     String anquan="select * from anquanbiao where anquanma = '"+request.getParameter("anquanma")+"' ";
                     ResultSet rss = stmts.executeQuery(anquan);
                     int coun=0;
                     while(rss.next())
                     {
                      coun++;
                     }
                     if(coun==0){
                      
                     out.print("<script type='text/javascript'>alert('请先登录后操作');window.parent.location.href='../index.jsp'; </script>");
                     }
                     con.close();
                     }                
                    
                  //装载一个类并且对其进行实例化的操作
                    Class.forName(driverClass);{
                                Connection con1=DriverManager.getConnection( urlglass,user,password);
                                
                                
                                    CallableStatement cs1 = con1.prepareCall("{call chaxunmima(?)}");
                        cs1.setString(1, zdygh);
                        ResultSet rs1 = cs1.executeQuery();
                        int i=0;
                        while(rs1.next())
                        {
                            zdygh=rs1.getString(1);
                                
                            i++;
                            
                            
                            
                            
                        }
                    } 
                    
                   
                    %> 
                          
</body>
</html>