<%@ page import="java.sql.*" %>
<%@ include file="newindex.htm"%>
<html>
    <body>
        <form action="assignCompl1.jsp" method="post" name="ctis">
             <div style="position: absolute; width: 100px; height: 26px; z-index: 7; left: 771px; top: 262px" id="layer7">
				<b><a href="viewAssignCompl.jsp">
				<font face="Tahoma" size="2" color="#2D2E32">Back</font></a></b></div>
        <%!
        Connection con;
        Statement st;
        PreparedStatement pst;
        ResultSet rs;
        String uname,comp,cid,qual;
        int exp;
        %>
        <%
        uname=(String)session.getAttribute("uname");
        cid=request.getParameter("cid");
        comp=request.getParameter("comp");
        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 employee");        
        %>
            <div style="position: absolute; width: 364px; height: 220px; z-index: 3; left: 405px; top: 303px" id="layer5">
            	
            <table border="1" width="100%" bordercolor="#F8BD5A" id="table1" bordercolorlight="#F5A625">
				<tr>
					<td width="94"><font face="Arial Narrow">Complaint</font></td>
					<td><textarea rows="3" name="compl" cols="29" tabindex="1" value="<%=comp%>"><%=comp%></textarea></td>
				</tr>
				<tr>
					<td width="94"><font face="Arial Narrow">Employee</font></td>
					<td>
                                            <select size="1" name="emp" style="font-family: Miriam" tabindex="2">
                                                <option selected value="Select">Select</option>
                                                <% 
                                                while(rs.next())
                                                {
                                                uname=rs.getString(2);
                                                qual=rs.getString(12);
                                                exp=rs.getInt(13);
                                                %>
                                                <option value="<%=uname%>"><%=uname%>-<%=qual%>-<%=exp%>yrs</option>
                                        <%  
                                        }
                                        %>
					</select></td>
				</tr>
				<tr>
					<td width="94">&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td width="94">&nbsp;</td>
					<td>
					<input type="submit" value="Assign" name="B1" style="font-family: Miriam Fixed" tabindex="3">
                                        <input type="hidden" value="<%=cid%>" name=cid></td>
				</tr>
			</table>
            	
            </div>
           
            <div style="position: absolute; width: 100px; height: 27px; z-index: 5; left: 775px; top: 529px" id="layer9">
				<b><a href="login.jsp">
				<font face="Tahoma" size="2" color="#2D2E32">Logout</font></a></b></div>
           
           <div style="position: absolute; width: 374px; height: 25px; z-index: 4; left: 293px; top: 249px" id="layer6">
				<b><font face="Arial" size="4" color="#F5A625">Assign Complaint 
				to Employee</font></b></div>  
           
            <p>&nbsp;</p>
        </form>
    </body>
</html>
