<%@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="CI003" class="com.csc.library.system.Task" scope="page"/>
<%
	CI003.setChannel(request,response);
	CI003.checkProfile();
	UProfile u=CI003.getUProfile();

 	InitialEnvironment en = new InitialEnvironment("GLOBAL");
    String picturePath=en.getValue("comprofile-dir");
	CheckNull chk=new CheckNull();
	String fileName=chk.chkNullString(request.getParameter("__fileName"));
	String fieldName=chk.chkNullString(request.getParameter("__fieldName"));
     
		session.setAttribute("finish","false");	  
%>
<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(){
       var filename="<%=fieldName%>";
	   var fName=eval("window.opener.document.cscform."+filename);
	   fName.value="";
	   window.close();
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<form  name="cscform"  enctype="multipart/form-data"  method="POST">
			

<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<input  type="hidden" name="__cmd"  value=""> 
			<input type="hidden" name="__screen" value="CI003"> 
			<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")%>"> 

 	<br>
  	<br>
  	<br>	
	<div align="center">
 	<table  cellpadding="0"  cellspacing="0">
    <tr > 
    	<td  class="header">CI003,&nbsp;
    	  <script language="javascript">swapLang("Delete File");</script>&nbsp;</td>
   	</tr>
    <tr > 
    	<td  colspan="2">
			<table width="630" border="0">
            <tr> 
              	<td width="556">           	    <p>&nbsp;</p>
           	    <center>
           	      DELETE FILE ..........<br>
           	      Please wait...............</center>
           	    <p>&nbsp;</p></td>
            </tr>
      		</table> 
		</td>
   	</tr>
    <tr> 
    	<td  class="bottom"></td>
  	</tr>	  
    </table>
  </div>
</form>
<%
	if(fileName.length()>0){  
	try{
	  File f = new File(picturePath+fileName);
      f.delete();
	  }catch (Exception e){ }
	  session.setAttribute("finish","true");
	  }

%>
<script language="javascript">closeUpload();</script>
</body>
</html>