<?php 
 if(isset($Success)){
   
	   echo $Success;
   }
   
    if(isset($Fail)){
   
	   echo $Fail;
   }
   
  ?>
<script>
     function readURL(input) {
		   $('#FileName').val(input.files[0].name);
            }
		

		</script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
 
 <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">

<script>
function checkYearMonthAsEmpty()
{
    if($("#mon").val() == "") {
  alert("No Month Selected!");
 }
 if($("#yr").val() == "") {
 alert("No Year Selected!");}
 
  var m=$("#mon").val();
  var y=$("#yr").val();
 // alert(m+y);
 
}		
</script>		
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
       <center>Siddharth Industries - Monthly Pay Inputs Upload</center>
        
      </h1>
    </section>
    <section class="content">
        <div class="row">
		<div class="col-md-8 col-md-offset-2" style="border:2px dotted;padding:2%;">
			 
		
				 <form id="upload" action="<?php echo base_url() ?>FileUpload2" method="post" role="form" enctype="multipart/form-data"> 	<div class="col-md-5 col-md-offset-2">
					<span for="FileName">File Name</span>
					<input type="text"   class="form-control required" id="FileName" name="FileName" readonly>	 
				</div>	 
				<div class="box-header">                                                               
						<input type="file"  accept=".xlsx" onchange="readURL(this);"  id="userfile" name="userfile"/>  
						<label for="photo">Select Excel File to upload<br/>(only .xls)</label>
				</div>	
				<div class="col-md-2 col-md-offset-2">	
				<span for="Month">Month</span>	
				<input class="date-own form-control" style="width: 100px;" type="text" id="mon" name="mon">

					 <script type="text/javascript">
						  $('.date-own').datepicker({
							 minViewMode: 1,
							 format: 'mm'
						   });
					  </script>
				</div>

				 <div class="col-md-2 col-md-offset-0">	
				<span for="Year">Year</span>	
				<input  style="width: 100px;" type="text" id="year" name="yr" readonly />					 
				<script type="text/javascript">
					  var today= new Date();
					  var year=today.getFullYear();
					  
					  document.getElementById("year").value = year;						  // $('.date-own').datepicker({
							 // //minViewMode: 2,
							 // format: 'yyyy'
							 
						   // });
					  </script>
				</div>
				<br/>	
				<div class="col-md-1 col-md-offset-1">					
					<input type="submit" class="btn btn-info" value="upload" onmouseover="checkYearMonthAsEmpty();"/> 
				</div>
			 
		</div>
        </div>
         
    </section>
</div>
  
