 <?php
 if(isset($_REQUEST['submit']))
 {
	$emp_code	            = mysql_real_escape_string($_POST['emp_code']);
	$emp_name               = ucwords(strtolower(mysql_real_escape_string($_POST['emp_name'])));
	$emp_name_alias         = mysql_real_escape_string($_POST['emp_name_alias']);
	$desiganation           = strtoupper(mysql_real_escape_string($_POST['desiganation'])); 	
	$gender		            = mysql_real_escape_string($_POST['gender']); 	
	$head_qtrer	            = mysql_real_escape_string($_POST['head_qtrer']);
	$state		            = mysql_real_escape_string($_POST['state']);
	$tsi	            	= mysql_real_escape_string($_POST['tsi']);
	$tso		            = mysql_real_escape_string($_POST['tso']);
	$asm		            = mysql_real_escape_string($_POST['asm']);
	$st_head	            = mysql_real_escape_string($_POST['st_head']);
	$fnct_head	            = mysql_real_escape_string($_POST['fnct_head']);
	$dob		            = date("Y-m-d",strtotime($_POST['dob']));
	$mobil_no	            = mysql_real_escape_string($_POST['mobil_no']);
	$marital_st	            = mysql_real_escape_string($_POST['marital_st']);
	$fname		            = mysql_real_escape_string($_POST['fname']);
	$aadhar_no	            = mysql_real_escape_string($_POST['aadhar_no']);
	$uan_no					= mysql_real_escape_string($_POST['uan_no']);
	$bank_name	            = mysql_real_escape_string($_POST['bank_name']);
	$bank_name_alias        = mysql_real_escape_string($_POST['bank_name_alias']);
	$branch_name            = mysql_real_escape_string($_POST['branch_name']);
	$branch_city	        = mysql_real_escape_string($_POST['branch_city']);
	$branch_ifsc            = strtoupper(mysql_real_escape_string($_POST['branch_ifsc']));
	$account_no	            = mysql_real_escape_string($_POST['account_no']);
	$salary_rate            = mysql_real_escape_string($_POST['salary_rate']);	
	$da_rate	            = mysql_real_escape_string($_POST['da_rate']);
	$phone_rate	            = mysql_real_escape_string($_POST['phone_rate']);
	$ta_rate				= mysql_real_escape_string($_POST['ta_rate']);
	$travel_exp				= mysql_real_escape_string($_POST['travel_exp']);
	$payment_status         = mysql_real_escape_string($_POST['payment_status']);
	$uan_status             = mysql_real_escape_string($_POST['uan_status']);
	$payment_status_2       = mysql_real_escape_string($_POST['payment_status_2']);	
	$uan_status_2           = mysql_real_escape_string($_POST['uan_status_2']);		
	
	$jul_sal            	= mysql_real_escape_string($_POST['jul_sal']);	
	$jul_paid       	    = mysql_real_escape_string($_POST['jul_paid']);	
	$jul_code    	        = mysql_real_escape_string($_POST['jul_code']);	
	$jul_dis_name           = mysql_real_escape_string($_POST['jul_dis_name']);	
	$jul_status	            = "Pendding";
	if(isset($_POST['jul_status']))	
	{
	 $jul_status	        = mysql_real_escape_string($_POST['jul_status']);
	}
	
	$aug_sal	            = mysql_real_escape_string($_POST['aug_sal']);	
	$aug_paid	            = mysql_real_escape_string($_POST['aug_paid']);	
	$aug_code	            = mysql_real_escape_string($_POST['aug_code']);	
	$aug_dis_name           = mysql_real_escape_string($_POST['aug_dis_name']);	
	$aug_status	            = "Pendding";	
	if(isset($_POST['aug_status']))	
	{
	 $aug_status	        = mysql_real_escape_string($_POST['aug_status']);
	}
			
	$sept_sal	            = mysql_real_escape_string($_POST['sept_sal']);	
	$sept_paid              = mysql_real_escape_string($_POST['sept_paid']);	
	$sept_code              = mysql_real_escape_string($_POST['sept_code']);	
	$sept_dis_name          = mysql_real_escape_string($_POST['sept_dis_name']);
	$sep_status	            = "Pendding";	
	if(isset($_POST['sep_status']))	
	{
	 $sep_status	        = mysql_real_escape_string($_POST['sep_status']);
	}
	
	$oct_sal	            = mysql_real_escape_string($_POST['oct_sal']);	
	$oct_paid               = mysql_real_escape_string($_POST['oct_paid']);	
	$oct_code               = mysql_real_escape_string($_POST['oct_code']);	
	$oct_dis_name           = mysql_real_escape_string($_POST['oct_dis_name']);
	$oct_status	            = "Pendding";	
	if(isset($_POST['oct_status']))	
	{
	 $oct_status	        = mysql_real_escape_string($_POST['oct_status']);
	}
	$remark					= mysql_real_escape_string($_POST['remark']);	
	$front_photo			= '';
	$back_photo				= '';
	$sql_img				= '';
	if(!empty($_FILES['front_photo']['name']))
	{
		$front_photo        = rand().$_FILES['front_photo']['name'];
		$sql_img			.= " , `front_photo`='$front_photo' ";
		move_uploaded_file($_FILES['front_photo']['tmp_name'],"page_image/".$front_photo);	
	}	
	if(!empty($_FILES['back_photo']['name']))
	{
		$back_photo         = rand().$_FILES['back_photo']['name'];
		if(!empty($sql_img))
		{
			$sql_img		.= " , ";
		}
		$sql_img			.= " `back_photo`='$back_photo' ";
		move_uploaded_file($_FILES['back_photo']['tmp_name'],"page_image/".$back_photo);	
	}	
	if($_SESSION['userid']==4)
	{
		$sql_img		 .= ", `jul_status`='$jul_status', `aug_status`='$aug_status', `sep_status`='$sep_status' ";
	}
mysql_query("insert into `tbl_emp_records` set `emp_code`='$emp_code', `emp_name`='$emp_name', `emp_name_alias`='$emp_name_alias', `desiganation`='$desiganation', `gender`='$gender', `head_qtrer`='$head_qtrer', `state`='$state', `tsi`='$tsi', `tso`='$tso', `asm`='$asm', `st_head`='$st_head', `fnct_head`='$fnct_head', `dob`='$dob', `mobil_no`='$mobil_no', `marital_st`='$marital_st', `fname`='$fname', `aadhar_no`='$aadhar_no', `uan_no`='$uan_no' ,`bank_name`='$bank_name', `bank_name_alias`='$bank_name_alias', `branch_name`='$branch_name', `branch_city`='$branch_city', `branch_ifsc`='$branch_ifsc', `account_no`='$account_no', `salary_rate`='$salary_rate', `da_rate`='$da_rate', `phone_rate`='$phone_rate',`ta_rate`='$ta_rate',`travel_exp`='$travel_exp',`jul_sal`='$jul_sal', `jul_paid`='$jul_paid', `jul_code`='$jul_code', `jul_dis_name`='$jul_dis_name', `aug_sal`='$aug_sal', `aug_paid`='$aug_paid', `aug_code`='$aug_code', `aug_dis_name`='$aug_dis_name', `sept_sal`='$sept_sal', `sept_paid`='$sept_paid', `sept_code`='$sept_code', `sept_dis_name`='$sept_dis_name',`oct_sal`='$oct_sal',`oct_paid`='$oct_paid',`oct_code`='$oct_code',`oct_dis_name`='$oct_dis_name',`oct_status`='$oct_status',`remark`='$remark',`payment_status`='$payment_status', `uan_status`='$uan_status',`payment_status_2`='$payment_status_2', `uan_status_2`='$uan_status_2' $sql_img  ")or die(mysql_error());
	 $_SESSION['msg'] = 'Employee Added Sucessfully!!';
	 header("location:home.php?page=page");	 
 }
 if(isset($_REQUEST['update']))
 {
	$id                     = $_POST['id'];
	$emp_code	            = mysql_real_escape_string($_POST['emp_code']);
	$emp_name               = ucwords(strtolower(mysql_real_escape_string($_POST['emp_name'])));
	$emp_name_alias         = mysql_real_escape_string($_POST['emp_name_alias']);
	$desiganation           = strtoupper(mysql_real_escape_string($_POST['desiganation'])); 	
	$gender		            = mysql_real_escape_string($_POST['gender']); 	
	$head_qtrer	            = mysql_real_escape_string($_POST['head_qtrer']);
	$state		            = mysql_real_escape_string($_POST['state']);
	$tsi	            	= mysql_real_escape_string($_POST['tsi']);
	$tso		            = mysql_real_escape_string($_POST['tso']);
	$asm		            = mysql_real_escape_string($_POST['asm']);
	$st_head	            = mysql_real_escape_string($_POST['st_head']);
	$fnct_head	            = mysql_real_escape_string($_POST['fnct_head']);
	$dob		            = date("Y-m-d",strtotime($_POST['dob']));
	$mobil_no	            = mysql_real_escape_string($_POST['mobil_no']);
	$marital_st	            = mysql_real_escape_string($_POST['marital_st']);
	$fname		            = mysql_real_escape_string($_POST['fname']);
	$aadhar_no	            = mysql_real_escape_string($_POST['aadhar_no']);
	$uan_no					= mysql_real_escape_string($_POST['uan_no']);
	$bank_name	            = mysql_real_escape_string($_POST['bank_name']);
	$bank_name_alias        = mysql_real_escape_string($_POST['bank_name_alias']);
	$branch_name            = mysql_real_escape_string($_POST['branch_name']);
	$branch_city	        = mysql_real_escape_string($_POST['branch_city']);
	$branch_ifsc            = strtoupper(mysql_real_escape_string($_POST['branch_ifsc']));
	$account_no	            = mysql_real_escape_string($_POST['account_no']);
	$salary_rate            = mysql_real_escape_string($_POST['salary_rate']);	
	$da_rate	            = mysql_real_escape_string($_POST['da_rate']);
	$phone_rate	            = mysql_real_escape_string($_POST['phone_rate']);
	$ta_rate				= mysql_real_escape_string($_POST['ta_rate']);
	$travel_exp				= mysql_real_escape_string($_POST['travel_exp']);
	$payment_status         = mysql_real_escape_string($_POST['payment_status']);
	$old_payment_status     = mysql_real_escape_string($_POST['old_payment_status']);
	$uan_status             = mysql_real_escape_string($_POST['uan_status']);
	$payment_status_2       = mysql_real_escape_string($_POST['payment_status_2']);	
	$uan_status_2           = mysql_real_escape_string($_POST['uan_status_2']);		
	$old_uan_status         = mysql_real_escape_string($_POST['old_uan_status']);	
	
	$jul_sal            	= mysql_real_escape_string($_POST['jul_sal']);	
	$jul_paid       	    = mysql_real_escape_string($_POST['old_jul_paid']);	
	if(isset($_POST['jul_paid']))
	{
		$jul_paid    	    = mysql_real_escape_string($_POST['jul_paid']);	
	}
	$jul_code    	        = mysql_real_escape_string($_POST['jul_code']);		
	$jul_dis_name           = mysql_real_escape_string($_POST['jul_dis_name']);
	$jul_status	            = mysql_real_escape_string($_POST['old_jul_status']);	
	if(isset($_POST['jul_status']))	
	{
	 $jul_status	        = mysql_real_escape_string($_POST['jul_status']);
	}		
	$aug_sal	            = mysql_real_escape_string($_POST['aug_sal']);	
	$aug_paid	            = mysql_real_escape_string($_POST['old_aug_paid']);	
	if(isset($_POST['aug_paid']))
	{
		$aug_paid    	    = mysql_real_escape_string($_POST['aug_paid']);	
	}	
	$aug_code	            = mysql_real_escape_string($_POST['aug_code']);	
	$aug_dis_name           = mysql_real_escape_string($_POST['aug_dis_name']);	
	$aug_status	            = mysql_real_escape_string($_POST['old_aug_status']);	
	if(isset($_POST['aug_status']))	
	{
	 $aug_status	        = mysql_real_escape_string($_POST['aug_status']);
	}
		
	$sept_sal	            = mysql_real_escape_string($_POST['sept_sal']);	
	$sept_paid              = mysql_real_escape_string($_POST['old_sept_paid']);
	if(isset($_POST['sept_paid']))
	{
		$sept_paid    	    = mysql_real_escape_string($_POST['sept_paid']);	
	}	
	$sept_code              = mysql_real_escape_string($_POST['sept_code']);	
	$sept_dis_name          = mysql_real_escape_string($_POST['sept_dis_name']);
	$sep_status	            = mysql_real_escape_string($_POST['old_sep_status']);	
	if(isset($_POST['sep_status']))	
	{
	 $sep_status	        = mysql_real_escape_string($_POST['sep_status']);
	}
	
	$oct_sal	            = mysql_real_escape_string($_POST['oct_sal']);	
	$oct_paid               = mysql_real_escape_string($_POST['oct_paid']);	
	$oct_code               = mysql_real_escape_string($_POST['oct_code']);	
	$oct_dis_name           = mysql_real_escape_string($_POST['oct_dis_name']);
	$oct_status	            = "Pendding";	
	if(isset($_POST['oct_status']))	
	{
	 $oct_status	        = mysql_real_escape_string($_POST['oct_status']);
	}
	$remark					= mysql_real_escape_string($_POST['remark']);	
	if($uan_status !=$old_uan_status)
	{
		$sql_uan			= mysql_query(" insert into `tbl_check_status` set `login_id`='".$_SESSION['userid']."', `emp_id`='$id', `type`='UAN', `old`='$old_uan_status', `new`='$uan_status', `datetime`=NOW() ")or die(mysql_error());
	}
	if($payment_status !=$old_payment_status)
	{
		$sql_uan			= mysql_query(" insert into `tbl_check_status` set `login_id`='".$_SESSION['userid']."', `emp_id`='$id', `type`='PAYMENT', `old`='$old_payment_status', `new`='$payment_status', `datetime`=NOW() ")or die(mysql_error());
	}
	
	$front_photo			= '';
	$back_photo				= '';
	$sql_img				= '';
	if(!empty($_FILES['front_photo']['name']))
	{
		$front_photo        = rand().$_FILES['front_photo']['name'];
		$sql_img			.= " ,`front_photo`='$front_photo' ";
		move_uploaded_file($_FILES['front_photo']['tmp_name'],"page_image/".$front_photo);	
	}
	
	if(!empty($_FILES['back_photo']['name']))
	{
		$back_photo         = rand().$_FILES['back_photo']['name'];
		$sql_img			.= ", `back_photo`='$back_photo' ";
		move_uploaded_file($_FILES['back_photo']['tmp_name'],"page_image/".$back_photo);	
	}	
	if($_SESSION['userid']==4)
	{
		$sql_img		 .= ", `jul_status`='$jul_status', `aug_status`='$aug_status', `sep_status`='$sep_status' ";
	}
	mysql_query("update `tbl_emp_records` set `emp_code`='$emp_code', `emp_name`='$emp_name', `emp_name_alias`='$emp_name_alias', `desiganation`='$desiganation', `gender`='$gender', `head_qtrer`='$head_qtrer', `state`='$state', `tsi`='$tsi', `tso`='$tso', `asm`='$asm', `st_head`='$st_head', `fnct_head`='$fnct_head', `dob`='$dob', `mobil_no`='$mobil_no', `marital_st`='$marital_st', `fname`='$fname', `aadhar_no`='$aadhar_no', `uan_no`='$uan_no', `bank_name`='$bank_name', `bank_name_alias`='$bank_name_alias', `branch_name`='$branch_name', `branch_city`='$branch_city', `branch_ifsc`='$branch_ifsc', `account_no`='$account_no', `salary_rate`='$salary_rate', `da_rate`='$da_rate', `phone_rate`='$phone_rate',`ta_rate`='$ta_rate',`travel_exp`='$travel_exp',`jul_sal`='$jul_sal', `jul_paid`='$jul_paid', `jul_code`='$jul_code', `jul_dis_name`='$jul_dis_name', `aug_sal`='$aug_sal', `aug_paid`='$aug_paid', `aug_code`='$aug_code', `aug_dis_name`='$aug_dis_name', `sept_sal`='$sept_sal', `sept_paid`='$sept_paid', `sept_code`='$sept_code', `sept_dis_name`='$sept_dis_name',`oct_sal`='$oct_sal',`oct_paid`='$oct_paid',`oct_code`='$oct_code',`oct_dis_name`='$oct_dis_name',`oct_status`='$oct_status',`remark`='$remark',`payment_status`='$payment_status', `uan_status`='$uan_status',`payment_status_2`='$payment_status_2', `uan_status_2`='$uan_status_2' $sql_img where `id`='$id'") or die(mysql_error());	
	$_SESSION['msg'] = 'Employee Details Updated Sucessfully!!';
	 header("location:home.php?page=page");	 
 }
 ?>           
