             
  <%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.sql.*"%>
<%@page import="Dna.Sources.Dbconnection"%>
<%@ page session="true" %>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>SECURING AGGREGATE</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">
       
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/bootstrap-responsive.css">
        <link rel="stylesheet" href="css/custom-styles.css">
        <link rel="stylesheet" href="css/font-awesome.css">
        <link rel="stylesheet" href="css/component.css">
        <link rel="stylesheet" href="css/font-awesome-ie7.css">
         <link rel="icon" href="images/13.jpg">
        
        <script src="js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    </head>
    
      <%
if(request.getParameter("msg")!=null){%>
    
    <script>alert('Privatekey Sucessfully Generated...!')</script>
}  

<%}
if(request.getParameter("g")!=null){%>

<script>alert('Privatekey Already Generated..!')</script>
 <%
}
%>
      <%
if(request.getParameter("m")!=null){%>
    
    <script>alert('Request Sent to Cloud1...!')</script>
}  

<%}
if(request.getParameter("c")!=null){%>

<script>alert('Request Already Sent..!')</script>
 <%
}
%>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->

        <!-- This code is taken from http://twitter.github.com/bootstrap/examples/hero.html -->

        <!-- Site header starts here -->

            


             <!-- main content starts here -->

            <div class="container b-radius-top">
                <div class="top-bar b-radius">
                   
                    <div class="social">
                        <ul>
                           
                        </ul>
                    </div>
                </div>
                <div class="site-header">


                     <!-- Site Name starts here -->

                    <div class="site-name">
                        <h1>SECURING AGGREGATE QUERIES FOR DNA DATABASES</h1>
                    
                    </div>

                    <!-- Site Name ends -->

                     <!-- Menu starts here -->
                    <div class="menu">
                        <div class="navbar">
                            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                               <i class="fw-icon-th-list"></i>
                            </a>
                            <div class="nav-collapse collapse">
                                <ul class="nav">
                                   <li><a href="cloud1home.jsp">Home</a></li>
                                    <li  class="active"><a href="userreq.jsp">View Researchers Request</a></li>
                             
                                    <li><a href="viewusers.jsp">View Researchers</a></li> 
                                    
                                    <li><a href="logout.jsp">logout</a></li>
                                </ul>
                             
                            </div>
                        </div>
                    </div>

                    <!-- Menu ends -->
                </div>
       

<% 


try{ 
	Class.forName("com.mysql.jdbc.Driver");
	Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/dna","root","root");
        System.out.println("2");
	PreparedStatement pst=con.prepareStatement("select * from request");
       
        
	ResultSet rs=pst.executeQuery();
        %>
        
        <center> <table style="width:40%" border="2">
            <br><br><br>
             
  <tr>
    
     
    
     
     <th><font color="red"> Pid</th>
  <th><font color="red"> Dna1</th>
     <th><font color="red"> Dna2</th>
     <th><font color="red"> Dna3</th>
    
     <th><font color="red"> User</th>
     <th><font color="red"> Send </th>
     
</tr>

<%
       
    while(rs.next()){
            %><tr><th><center><%=rs.getString(1)%></th>
                <th><center><%=rs.getString(2)%></th>
                <th><center><%=rs.getString(3)%></th>
                <th><center><%=rs.getString(4)%></th>
        
                <th><center><%=rs.getString(9)%></th>
                <th><center><a href="response.jsp?pid=<%=rs.getString("pid")%>&email=<%=rs.getString("email")%>">  Send</a> </th>
          
        </tr>
        
      <%  }

}
	catch(Exception e)
	{
		System.out.println(e);
	}
	%>
        </table>
        <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
</body>
</html>