<?php
  $page_title = 'Agregar Operacion';
  require_once('../../includes/load.php');
  // Checkin What level user has permission to view this page
  page_require_level(5);
?>

<?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>Aperturar Operacion</span>
         </strong>
        </div> 
 <!-- FORMULARIO PARA GUARDAR EL OPERACION-->
        <form  enctype="multipart/form-data" autocomplete="off" id="form" onSubmit="validar()">
          <div class="panel-body">
            <div class="col-md-2"></div>
            <div class="col-md-8">
            <div class="card-header">
                  <strong>
                     <span>Operacion</span>
                  </strong> 
            </div>
                 <div class="card-body">
                  <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                          <label for="programa" class="control-label">Programa:</label>
                          <div class="input-group">   
                                  <input type="text" id="programa" name="programa" class="form-control" required>                           
                            </div>               
                        </div>
                        <div class="col-md-6">
                          <label for="ult_venta" class="control-label">Ultima Venta:</label>
                          <div class="input-group">   
                                  <input type="date" id="ult_venta" name="ult_venta" class="form-control" required>                           
                            </div>               
                        </div>
                    </div>
                   </div>

                   <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                          <label for="reuso" class="control-label">Reuso:</label>
                          <div class="input-group"> 
                            <span class="input-group-addon">
                              <i class="fi fi-sr-interlining"></i>
                            </span>  
                                  <select id="reuso" name="reuso" class="form-control">
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>
                                    <option>9</option>
                                    <option>10</option>
                                    <option>11</option>
                                  </select> 
                                                                            
                            </div>               
                        </div>
                        <div class="col-md-6">
                          <label for="ini_limpieza" class="control-label">Inicio Limpieza:</label>
                          <div class="input-group">  
                                  <input type="date" id="ini_limpieza" name="ini_limpieza" class="form-control" required>                            
                            </div>               
                        </div>
                    </div>
                  </div>


                  <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                          <label for="responsable" class="control-label">Responsable:</label>
                          <div class="input-group">   
                                  <input type="text" id="responsable" name="responsable" class="form-control" value="<?php echo $user['name'];?>" readonly>                               
                            </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_operacion.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/operacion.js"></script>