<div class="row-fluid" >
    <div class="span12">
        <div class="head clearfix">
            <div class="isw-ok"></div>
            <h1><?php if(isset($_REQUEST['page_id'])) { echo "Modify";}else {echo "Add";}?> Employee</h1>
            <h1 style="float: right; margin-right: 10px;"><a href="home.php?page=page" style="color:#FFF;">Employee List</a></h1>
        </div>
        <div class="block-fluid">
            <form class="form-horizontal" onsubmit="return get_validation();" action="" method="post" enctype="multipart/form-data">
              <fieldset>
              <?php
			   if(isset($_REQUEST['page_id']))
			   {
				   $id            =       $_REQUEST['page_id'];
				   $modify_menu   =       mysql_query("SELECT * FROM `tbl_emp_records` WHERE `id` = '$id'");
				   $show_modify   =       mysql_fetch_array($modify_menu);
			   }
			  ?>
              <input type="hidden" name="id" placeholder="Page Name" <?php if(isset($_REQUEST['page_id'])){?> required value="<?php echo $show_modify['id'];  ?>"<?php } ?> id="txt_name" autocomplete="off" />
                
                     <div class="row-form clearfix">
                        <div class="span3">
                        	<label>Employee Code</label>
                        	<input type="text" name="emp_code" placeholder="Employee Code" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['emp_code'];?>"<?php } ?> autocomplete="off" id="emp_code" onkeyup="capital_letter('emp_code');" required/>
                        </div>
                        <div class="span3">
                        	<label>Employee Name</label>
                        	<input type="text" name="emp_name" placeholder="Employee Name" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['emp_name'];  ?>"<?php } ?> <?php if( isset($show_modify['uan_status'])&&($show_modify['uan_status']=='Done')){echo "readonly='readonly'"; }?> autocomplete="off" id="emp_name" onkeyup="capital_letter('emp_name');" required/>
                        </div>
                        <div class="span3">
                        	<label>Employee Name Alias</label>
                        	<input type="text" name="emp_name_alias" placeholder="Employee Name Alias" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['emp_name_alias'];  ?>"<?php } ?> id="emp_name_alias" onkeyup="capital_letter('emp_name_alias');" required/>
                        </div>
                        <div class="span3">
                        	<label>Designation</label>
                        	<input type="text" name="desiganation" autocomplete="off" required placeholder="Designation" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['desiganation'];?>"<?php } ?> id="desiganation" onkeyup="capital_letter('desiganation');"/>
                        </div>
                        
                     </div>
                     <div class="row-form clearfix">
                     <div class="span3">
                        	<label>Headquarter District</label>
                        	<input type="text" name="head_qtrer" autocomplete="off" required placeholder="Headquarter District" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['head_qtrer'];?>"<?php } ?> id="head_qtrer"  onkeyup="capital_letter('head_qtrer');"/>
                        </div>
                        <div class="span3">
                        	<label>State</label>
                            <select name="state" required>
                            <option value="">Select State</option>
                            <?php
							if($_SESSION['userid']==4)
							{
								$st		= array();
								$sql_st	= mysql_query("SELECT distinct `state` FROM `tbl_emp_records` ORDER BY `state` ASC ")or die(mysql_error());
								while($row_st= mysql_fetch_array($sql_st))
								{
									array_push($st,$row_st['state']);
								}
							}
							else
							{
								$st	  = explode('&',$_SESSION['post']);
							}
							foreach($st as $key)
							{
								$type = '';
								if(isset($_REQUEST['page_id'])&&($show_modify['state']==$key)){ $type ='selected';}
								echo "<option value='$key' $type>$key</option>";
							}
							?>
                            </select>
                        </div>
                        <div class="span3">
                        	<label>TSI</label>
                        	<input type="text" name="tsi" autocomplete="off" placeholder="TSI" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['tsi'];  ?>"<?php } ?> id="tsi" onkeyup="capital_letter('tsi');" required/>
                        </div>   
                        <div class="span3">
                        	<label>TSO</label>
                        	<input type="text" name="tso" autocomplete="off" required placeholder="TSO" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['tso'];?>"<?php } ?> id="tso" onkeyup="capital_letter('tso');"/>
                        </div>
                        
                     </div>
                     <div class="row-form clearfix">
                     <div class="span3">
                        	<label>ASM</label>
                        	<input type="text" name="asm" autocomplete="off" required placeholder="ASM" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['asm'];?>"<?php } ?> id="asm" onkeyup="capital_letter('tso');"/>
                        </div>
                        <div class="span3">
                        	<label>State Head</label>
                        	<input type="text" name="st_head" autocomplete="off" placeholder="State Head" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['st_head'];  ?>"<?php } ?> id="st_head" onkeyup="capital_letter('st_head');" required/>
                        </div>
                        <div class="span3">
                        	<label>Functional Head</label>
                        	<input type="text" required autocomplete="off" name="fnct_head" placeholder="Functional Head" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['fnct_head'];  ?>"<?php } ?> id="fnct_head" onkeyup="capital_letter('fnct_head');"/>
                        </div>
                        <div class="span3">
                        	<label>Date of Birth</label>
                        	<input type="text" <?php if( isset($show_modify['uan_status'])&&($show_modify['uan_status']=='Done')){echo "readonly='readonly'"; }else {echo 'class="datetimepicker2"';}?> required autocomplete="off" name="dob" placeholder="Date of Birth" <?php if(isset($_REQUEST['page_id'])){?> value="<?php if( ($show_modify['dob']!='0000-00-00') &&($show_modify['dob']!='1970-01-01')&&($show_modify['dob']!='1969-12-31') ) {echo date("d-m-Y",strtotime($show_modify['dob']));}?>"<?php } ?> id="dob"/>
                        </div>
                        
                     </div>
                     <div class="row-form clearfix">
                     	<div class="span3">
                        	<label>Mobile No.</label>
                        	<input type="text" required autocomplete="off" name="mobil_no" placeholder="Mobile" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['mobil_no'];?>"<?php } ?> onkeypress='return isNumberKey(event)' id="mobil_no" maxlength="10" onkeyup="capital_letter('mobil_no');"/>
                        </div>
                        <div class="span3">
                        	<label>Gender</label>
                        	<input type="radio" <?php if(isset($show_modify['gender'])&&($show_modify['gender']=='Male')){echo "checked"; }?> class="gender" onclick="get_hus_fat();" name="gender" value="Male" />Male
                            <input type="radio" <?php if(isset($show_modify['gender'])&&($show_modify['gender']=='Female')){echo "checked"; }?> class="gender" name="gender" onclick="get_hus_fat();" value="Female" />Female
                            <br /><span style="color:red;" id="gender_err"></span>
                        </div>
                        <div class="span3">
                        	<label>Marital Status</label>
                        	<select name="marital_st" onchange="get_hus_fat();" id="marital_st" required>
                            	<option value="">Select One</option>
                                <option value="MARRIED" <?php if(isset($show_modify['marital_st'])&&($show_modify['marital_st']=='MARRIED')){echo "selected"; }?>>MARRIED</option>
                                <option value="UN MARRIED" <?php if(isset($show_modify['marital_st'])&&($show_modify['marital_st']=='UN MARRIED')){echo "selected"; }?>>UN MARRIED</option>
                            </select>
                        </div>
                        <div class="span3">
                        	<label id="fname_label">Father's Name</label>
                        	<input type="text" autocomplete="off" required name="fname" placeholder="Father's/Huband Name" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['fname'];?>"<?php } ?> id="fname" onkeyup="capital_letter('fname');"/>
                        </div>
                        
                     </div>
                     <div class="row-form clearfix"> 
                     	<div class="span3">
                        	<label>Aadhaar No.</label>
                        	<input type="text" name="aadhar_no" autocomplete="off" placeholder="Aadhaar No."onkeypress='return isNumberKey(event)' <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo str_replace('-','',$show_modify['aadhar_no']);  ?>"<?php } ?> id="aadhar_no" maxlength="12" required/>
                        </div>
                        <div class="span3">
                        	<label>UAN NO.</label>
                        	<input type="text" name="uan_no" autocomplete="off" placeholder="UAN NO."onkeypress='return isNumberKey(event)' <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['uan_no'];  ?>"<?php } ?> id="uan_no" />
                        </div>                       
                        <div class="span3">
                        	<label>Bank Name</label>
                        	<input type="text" name="bank_name" autocomplete="off" placeholder="Bank Name" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['bank_name'];  ?>"<?php } ?> id="bank_name" required onkeyup="capital_letter('bank_name');"/>
                        </div>
                        <div class="span3">
                        	<label>Bank Name Alias</label>
                        	<input type="text" name="bank_name_alias" autocomplete="off" placeholder="Bank Name Alias" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['bank_name_alias'];  ?>"<?php } ?> required id="bank_name_alias" onkeyup="capital_letter('bank_name_alias');"/>
                        </div>                                                
                     </div>
                     <div class="row-form clearfix"> 
                     	<div class="span3">
                        	<label>Branch Name</label>
                        	<input type="text" name="branch_name" autocomplete="off" placeholder="Branch Name" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['branch_name'];?>"<?php } ?> required id="branch_name" onkeyup="capital_letter('branch_name');"/>
                        </div>
                        <div class="span3">
                        	<label>Branch City / Town</label>
                        	<input type="text" name="branch_city" autocomplete="off" required placeholder="Branch City / Town" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['branch_city'];  ?>"<?php } ?> id="branch_city" onkeyup="capital_letter('branch_city');"/>
                        </div>                    
                        <div class="span3">
                        	<label>Branch IFSC Code</label>
                        	<input type="text" name="branch_ifsc" autocomplete="off" placeholder="Branch IFSC Code" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['branch_ifsc'];  ?>"<?php } ?> required id="branch_ifsc" style="text-transform:uppercase;" maxlength="11"/>
                            <span id="branch_ifsc_err" style="color:red;"></span>
                        </div>                        
                     </div>
                     <div class="row-form clearfix">    
                     	<div class="span3">
                        	<label>Account Nnumber</label>
                        	<input type="text" name="account_no" autocomplete="off" placeholder="Account Nnumber" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['account_no'];  ?>"<?php } ?> required id="account_no" onkeypress="return isNumberKey(event)"/>
                        </div>
                        <div class="span3">
                        	<label>Confirm Account Nnumber</label>
                        	<input type="text" name="re_account_no" autocomplete="off" placeholder="Re-Enter Account Nnumber" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['account_no'];  ?>"<?php } ?> required id="re_account_no" onkeypress="return isNumberKey(event)" />
                        </div>
                        <div class="span3">
                        	<label>Payment Status<span style="color:red;">*</span></label>
                        	<select name="payment_status_2" id="payment_status_2" required>
                            	<option value="">Select One</option>
                                <option value="Pendding" <?php if( isset($show_modify['payment_status_2'])&&(($show_modify['payment_status_2']=='') ||($show_modify['payment_status_2']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                                <option value="Complete" <?php if( isset($show_modify['payment_status_2'])&&($show_modify['payment_status_2']=='Complete')){echo "selected"; }?>>Complete</option>
                            </select>
                        </div>
                        <div class="span3">
                        	<label>UAN Status <span style="color:red;">*</span></label>
                        	<select name="uan_status_2" id="uan_status_2" required>
                            	<option value="">Select One</option>
                                <option value="Not Done" <?php if( isset($show_modify['uan_status_2'])&&(($show_modify['uan_status_2']=='') ||($show_modify['uan_status_2']=='Not Done'))){echo "selected"; }?>>Not Done</option>
                                <option value="Done" <?php if(isset($show_modify['uan_status_2'])&&($show_modify['uan_status_2']=='Done')){echo "selected"; }?>>Done</option>
                            </select>
                        </div>  
                     </div>
                     <div class="row-form clearfix">                        
                        <div class="span3">
                        	<label>Monthly Payout</label>
                        	<input type="text" name="salary_rate" autocomplete="off" placeholder="Monthly Payout" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['salary_rate'];  ?>"<?php } ?> required id="salary_rate" onkeypress="return isNumberKey(event)"/>
                        </div>
                        <div class="span3">
                        	<label>DA Rate (per Working Day)</label>
                        	<input type="text" name="da_rate" autocomplete="off" placeholder="DA Rate (per Working Day)" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['da_rate'];  ?>"<?php } ?> id="da_rate" required onkeypress="return isNumberKey(event)"/>
                        </div>
                        <div class="span3">
                        	<label>Phone Rate (per Working Day)</label>
                        	<input type="text" name="phone_rate" autocomplete="off" placeholder="Phone Rate (per Day)" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['phone_rate'];  ?>"<?php } ?> id="phone_rate" onkeypress="return isNumberKey(event)" required/>
                        </div>
                        <div class="span3">
                        	<label>TA Rate (per Working Day)</label>
                        	<input type="text" name="ta_rate" autocomplete="off" placeholder="TA Rate (per Working Day)" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['ta_rate'];  ?>"<?php } ?> id="ta_rate" onkeypress="return isNumberKey(event)" required/>
                        </div>
                        </div>
                     <div class="row-form clearfix">
                        <div class="span3">
                        	<label>Travelling Exp.(per month)</label>
                        	<input type="text" name="travel_exp" autocomplete="off" placeholder="Travelling Exp.(per month)" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['travel_exp'];  ?>"<?php } ?> id="travel_exp" onkeypress="return isNumberKey(event)" required/>
                        </div>
                     </div>
                     <div class="row-form clearfix">
                        <div class="span3" <?php if($_SESSION['userid']!=4){?>style="display:none"<?php } ?>>
                        	<label>Payment Status</label>
                            <input type="hidden" name="old_payment_status" value="<?php if( isset($show_modify['payment_status'])){ echo $show_modify['payment_status']; }?>" />
                        	<select name="payment_status" id="payment_status" <?php if($_SESSION['userid']==4){?>required<?php } ?>>
                            	<option value="">Select One</option>
                                <option value="Pendding" <?php if( isset($show_modify['payment_status'])&&(($show_modify['payment_status']=='') ||($show_modify['payment_status']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                                <option value="Complete" <?php if( isset($show_modify['payment_status'])&&($show_modify['payment_status']=='Complete')){echo "selected"; }?>>Complete</option>
                            </select>
                        </div>
                        <div class="span3" <?php if($_SESSION['userid']!=4){?>style="display:none"<?php } ?>>
                        	<label>UAN Status</label>
                            <input type="hidden" name="old_uan_status" value="<?php if( isset($show_modify['uan_status'])){ echo $show_modify['uan_status']; }?>" />
                        	<select name="uan_status" id="uan_status" <?php if($_SESSION['userid']==4){?>required<?php } ?>>
                            	<option value="">Select One</option>
                                <option value="Not Done" <?php if( isset($show_modify['uan_status'])&&(($show_modify['uan_status']=='') ||($show_modify['uan_status']=='Not Done'))){echo "selected"; }?>>Not Done</option>
                                <option value="Done" <?php if(isset($show_modify['uan_status'])&&($show_modify['uan_status']=='Done')){echo "selected"; }?>>Done</option>
                            </select>
                        </div>   
                        <?php
						if( (isset($show_modify['uan_status'])&&(($show_modify['uan_status']=='')||($show_modify['uan_status']=='Not Done')))||(!isset($_REQUEST['page_id'])) )
						{?>   
                        <div class="span3">
                        	<label>Adhar Card Front Photo</label>
                        	<input type="file" name="front_photo"/>
                             <?php if(!empty($show_modify['front_photo'])){?>
                            <span>
                           		 <img src="page_image/<?php echo $show_modify['front_photo'];?>" style="width: 54%; margin-top:5px;padding: 2px 17px 3px 0px;"/>
                           
                            </span>
                            <?php } ?>
                        </div>
                        <div class="span3">
                        	<label>Adhar Card Back Photo</label>
                        	<input type="file" name="back_photo"/>
                             <?php if(!empty($show_modify['back_photo'])){?>
                            <span >
                           		 <img src="page_image/<?php echo $show_modify['back_photo'];?>" style="width: 54%; margin-top:5px;padding: 2px 17px 3px 0px;"/>
                           
                            </span>
                            <?php } ?>
                        </div>                 
                        <?php } ?>
                     </div>                     
                     <div class="row-form clearfix">
                    <div class="span2">
                    <label>July Month Salary</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "readonly='readonly' "; }?> name="jul_sal" autocomplete="off" placeholder="July Month Salary" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['jul_sal'];  ?>"<?php } ?> id="jul_sal" onkeypress="return isNumberKey(event)" required/>
                    </div>
                    <div class="span3">
                    <label>July Month To Be Paid</label>
                    <input type="hidden" name="old_jul_paid" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['jul_paid'];  ?>"<?php } ?> id="old_jul_paid"/>
                    <select <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "disabled='disabled' "; }?> name="jul_paid" onchange="get_month_test(this.value,'jul');">
                    	<option value="">Select Type</option>
                        <option value="Distributer" <?php if(isset($show_modify['jul_paid'])&&($show_modify['jul_paid']=="Distributer")){ echo "selected";}?>>Distributer</option>
                        <option value="Employee" <?php if(isset($show_modify['jul_paid'])&&($show_modify['jul_paid']=="Employee")){ echo "selected";}?>>Employee</option>
                    </select>
                    </div>
                    <div class="span2 jul_id" <?php if($show_modify['jul_paid']=!"Distributer"){?> style="display:none;" <?php } ?>>
                    <label>Rs Code</label>
                    <input <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "readonly='readonly' "; }?> type="text" name="jul_code" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['jul_code'];  ?>"<?php } ?> id="jul_code"/>
                    </div>
                    <div class="span2 jul_id" <?php if($show_modify['jul_paid']=!"Distributer"){?>style="display:none;"<?php } ?>>
                    <label>Distributer Name</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "readonly='readonly' "; }?> name="jul_dis_name" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['jul_dis_name'];  ?>"<?php } ?> id="jul_dis_name"/>
                    </div>                    
                    <div class="span2">
                        <label>July Status</label>
                        <input type="hidden" name="old_jul_status" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['jul_status'];  ?>"<?php } ?>/>
                        <?php if($_SESSION['userid']==4){?>
                        <select <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "disabled='disabled' "; }?> name="jul_status" id="jul_status" required="">
                            <option value="">Select One</option>
                            <option value="Pendding" <?php if( isset($show_modify['payment_status'])&&(($show_modify['jul_status']=='') ||($show_modify['jul_status']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                            <option value="Complete" <?php if( isset($show_modify['payment_status'])&&($show_modify['jul_status']=='Complete')){echo "selected"; }?>>Complete</option>
                        </select>
                        <?php }else 
							{ 
								if(isset($show_modify['jul_status'])&&($show_modify['jul_status']=='Complete')) { $img	='images/right.png';}
								else { $img='images/wrong.png';}?>
                        <img src="<?php echo $img;?>" style="width:30px;" />
                        <?php } ?>
                    </div>
                </div>
                     <div class="row-form clearfix">
                    <div class="span2">
                    <label>August Month Salary</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['aug_status']=='Complete')){echo "readonly='readonly' "; }?> name="aug_sal" autocomplete="off" placeholder="August Month Salary" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['aug_sal'];  ?>"<?php } ?> id="aug_sal" onkeypress="return isNumberKey(event)" required/>
                    </div>
                    <div class="span3">
                    <label>August Month To Be Paid</label>
                    <input type="hidden" name="old_aug_paid" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['aug_paid'];  ?>"<?php } ?> id="old_aug_paid"/>
                    <select <?php if( isset($show_modify['payment_status'])&&($show_modify['aug_status']=='Complete')){echo "disabled='disabled' "; }?> name="aug_paid" onchange="get_month_test(this.value,'aug');">
                    	<option value="">Select Type</option>
                        <option value="Distributer" <?php if(isset($show_modify['aug_paid'])&&($show_modify['aug_paid']=="Distributer")){ echo "selected";}?>>Distributer</option>
                        <option value="Employee" <?php if(isset($show_modify['aug_paid'])&&($show_modify['aug_paid']=="Employee")){ echo "selected";}?>>Employee</option>
                    </select>
                    </div>
                    <div class="span2 aug_id" <?php if($show_modify['aug_paid']=!"Distributer"){?>style="display:none;"<?php } ?>>
                    <label>Rs Code</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['aug_status']=='Complete')){echo "readonly='readonly' "; }?> name="aug_code" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['aug_code'];  ?>"<?php } ?> id="aug_code"/>
                    </div>
                    <div class="span2 aug_id" <?php if($show_modify['aug_paid']=!"Distributer"){?>style="display:none;"<?php } ?>>
                    <label>Distributer Name</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['aug_status']=='Complete')){echo "readonly='readonly' "; }?> name="aug_dis_name" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['aug_dis_name'];  ?>"<?php } ?> id="aug_dis_name"/>
                    </div>
                    <div class="span2">
                        <label>Augeust Status</label>
                        <input type="hidden" name="old_aug_status" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['aug_status'];  ?>"<?php } ?>/>
                        <?php if($_SESSION['userid']==4){?>
                        <select <?php if( isset($show_modify['aug_status'])&&($show_modify['aug_status']=='Complete')){echo "disabled='disabled' "; }?> name="aug_status" id="aug_status" required="">
                            <option value="">Select One</option>
                            <option value="Pendding" <?php if( isset($show_modify['aug_status'])&&(($show_modify['aug_status']=='') ||($show_modify['aug_status']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                            <option value="Complete" <?php if( isset($show_modify['aug_status'])&&($show_modify['aug_status']=='Complete')){echo "selected"; }?>>Complete</option>
                        </select>
                        <?php }else 
							{ 
								if(isset($show_modify['aug_status'])&&($show_modify['aug_status']=='Complete')) { $img	='images/right.png';}
								else { $img='images/wrong.png';}?>
                        <img src="<?php echo $img;?>" style="width:30px;" />
                        <?php } ?>
                    </div>
                </div>
                     <div class="row-form clearfix">
                    <div class="span2">
                    <label>September Month Salary</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "readonly='readonly' "; }?> name="sept_sal" autocomplete="off" placeholder="Sept. Month Salary" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['sept_sal'];  ?>"<?php } ?> id="sept_sal" onkeypress="return isNumberKey(event)" required/>
                    </div>
                    <div class="span3">
                    <label>September Month To Be Paid</label>
                    <input type="hidden" name="old_sept_paid" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['sept_paid'];  ?>"<?php } ?> id="old_sept_paid"/>
                    <select name="sept_paid" <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "disabled='disabled' "; }?> onchange="get_month_test(this.value,'sept');">
                    	<option value="">Select Type</option>
                        <option value="Distributer" <?php if(isset($show_modify['sept_paid'])&&($show_modify['sept_paid']=="Distributer")){ echo "selected";}?>>Distributer</option>
                        <option value="Employee" <?php if(isset($show_modify['sept_paid'])&&($show_modify['sept_paid']=="Employee")){ echo "selected";}?>>Employee</option>
                    </select>
                    </div>
                    <div class="span2 sept_id" <?php if($show_modify['sept_paid']=!"Distributer"){?> style="display:none;"<?php } ?>>
                    <label>Rs Code</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "readonly='readonly' "; }?> name="sept_code" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['sept_code'];  ?>"<?php } ?> id="sept_code"/>
                    </div>
                    <div class="span2 sept_id" <?php if($show_modify['sept_paid'] =! "Distributer"){?> style="display:none;"<?php } ?>>
                    <label>Distributer Name</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "readonly='readonly' "; }?> name="sept_dis_name" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['sept_dis_name'];  ?>"<?php } ?> id="sept_dis_name"/>
                    </div>
                    <div class="span2">
                        <label>September Status</label>
                        <input type="hidden" name="old_sep_status" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['sep_status'];  ?>"<?php } ?>/>
                        <?php if($_SESSION['userid']==4){?>
                        <select <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "disabled='disabled' "; }?> name="sep_status" id="sep_status" required="">
                            <option value="">Select One</option>
                            <option value="Pendding" <?php if( isset($show_modify['sep_status'])&&(($show_modify['sep_status']=='') ||($show_modify['sep_status']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                            <option value="Complete" <?php if( isset($show_modify['sep_status'])&&($show_modify['sep_status']=='Complete')){echo "selected"; }?>>Complete</option>
                        </select>
                        <?php }else 
							{ 
								if(isset($show_modify['sep_status'])&&($show_modify['sep_status']=='Complete')) { $img	='images/right.png';}
								else { $img='images/wrong.png';}?>
                        <img src="<?php echo $img;?>" style="width:30px;" />
                        <?php } ?>
                    </div>
                </div>
                	 <div class="row-form clearfix">
                    <div class="span2">
                    <label>October Month Salary</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['sep_status']=='Complete')){echo "readonly='readonly' "; }?> name="oct_sal" autocomplete="off" placeholder="Oct. Month Salary" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['oct_sal'];  ?>"<?php } ?> id="oct_sal" onkeypress="return isNumberKey(event)" required/>
                    </div>
                    <div class="span3">
                    <label>October Month To Be Paid</label>
                    <input type="hidden" name="old_oct_paid" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['oct_paid'];  ?>"<?php } ?> id="old_oct_paid"/>
                    <select name="oct_paid" <?php if( isset($show_modify['payment_status'])&&($show_modify['oct_status']=='Complete')){echo "disabled='disabled' "; }?> onchange="get_month_test(this.value,'oct');">
                    	<option value="">Select Type</option>
                        <option value="Distributer" <?php if(isset($show_modify['oct_paid'])&&($show_modify['oct_paid']=="Distributer")){ echo "selected";}?>>Distributer</option>
                        <option value="Employee" <?php if(isset($show_modify['oct_paid'])&&($show_modify['oct_paid']=="Employee")){ echo "selected";}?>>Employee</option>
                    </select>
                    </div>
                    <div class="span2 oct_id" <?php if($show_modify['oct_paid']=!"Distributer"){?> style="display:none;"<?php } ?>>
                    <label>Rs Code</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['oct_status']=='Complete')){echo "readonly='readonly' "; }?> name="oct_code" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['oct_code'];  ?>"<?php } ?> id="oct_code"/>
                    </div>
                    <div class="span2 oct_id" <?php if($show_modify['oct_paid'] =! "Distributer"){?> style="display:none;"<?php } ?>>
                    <label>Distributer Name</label>
                    <input type="text" <?php if( isset($show_modify['payment_status'])&&($show_modify['oct_status']=='Complete')){echo "readonly='readonly' "; }?> name="oct_dis_name" autocomplete="off" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['oct_dis_name'];  ?>"<?php } ?> id="oct_dis_name"/>
                    </div>
                    <div class="span2">
                        <label>October Status</label>
                        <input type="hidden" name="old_oct_status" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['oct_status'];  ?>"<?php } ?>/>
                        <?php if($_SESSION['userid']==4){?>
                        <select <?php if( isset($show_modify['payment_status'])&&($show_modify['oct_status']=='Complete')){echo "disabled='disabled' "; }?> name="oct_status" id="oct_status" required="">
                            <option value="">Select One</option>
                            <option value="Pendding" <?php if( isset($show_modify['oct_status'])&&(($show_modify['oct_status']=='') ||($show_modify['oct_status']=='Pendding'))){echo "selected"; }?>>Pendding</option>
                            <option value="Complete" <?php if( isset($show_modify['oct_status'])&&($show_modify['oct_status']=='Complete')){echo "selected"; }?>>Complete</option>
                        </select>
                        <?php }else 
							{ 
								if(isset($show_modify['oct_status'])&&($show_modify['oct_status']=='Complete')) { $img	='images/right.png';}
								else { $img='images/wrong.png';}?>
                        <img src="<?php echo $img;?>" style="width:30px;" />
                        <?php } ?>
                    </div>
                </div>
                     <div class="row-form clearfix">
                    <div class="span6">
                    	<label>Remark</label>
                        <input type="text" <?php if(isset($_REQUEST['page_id'])){?>value="<?php echo $show_modify['remark'];?>"<?php } ?> name="remark" id="remark" onkeyup="capital_letter('remark');" autocomplete="off" />
                    </div>
                </div>
                <div class="row-form clearfix">
                    <div class="span3">&nbsp;</div>
                    <div class="span2"><input type="submit" name="<?php if(isset($_REQUEST['page_id'])){echo "update"; }else{ echo "submit";}?>" class="btn btn-block" value="<?php if(isset($_REQUEST['page_id'])){ echo "Update"; }else{ echo "Save";}?>"/></div>
                </div>
              </fieldset>
            </form>  
        </div> 
    </div>
