import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.math.*;
import java.io.*;
import java.util.*;
import Configure;

class Supervisor{
    public  static void printSupervisorLoginCode(HttpServletRequest request,HttpServletResponse response)
	throws ServletException, IOException{
	try{
	    PrintWriter  out;
	    String  title = "WELCOME USER";
		    
	    response.setContentType("text/html"); 
	    out = response.getWriter();
	   
	    		
	    System.out.println("correctlogin");
	    out.println("<HTML><HEAD><TITLE>");
	    out.println(title);
	    out.println("</TITLE></HEAD><BODY>");
	    out.println("<B>WELCOME Supervisor</BLINK><B>");
	    out.println("<h3>you logged in successfully </br><h3>");
	    out.println("<FORM ACTION=\"" + Configure.SERVLET_SERVER + ":" + Configure.SERVLET_PORT + "/" + Configure.SERVLET_PATH + "/SupervisorRequests\" method =\"GET\">");
	    out.println("<TABLE  CELLPADDING=4 BORDER=2>");
	    
		    
	    EasyPrint.printButton("submit","newcomplaints","Show new complaints",out);
	    EasyPrint.printButton("submit","showworkers","show workers",out);
	    EasyPrint.printButton("submit","assign","Assign Workers",out);
	    EasyPrint.printButton("submit","chngstatusbutton","Change Status",out);    
	    EasyPrint.printButton("submit","workersunderme","Show Workers Under Me",out);
	    EasyPrint.printButton("submit","logout","Logout",out);
	    EasyPrint.printButton("hidden","fromfirstpage","fromanalystquerypage",out);    
	    
	    
	    out.println("</TABLE></FORM></BODY></HTML>");
	  
	    
	    out.close();
	}catch(Exception sqle){
	    System.out.println( "exception in get " );
	    System.out.println(sqle);
	    
	}
    }
    

    
    public  static void errorCode(HttpServletRequest request,HttpServletResponse response)
	throws ServletException, IOException{
	try{
	    PrintWriter  out;
	    String  title = "WELCOME USER";
	    
	    response.setContentType("text/html"); 
	    out = response.getWriter();
	    
	   
	    out.println("<HTML><HEAD><TITLE>");
		title = "LOGIN FAILURE";
		out.println(title);
		out.println("</TITLE></HEAD><BODY>");
		out.print("<a href=\"http://localhost/login.html\"> Try Again");
		out.println("</BODY></HTML>");
		out.close();
	
	}catch(Exception sqle){
	    System.out.println( "exception in get " );
	    System.out.println(sqle);
	}   
    }
    
}

















