<%@page contentType="text/html; charset=UTF-8"%> <%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%> <%@page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*" %> <%@page import="java.util.*,java.net.*,java.io.*,com.csc.upload.*"%> <jsp:useBean id="PRU0393" class="com.csc.library.system.Task" scope="page"/> <% PRU0393.setChannel(request,response); PRU0393.checkProfile(); UProfile u=PRU0393.getUProfile(); session.setAttribute("finish","false"); CheckNull chk=new CheckNull(); InitialEnvironment en = new InitialEnvironment("GLOBAL"); String uploadDir = en.getValue("RECRUIT_UPLOAD-dir"); String fileDir = chk.chkNullString(request.getParameter("__uploadType")); String fieldName = chk.chkNullString(request.getParameter("__fieldName")); String fileName = chk.chkNullString(request.getParameter("__fileName")); String filePath = uploadDir +fileDir; FileDownloadUtils downloadutils = new FileDownloadUtils("RECRUIT_UPLOAD", "dir", "defaultperson.jpg", "PICTURE"); String path = downloadutils.getViewURL(); %> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="../CSS/TISCO.css" rel="stylesheet" type="text/css"> <link href="../CSS/MENU.css" rel="stylesheet" type="text/css"> <script language="JavaScript" src="../JS/SCREEN.js"></script> <script src="../JS/VIEWCALENDAR.js"></script> <script language='javascript'>setLang('<%=u.get("lang")%>');</script> <script language="JavaScript" > function closeUpload(){ with(document.cscform){ var fieldName = window.opener.document.cscform.<%=fieldName%>.value=""; if(__uploadType.value.toLowerCase()== "picture"){ window.opener.document.cscform.employeePic.src="<%=path %>"; } } window.close(); } </script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <form name="cscform" enctype="multipart/form-data" method="POST"> <input type="hidden" name="__cmd" value=""> <input type="hidden" name="__screen" value="PRU0393"> <input type="hidden" name="__help" value=""> <input type="hidden" name="__fixCon" value=""> <input type="hidden" name="__companyid" value="<%=u.get("companyid")%>"> <input type="hidden" name="__language" value ="<%=u.get("lang")%>"> <input type="hidden" name="__uploadType" value="<%=fileDir%>"> <br> <br> <br> <div align="center"> <table cellpadding="0" cellspacing="0"> <tr > <td class="header">PRU0393, <script language="javascript">swapLang("File Deletion Page");</script> </td> </tr> <tr > <td colspan="2"> <table width="630" border="0"> <tr> <td width="556"><p> </p> <center> DELETE FILE ..........<br> Please wait............... </center> <p> </p></td> </tr> </table></td> </tr> <tr> <td class="bottom"></td> </tr> </table> </div> </form> <% if(fileName.length()>0){ try{ if(!fileName.equalsIgnoreCase("defaultperson.jpg")){ File file = new File(filePath,fileName); file.delete(); } }catch (Exception e){ } session.setAttribute("finish","true"); } %> <script language="javascript">closeUpload();</script> </body> </html>