</div> 
<script>
function get_validation()
{
	var account_no 	  = $("#account_no").val();
	var re_account_no = $("#re_account_no").val();
	$("#branch_ifsc_err").html("");	
	$("#gender_err").html("");	
	var branch_ifsc   = $("#branch_ifsc").val();	
	var cs 			  = branch_ifsc.length;
	var no_5		  = branch_ifsc.substring(4,5);
	if($('input[name=gender]:checked').length<=0)
	{
	 	$("#gender_err").html("Please Select Gender !!!!!!!!!!");	
		return false;
	}
	if(cs<11)
	{
		$("#branch_ifsc_err").html("Please Enter Minimum 11 ");	
		$("#branch_ifsc").focus();		
		return false;
	}
	if(no_5!=0)
	{		
		$("#branch_ifsc_err").html("Please Enter Right Ifsc Code ");	
		$("#branch_ifsc").focus();		
		return false;
	}
	if(account_no!=re_account_no)
	{
		alert("Account No Does'nt Match !!!!!!!!");	
		$("#re_account_no").focus();
		return false;
	}
//return get_emp_code();
}

function isNumberKey(evt){
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;
}
function capital_letter(id)
{
    var arr 		  = $('#'+id).val().split(' ');
    var result 		  = "";
    for (var x=0; x<arr.length; x++)
        result+=arr[x].substring(0,1).toUpperCase()+arr[x].substring(1)+' ';
    $('#'+id).val(result.substring(0, result.length-1));
}
function get_hus_fat()
{
	var marital_st = $('#marital_st').val();
	var radioValue = $("input[name='gender']:checked").val();
	if(marital_st=='')
	{
       alert("Please Select Marital Status !!!!");
	}
	if(radioValue=='')
	{
       alert("Please Select Gender !!!!");
	}
	if( (marital_st=='MARRIED') && (radioValue=='Female'))
	{
	 	document.getElementById("fname_label").innerHTML="Husband's Name";
	}
	else if( (marital_st=='UN MARRIED') && (radioValue=='Female'))
	{
		document.getElementById("fname_label").innerHTML="Father's Name";
	}
	else if( radioValue=='Male')
	{
		document.getElementById("fname_label").innerHTML="Father's Name";
	}
}
function get_month_test(val_val,month_name)
{
	if(val_val=='Distributer')	
	{
		$("."+month_name+"_id").css("display","block");
	}
	else
	{
		$("."+month_name+"_id").css("display","none");
	}
}
function get_emp_code()
{
	var emp_code   = $("#emp_code").val();
	if (emp_code == '') {
		alert("Please Enter Employee Code !!!");
		return;
	} else {
		var xmlhttp = new XMLHttpRequest();
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				alert(xmlhttp.responseText)
				if(xmlhttp.responseText==0)
				{
					return true;
				}
				else
				{
					alert("Employee Code Already Exists !!!!!!");
					$("#emp_code").focus();
					return false;
				}
			}
		}
		xmlhttp.open("GET","ajax/gte_chk_emp_code.php?emp_code="+emp_code,true);
		xmlhttp.send();
	///	return false;
	}
}
</script>   