<?php
  $page_title = 'Agregar Mecanico';
  require_once('../../includes/load.php');
  // Checkin What level user has permission to view this page
  page_require_level(4);
?>
<?php include_once('../../layouts/header.php'); ?>
<div class="row">
  <div class="col-md-12">
    <?php echo display_msg($msg); ?>
  </div>
</div>
  <div class="row">
  <div class="col-md-16">
      <div class="panel panel-default">
        <div class="panel-heading">
          <strong>
            <span class="glyphicon glyphicon-plus"></span>
            <span>Mecanico</span>
         </strong>
        </div> 
 <!-- FORMULARIO PARA GUARDAR EL PROGRAMA-->
        <form  enctype="multipart/form-data" autocomplete="off" id="form" onSubmit="validar()">
          <div class="panel-body">
            <div class="col-md-12">
        		<div class="card-header">
                  <strong>
                     <span>Mecanico</span>
                  </strong> 
                </div>

                 <div class="card-body">
		              <div class="form-group">
		                <div class="row">
		                    <div class="col-md-3">
		                      <label for="precio" class="control-label">Area:</label>
		                      <div class="input-group">   
		                              <select id="area" name="area" class="form-control">
		                                <?php   
										  $consulta = $db->query("SELECT * FROM areagerenciaoperaciones");
										    while ($row = $db->fetch_assoc($consulta)) {   
										      $id = $row['IdAreaGerenciaOperaciones']; 
										      $NombreArea = $row['NombreAreaGerenciaOperaciones'];    
										      echo "<option value='$id'>$NombreArea</option>";
										    }
										?>
		                              </select>                            
		                        </div>               
		                    </div>		                  	
		                    <div class="col-md-3">
		                      <label for="nombre" class="control-label">Nombres:</label>
		                      <div class="input-group"> 
		                        <span class="input-group-addon">
		                          <i class="fi fi-sr-interlining"></i>
		                        </span>  
		                              <input class="form-control" id="nombre" name="nombre">                                            
		                      </div>               
		                    </div>
		                    <div class="col-md-3">
		                      <label for="apellido" class="control-label">Apellidos:</label>
		                      <div class="input-group"> 
		                        <span class="input-group-addon">
		                          <i class="fi fi-sr-interlining"></i>
		                        </span>  
		                              <input class="form-control" id="apellido" name="apellido">                                            
		                      </div>               
		                    </div>
		                    <div class="col-md-3">
		                      <label for="dni" class="control-label">DNI:</label>
		                      <div class="input-group">   
		                              <input class="form-control" id="dni" name="dni">                             
		                        </div>               
		                    </div>
		                </div>
		               </div>

		               <div class="form-group">
		                <div class="row">
		                	<div class="col-md-3">
		                      <label for="direccion" class="control-label">Direccion:</label>
		                      <div class="input-group"> 
		                        <span class="input-group-addon">
		                          <i class="fi fi-sr-interlining"></i>
		                        </span>  
		                              <input type="text" id="direccion" name="direccion" class="form-control">	                                                                        
		                        </div>               
		                    </div>
		                    <div class="col-md-3">
		                      <label for="costo" class="control-label">Costo:</label>
		                      <div class="input-group"> 
		                        <span class="input-group-addon">
		                          <i class="fi fi-sr-interlining"></i>
		                        </span>  
		                              <input type="text" id="costo" name="costo" class="form-control" placeholder="Costo x Hora">                                      
		                        </div>               
		                    </div>
		                    <div class="col-md-3">
		                      <label for="telefono" class="control-label">Telefono:</label>
		                      <div class="input-group"> 
		                        <span class="input-group-addon">
		                          <i class="fi fi-sr-interlining"></i>
		                        </span>  
		                              <input type="text" id="telefono" name="telefono" class="form-control">	                                                                        
		                        </div>               
		                    </div>
		                    <div class="col-md-3">
		                      <label for="estado" class="control-label">Estado:</label>
		                      <div class="input-group">   
	                              <select id="estado" name="estado" class="form-control">
	                              	<option>Activo</option>
	                              	<option>Inactivo</option>
	                              </select>                              
		                        </div>               
		                    </div>		                      	
		                </div>
		              </div>
                     <div class="text-center">
                   		 <button type="submit" class="btn btn-success"><i class="glyphicon glyphicon-floppy-disk"></i>Guardar</button>
                   		  <a href="listado_mecanico.php" class="btn btn-primary"><i class="glyphicon glyphicon-th-list"></i>Listado</a>
                     </div>
          			  </div>
	          	    </div>
	             </div>
	           </div>   
            </div>
          </div>           
        </form>
     </div>
    </div>
  </div>
</div>
</div>




<?php include_once('../../layouts/footer.php'); ?>
<script type="text/javascript" src="js/mecanico.js"></script>


