<?php 	include_once('../../config.php'); 
		include_once(ABS_PATH.'/admin/login_check.php');
		   
            		if(isset($_POST['submit']))
            		{        
            		    
                        $stmt=$conn->prepare("update UI__TpDys  set ATWdys=:dys  ");   
                        $stmt->bindValue(':dys', $_POST['mobileno'] , PDO::PARAM_STR);
                        $stmt->execute();   
                        header("Location: ATWDays.php");   
                        die;
            	 	 }  
            	 	 
            	 	 
                    $stmt=$conn->prepare("select *   from    UI__TpDys");     
                    $stmt->execute();   
                    $dateOfra = $stmt->fetch(PDO::FETCH_OBJ); 
                     
             
            	 	 
include ABS_PATH.'/admin/header.php';	
?>  


 <script>

	
	 
 
		
 </script>
 <script>
	 
    var URL = "<?php echo ROOTPATH;?>";
	$(document).ready(function()
	{   
    	$("#walletfrm").validate({ 
    			
    			errorElement:'div',
    			rules:{ 
    			   mobileno:{
    				required:true,   
    			  }
    			}, 
    	   messages:{				 
        			
        		  mobileno:{
    				required:"Please enter Id",
    			 
    			  } 		  
    			}
      }); 
       
    	 

});
 


</script>
		 
		 <div class="col-md-10">

	  			<div class="row">
	  				<div class="col-md-12">
	  					<div class="content-box-large">
							<div class="panel-heading"> 

							
							
							<div class="panel-title"> <h1>ATW Dys </h1></div>     
								<!--div class="panel-options">  
								<input type="button"  class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='admin_users.php'" /> 
								</div-->  
							</div>   
							
						
			  				<div class="panel-body">  								 
			  					<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" id="walletfrm" autocomplete="off">       
								 <div class="form-group">    
								 
							    <div class="form-group">  
								    <label for="inputEmail3" class="col-sm-2 control-label">ATW Days </label>
								    <div class="col-sm-3">  
								      <h5>
								            <input type="number" name="mobileno" id="mobileno"     class="form-control"   value="<?php echo $dateOfra->ATWdys;?>"/> 
								      </h5>  
								    </div> 
								 </div>	
								<hr>
								
								
							 
							 
						 

								<div class="form-group">  
								    <label for="inputEmail3" class="col-sm-2 control-label"> Updates</label>
								    <div class="col-sm-10">  
								      <h5>  
								            <input type="submit" name="submit" value="Update" class="btn btn-primary"/>  
								      </h5>  
								       
								    </div> 
								 </div>		
 
								 
								</form>   
							 
			  				</div>
			  			</div>
	  				</div>
	  				 
	  			</div>

	  			 


	  		<!--  Page content -->
		  </div>
		</div>
    </div>

 
<?php  include ABS_PATH.'/admin/footer.php';	?>  