<?php
session_start();
if(!isset ($_SESSION['user_id'])){
    header("Location:../index.php?msg=Log in first");
    exit();
}else{
	include('../Server/connection.php');
	include('includes/session.php');
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

     <?php
	include 'title.php';
	?>
	
	
	<link type = "image/png" rel="icon" href="images/brvision.png"/>

    <!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    

    <!-- Custom Theme Style -->
    <link href="../build/css/custom.min.css" rel="stylesheet">
	
	<!-- DataTables must-->
  <link rel="stylesheet" href="assests/plugins/datatables/jquery.dataTables.min.css">

  <!-- file input must-->
  <link rel="stylesheet" href="assests/plugins/fileinput/css/fileinput.min.css">
  
   </head>

  <body class="nav-md">
    <div class="container body">
	
	
	
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
		  
         <?php  
		include 'includes/role.php';
               ?>

            <div class="clearfix"></div>

            <?php
            include 'includes/profile.php';
			print '</br></br>';
			include 'includes/menu.php';
			?>

            <!-- page content -->
        <div class="right_col" role="main">
          <div class="">

            <div class="clearfix"></div>
			
			
			<div class="row">
			
			 
			
			 <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
				  
				
				
				 <a href="dashboard.php">  <h2><span class="glyphicon glyphicon-step-backward"></span> Back</h2></a> </br></br>
				 
				  <?php
							
							//$sql = "SELECT * FROM clients,assignstatus where clients.client_id=assignstatus.client_id and assignstatus.assigned_to='$user_id' and assignstatus.status=0";
                            //$result = $conn->query($sql);
							//$m = $result->num_rows;
                                 ?>
                 
                      <b>List Of Staff Contracts:</b>&nbsp&nbsp<font color="green"><?php echo $m; ?></font>

                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
					  
                     
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" style="overflow: auto;">
                 
				  <div class="remove-messages"></div>
					
				<table class="table" id="manageCategoriesTable">
					<thead>
						<tr>
							<th>S/No:</th>	
                            <th>Staff</th>
							<th>StaffId</th>
							<th>Designation</th>
                            <th>Contract Start</th>					
							<th>Contract End </th>
							<th>Duration in Months</th>
							<th>Remarks</th>
							<th></th>
							<th></th>
							<th></th>
							<th>PDF Staff Contract</th>
						</tr>
					</thead>
				</table>
				
					
				
					
                  </div>
                </div>
              </div>

            </div>
			
		

<!-- edit categories brand -->
<div class="modal fade" id="editCategoriesModal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
    	
    	<form class="form-horizontal" id="editCategoriesForm" action="php_action/manage_contract.php" method="POST">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title"> <!--<i class="fa fa-edit"></i>--> Manage Staff Contract </h4>
	      </div>
		  
	      
		  <div class="modal-body" style="max-height:450px; overflow:auto;">

	      	<div id="edit-categories-messages"></div>

	      	<!--<div class="modal-loading div-hide" style="width:50px; margin:auto;padding-top:50px; padding-bottom:50px;">
						<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
						<span class="sr-only">Loading...</span>
					</div>-->
					
			<div class="edit-categories-result">
		      	<div class="form-group">
				
				<label class="radio-inline">
          <input type="radio" name="status" value="Renew Contract" id="status" checked /> Renew Contract
         </label>&nbsp&nbsp&nbsp&nbsp
         <label class="radio-inline">
          <input type="radio" name="status" value="Terminate Contract" id="status" /> Terminate Contract
         </label>&nbsp&nbsp&nbsp&nbsp
						
		        </div> <!-- /form-group-->
		      </div>         	        
		      <!-- /edit brand result -->
			  
			   <div id="textboxes33">

		      
             <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Contract Start: </label>
					    <div class="col-sm-7">
						<input type="date" class="form-control" id="cont_start" name="cont_start" placeholder="Contract Start" autocomplete="off" />
					    </div>
		        </div> <!-- /form-group-->
		      </div>   

             <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Contract Duration: </label>
					    <div class="col-sm-7">
						<input type="hidden" class="form-control" id="contractId"  name="contractId" autocomplete="off" />
						<select class="form-control" name="cont_dur_id" id="cont_dur_id" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						<?php
			  							$productSql24 = "SELECT * FROM cont_duration ORDER BY cont_dur_name";
			  							$productData24 = $conn->query($productSql24);
			  							while($row24 = $productData24->fetch_array()){									 		
			  								echo "<option value='".$row24['cont_dur_id']."'>".$row24['cont_dur_name']."</option>";
										 	} // /while 

			  						?>
		  						</select> 
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>	

              

               </div>	

            <div id="textboxes34" style="display: none">
			  
			    <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Remarks: </label>
					    <div class="col-sm-7">
						<textarea id="remarks" rows="10" cols="50" name="remarks" class="form-control" style="margin-left:0%;" autocomplete="off"> </textarea>
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

            
			  
			  </div>			   

	      </div> <!-- /modal-body -->
	      
	      <div class="modal-footer editCategoriesFooter">
	        <button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
	        
	        <button type="submit" class="btn btn-success" id="editCategoriesBtn" data-loading-text="Loading..." autocomplete="off"> <i class="glyphicon glyphicon-ok-sign"></i> Save Changes</button>
	      </div>
	      <!-- /modal-footer -->
     	</form>
	     <!-- /.form -->
    </div>
    <!-- /modal-content -->
  </div>
  <!-- /modal-dailog -->
</div>
<!-- /categories brand -->



<!-- categories brand -->
<div class="modal fade" tabindex="-1" role="dialog" id="removeCategoriesModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title"><i class="glyphicon glyphicon-trash"></i> Delete Position</h4>
      </div>
      <div class="modal-body">
        <p>Do you really You want to remove This Contract?</p>
      </div>
      <div class="modal-footer removeCategoriesFooter">
        <button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
        <button type="button" class="btn btn-primary" id="removeCategoriesBtn" data-loading-text="Loading..."> <i class="glyphicon glyphicon-ok-sign"></i> Save changes</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- /categories brand -->



			
			
          </div>
        </div>
        <!-- /page content -->

       <?php
		include 'includes/footer.php';
		?>
		
		
      </div>
    </div>
	
	

    <!-- jQuery -->
    <!--<script src="../vendors/jquery/dist/jquery.min.js"></script>-->
	
	
	<script src="../vendors/jquery/dist/jquery.min.js"></script>
	
	
    <!-- Bootstrap -->
    <!--<script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>-->
	
	<!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap10.min.js"></script>
    
    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>
	
	<!-- file input must-->
	<script src="assests/plugins/fileinput/js/plugins/canvas-to-blob.min.js'); ?>" type="text/javascript"></script>	
	<script src="assests/plugins/fileinput/js/plugins/sortable.min.js" type="text/javascript"></script>	
	<script src="assests/plugins/fileinput/js/plugins/purify.min.js" type="text/javascript"></script>
	<script src="assests/plugins/fileinput/js/fileinput.min.js"></script>	


	<!-- DataTables must-->
	<script src="assests/plugins/datatables/jquery.dataTables.min.js"></script>
	
	<!--must-->
	<!--<script src="custom/js/fetchLevels.js"></script>-->
	<!--must-->
	<script src="custom/js/staffContracts.js"></script>
	
    <script>

$(document).ready(function(){
    $('input[name="status"]').on('click', function(){
        if ($(this).val() == 'Renew Contract'){
			 $('#textboxes33').show();
			 $('#textboxes34').hide();
        }else {
			$('#textboxes33').hide();
			$('#textboxes34').show();
		}
	
		
    });
});


</script>
		
  </body>
</html>



<?php
}

?>