<%@ include file="newindex.htm"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %> 
<%@ page import="java.text.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<html>
    <head>
    </head>
    <body>
        <form action="solvecomp1.jsp" method="post">
            <%!
            Connection con;
            Statement st;
            PreparedStatement pst;
            ResultSet rs;
            String cid,comp,uname,emp,status;
            java.util.Date sdate,edate;
            int i;
            %>
            <%
            cid=request.getParameter("cid");
            emp=(String)session.getAttribute("uname");
            Class.forName("oracle.jdbc.driver.OracleDriver");
            con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","c2t","c2t");
            st=con.createStatement();
            rs=st.executeQuery("select * from complaint where cid='"+cid+"'");
            
            %>
            <div style="position: absolute; width: 31px; height: 18px; z-index: 7; left: 983px; top: 256px" id="layer10">
                <b><a href="emplogin.jsp">
            <font face="Tahoma" size="2" color="#2D2E32">Back</font></a></b></div>
            
            <div style="position: absolute; width: 593px; height: 164px; z-index: 3; left: 415px; top: 285px" id="layer1">
                <table border="2" width="100%" id="table1" bordercolorlight="#993366" height="167">
                    <tr>
                        <td><b><font face="Tahoma" size="2">Complaint ID</font></b></td>
                        <td><b><font face="Tahoma" size="2">Complaint</font></b></td>
                        <td width="255"><b><font face="Tahoma" size="2">Solution</font></b></td>
                    </tr>
                    <%
                    if(rs.next())
                    {
                    cid=rs.getString(1);
                    comp=rs.getString(2);
                    uname=rs.getString(3);
                    // emp=rs.getString(4);
                    status=rs.getString(5);
                    sdate=rs.getDate(6);
                    edate=rs.getDate(7);
                    if(status.equals("Not Solved"))
                    {
                    emp="--";
                    }
                    
                    %>
                    <tr>
                        <td height="50"><font face="Verdana" color="#2D2E32" size="2"><%=cid%></font></td>
                        <input type="hidden" name="cid" value="<%=cid%>"><input type="hidden" name="comp" value="<%=comp%>">
                        <td height="50"><font face="Verdana" color="#2D2E32" size="2"><%=comp%></font></td>
                        <td width="255" height="50"><font face="Verdana" color="#2D2E32" size="2">
                        <textarea cols=24 name="sol" rows="3"></textarea></font></td>
                    </tr>
                    <%
                    }
                    %>
                    <tr>
                        <td colspan="3">
                        <p align="center"><input type="submit" value="Submit Solution" name="B1"></td>
                    </tr>
                </table>
            </div>
            
           <div style="position: absolute; width: 256px; height: 25px; z-index: 4; left: 293px; top: 249px" id="layer6">
				<b><font face="Arial" size="4" color="#F5A625">Complaint Details</font></b></div>  
            
                <div style="position: absolute; width: 270px; height: 23px; z-index: 2; left: 567px; top: 267px" id="layer8">
<b><font face="Tahoma" size="2" color="#17CA1C">Solution Submitted successfully...</font></b></div>
           
           
            <p>&nbsp;</p>
        </form>
    </body>
</html>