<%@ 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>        
                    <%!
                    Connection con;
                    Statement st;
                    PreparedStatement pst;
                    ResultSet rs;
                    String cid,comp,uname,emp,status,sol;
                    java.util.Date sdate,edate;
                    int i;
                    %>
                    
                    <%
                    cid=request.getParameter("cid");
                    comp=request.getParameter("comp");
                    emp=(String)session.getAttribute("uname");
                    sol=request.getParameter("sol");
                    status="Solved";
                    out.println("emp: "+emp);
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","c2t","c2t");
                    pst=con.prepareStatement("update complaint set emp=?,edate=to_date(sysdate),sol=?,status=? where cid=?");
                    pst.setString(1,emp);
                    pst.setString(2,sol);
                    pst.setString(3,status);
                    pst.setString(4,cid);
                    pst.execute();
                    %>
                    <jsp:include page="viewcomp.jsp"></jsp:include>
    
        <div style="position: absolute; width: 380px; height: 29px; z-index: 3; left: 521px; top: 277px" id="layer4">
			<b><font face="Tahoma" size="2" color="#17CA1C">Solution Submitted successfully...</font></b></div>
			          
<p>&nbsp;</p>
