<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8" %>
<%@page import="com.csc.library.entry.*,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.session.*,java.net.*,com.csc.library.report.*"%>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="REC020" class="com.csc.library.system.Task" scope="page" />
<%
	CheckNull chk=new CheckNull();
	REC020.setChannel(request, response);
   	ProcessEntry screen = (ProcessEntry)REC020.process("ProcessEntry","Process");
   	screen.process();
    ReportUDF rf=new ReportUDF();
	String module[]=rf.getSystemCode("APPLICANT_STATUS",screen.getUProfile().get("lang"));
  
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="../CSS/TISCO.css" >
<script language="JavaScript" src="../JS/SCREEN.js"></script>
<script type="text/javascript" src="../JS/DATEINPUT.js"></script>
<script type="text/javascript" src="../JS/VIEWCALENDAR.js"></script>
<script language="javascript">setLang("<%=screen.getUProfile().get("lang")%>");</script>
<script language="javascript">getTitleName();</script>
<script language="javascript">

function GoSave(){}
function GoUpdate(){}
function GoDelete(){}
function GoSearch(){}


function GoProcess() {
	with(document.cscform){
		__condition$applicant_status.value = "" ;
		for(var i=0;i<document.getElementsByName("__condition$applicantstatus").length;i++){
			
			if(document.getElementsByName("__condition$applicantstatus")[i].checked){
				if(i=='4'){
					__condition$applicant_status.value += "'"+9+"',";
				}else{
				__condition$applicant_status.value += "'"+i+"',";}
			}
		}
		__condition$applicant_status.value = __condition$applicant_status.value.substring(0,__condition$applicant_status.value.length-1)
			if(__condition$applicant_status.value ==""){
				
					alert("กรุณาเลือกเงื่อนไขใบสมัคร");

		}else{
		msg = (getLang()=="tha") ? "ลบข้อมูลใบสมัคร?" :"Do you want to delete application?"
		bCon=confirm( msg );
		if (bCon==true)	{
			//setCondition();			
			__cmd .value = "save";
			submit();
							}
		}
	}
}

</script>
</head>
<body leftmargin="0" topmargin="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')" >
<div align="center">
  <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
  <script language="javascript">initToolTips();</script>
  <form name="cscform" method="post">
    <input type="hidden" name="__cmd" value="">
    <input type="hidden" name="__screen" value="REC020">
    <input type="hidden" name="__help" value="">
    <input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
    <input type="hidden" name="__notNull" value="">
    <input type="hidden"name="__fixCon" value="">
    <input type="hidden" name="__referPage" value="">
    <input type="hidden" name="__process" value="">
    <input type="hidden" name="__tname" value="ลบข้อมูลใบสมัคร">
    <input type="hidden" name="__ename" value="Delete Application Data">
    <input type="hidden" name="__ptype" value="">
    <input type="hidden" name="__prclass" value="DeleteApplication">
    <input type="hidden" name="__calendar"  value="">
    <input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
    <input type="hidden" name="__goPage" value ="">
    <input type="hidden" name="__condition$applicant_status" value ="">
    <script language="javascript">getInputFormatDate();</script> <%=screen.getTagConfirm()%> <br>
    <center>
      <table align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td class="header" colspan="2" >REC020, <script language="JavaScript">swapLang("Deleting Application Process");</script> &nbsp; </td>
        </tr>
        <tr>
          <td><table cellpadding="0" cellspacing="0" class="inframe">
              <tr>
                <td><table border="0" cellpadding="0"  cellspacing="1" class="inframe">
                    <!-------------------------------------------------------------------------------------------------------->
                    <tr>
                      <td colspan="2" class="blankspace">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="columnlabel"><script language="JavaScript" type="text/javascript">swapLang("Applied Date Period");</script> &nbsp; </td>
                      <td><input type="text"  name="__condition$startdate" size="10" maxlength="10"  onKeyPress="chkIntegerOfDate(this.value);" onKeyUp="sysIsEdit();formatDate(this);" dir="" onBlur="chkInputDate(this);" onFocus="this.select();" />
                        <a href="javascript:viewCal('__condition$startdate')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image11" width="20" height="20" border="0" align="absmiddle" id="Image11" /></a>&nbsp;-&nbsp;<input type="text"  name="__condition$enddate" size="10" maxlength="10"onKeyPress="chkIntegerOfDate(this.value);" onKeyUp="sysIsEdit();formatDate(this);" dir="" onBlur="chkInputDate(this);" onFocus="this.select();" />
                        <a href="javascript:viewCal('__condition$enddate')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image12" width="20" height="20" border="0" align="absmiddle" id="Image12" /></a> </td>
                    </tr>
					<tr>
					   <td colspan="2">
							<div align="center">
								   <%
									String keyvalue[];
									for(int n=0;n<module.length;n++){
										keyvalue=module[n].split(",");
							  %>
								<input type="checkbox" name="__condition$applicantstatus" value="<%=keyvalue[0]%>"><%=keyvalue[1]%>
								<!-- <input type="checkbox" name="__chk" value="<%//=keyvalue[0]%>" groupid="uu"> -->
								<%
									}
								%>
							</div>
						<td>
					</tr>
                    <tr>
                <td  colspan="2"class="buttonline"><a href="javascript:GoProcess();"><img src="../IMAGES/BUTTON/PROCESS.gif" width="73" height="23" border="0" align="absmiddle" /></a></td>
                   </tr>
                    <!-------------------------------------------------------------------------------------------------------->
                </table></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td><table cellpadding="0" cellspacing="0" class="inframe">

            </table></td>
        </tr>

        <tr>
          <td class="bottom"></td>
        </tr>
      </table>
    </center>
  </form>
</div>
</body>
</html>