

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>

  <style>
    /* Set height of the grid so .sidenav can be 100% (adjust if needed) */
    .row.content {height: 200px}
    
    /* Set gray background color and 100% height */
    .sidenav {
      background-color: #f1f1f1;
      height: 0%;
    }
    
    /* Set black background color, white text and some padding */
    footer {
      background-color: #555;
      color: white;
      padding: 1px;
    }
    
    /* On small screens, set height to 'auto' for sidenav and grid */
    @media screen and (max-width: 77px) {
      .sidenav {
        height: auto;
        padding: 15px;
      }
      .row.content {height: auto;} 
    }




  </style>

<style>
table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #DDD;
}

tr:hover {background-color: #D6EEEE;}
</style>


</head>
<body>


  
      <center> <h1><em>Consulta por Preclasificaci&oacute;n</em></h1>  </center>



<table class="table">
  
  <tbody>
  

       <?php



date_default_timezone_set('America/Santiago');
$fecha_actual=date("Y-m-d");


?>

   <center> <form action="viewprec.php" method="post" name="frm">
        <div class="col-lg-3">
     <input type="date" name="fecha" class="form-control" value="<?=$fecha_actual?>" required/><br><br>
        <center> <input class="btn btn-success" name="submit" type="submit" value=" Consultar" /></center></td>
     </form>
     
      <th scope="row"></th>

      <td><div class="group">
  <form action="#" method="POST">
<div class="group">
    

 <th scope="row"></th>
      <td colspan="">
 
      
    
<?php

if (isset($_POST['fecha'])) {
  $id = $_POST['fecha'];

}


?>



    <div class="col-sm-10">
 
    
    <div class="">
  <?php
 
 

  
  include('config.php');
//$sqlClientes = ("SELECT * FROM ruc WHERE ESTADO ='PENDIENTE' and ASIGNADO = '$profiless' ORDER BY id ASC"); 
$sqlClientes = ("SELECT * FROM ruc WHERE DECISION ='EQUIPO' ORDER BY  ESTADO, DECISION DESC");   
//$sqlClientes = ("SELECT * FROM ruc  ORDER BY id ASC");
 // $sqlClientes = ("SELECT C.*, C.dv FROM clientes C INNER JOIN user u ON u.nombre = '$cla' AND C.dv = '0' OR C.dv = '1' AND c.estado = 'EQUIPO'");
  
//$sqlClientes = ("SELECT * FROM clientes  ORDER BY id DESC ");
  $queryData   = mysqli_query($con, $sqlClientes);
  $total_client = mysqli_num_rows($queryData);


  ?>

</div>
   
  <!--
  <center><button type="button" class="btn btn-danger">SIN VALIDAR <span class="badge"><strong><H5><a href="index2.php"><?php echo $total_client; ?></a></strong></H5></span></button>

   <button type="button" class="btn btn-success">AP  <span class="badge"><strong><H5><a href="ap.php"><?php echo $total_clientAP; ?></a></strong></H5></span></button>

    <button type="button" class="btn btn-danger">TRANSFERENCIAS  <span class="badge"><strong><H5><a href="transfer.php"><?php echo $total_clientS; ?></a></strong></H5></span></button>

    <button type="button" class="btn btn-warning">EQUIPO JURIDICO <span class="badge"><strong><H5><a href="equipos.php"><?php echo $total_clientA; ?></a></strong></H5></span></button>

</center>-->



      <h6 class="text-center">
   <strong>     RUC SIN VALIDAR (<?php echo $total_client; ?>)</strong>
      </h6>


      <form action="updatechek.php" method="POST">
<div class="table-responsive-xl">
     <table class="table  table-hover">
    <thead class="thead-dark">

 <tr>
              <th>#</th>
              <th width="10%">RUC</th>
              <tH width="5%">RUC CORTO</tH>
              <th>DIGITAL</th>
              <th>PRECLASIFICACION</th>
              <th>TERMINO</th>
              <th>DELITO</th>
              <th>VFECHA</th>
              <th>VFECHA2</th>
             
              <th>FECHA_IN</th> 
              <th>VALIDADO</th>   
                <th>NOMBRE</th>   
              
              <th><input class="btn btn-success" name="submit" type="submit" value="VALIDAR" />  <label><input  class="form-check-input" id="selectall"type="checkbox" name='check' value=""></label>
              <center> </center> </th>   


              <th>ACCION</th>    
            </tr>
          </thead>
          <tbody>

            <?php     


            
            $rut = '15844765-7';
            $i = 1;
            while ($data = mysqli_fetch_array($queryData)) { ?>
            <tr>
                <tbody id="myTable">
              <th scope="row"><?php echo $i++; ?></th>  
              <td><strong><a href="http://frfamae010:270/carpeta_digital_v9/index.php?ruc=<?php echo $data['RUC'];?>&rut=<?php echo $rut;?>"><?php echo $data['RUC']; ?></strong></td> 
              <td> <?php echo $resultado = substr($data['RUC'], -8);?></td>
              <td><?php echo $data['DIGITAL']; ?></td>
              <td><strong><?php echo $data['OBSERVACION']; ?></strong></td>  
              <td><strong><?php echo $data['DECISION']; ?></strong></td> 
              <td><strong><?php echo $data['DELITO']; ?></strong></td>  
              <td><strong><?php echo $data['FECHA_LECT']; ?></strong></td>  
              <td><strong><?php echo $data['FECHA_ASIG']; ?></strong></td> 
              <td><strong><?php echo $data['FECHA_CARGA']; ?></strong></td>
              <td><?php  $data['ESTADO'];   if ($data['ESTADO'] == 'VALIDADO'){
echo ' <center><a href="" class="btn btn-success btn-lg">
          <span class="glyphicon glyphicon-thumbs-up"></span> 
        </a></center>';
}else{
  
echo '<center><a href="" class="btn btn-danger btn-lg">
          <span class="glyphicon glyphicon-thumbs-down"></span> 
       </a></center>';

}

?></td>       
             
         
          <!-- <td><center> <label><input type="checkbox" value="VALIDADO" name='check' class="selectall"></label> </center> </td>-->
           
            <td><strong><?php echo $data['ASIGNADO']; ?></strong></td> 
<td><center> <label><input type="radio" class="selectall" value="<?= $data['ID']?>" name ="id[]"></label> </center> </td> 

       <td>  <button name="submit" type="submit" class="btn btn-warning btn-lg" >
          <span class="glyphicon glyphicon-eye-open"></span> </td>
       
       
  <!-- <td> <?php  echo '<a href=updacheck1a1.php?e='.$data['id'].' class="btn btn-info btn-lg"</a> 22  <span class="glyphicon glyphicon-edit"></span> ';?></td>-->
       
       
</tr>


</body>
</html>
 
          <?php } ?>
         
      

   
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>


<script src="js/jquery.min.js"></script>
<script src="'js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $(window).load(function() {
            $(".cargando").fadeOut(10);
        });      
});
</script>



</body>
</html>

