<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link type="text/css" rel="shortcut icon" href="img/logo-mywebsite-urian-viera.svg"/>
  <title>SUBIR EXCEL EN FORMATO CSV, QUITAR TODAS LAS COMAS ANTES DE SUBIR</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css">
  <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="css/cargando.css">
  <link rel="stylesheet" type="text/css" href="css/cssGenerales.css">
</head>
<body>

<div class="cargando">
    <div class="loader-outter"></div>
    <div class="loader-inner"></div>
</div>


<nav class="navbar navbar-expand-lg navbar-light navbar-dark fixed-top" style="background-color: #563d7c !important;">
    <ul class="navbar-nav mr-auto collapse navbar-collapse">
      <li class="nav-item active">
        <a href="index.php"> 
          <img src="img/logo-mywebsite-urian-viera.svg" alt="Web Developer Urian Viera" width="120">
        </a>
      </li>
    </ul>
    <div class="my-2 my-lg-0">
      <h5 class="navbar-brand">@BarahonaWEB </h5>
    </div>
</nav>


<div class="container">

<h3 class="text-center">
    SUBIR EXCEL EN FORMATO CSV, QUITAR TODAS LAS COMAS ANTES DE SUBIR
</h3>
<hr>
<br><br>




 <div class="row">
    <div class="col-md-7">
      <form action="recibe_excel_validando.php" method="POST" enctype="multipart/form-data"/>
         
    <p>SELECCIONAR ARCHIVO:</p>
    <input type="file" id="myFile" name="dataCliente">
  
    <div class="mt-3">
      <button type="submit" class="btn btn-primary">SUBIR EXCEL</button>
    </div>
  </form>
</div>

<script>
// Add the following code if you want the name of the file appear on select
$(".custom-file-input").on("change", function() {
  var fileName = $(this).val().split("\\").pop();
  $(this).siblings(".custom-file-label").addClass("selected").html(fileName);
});
</script>
    </div>

    <div class="col-md-5">

<br>
<br><br>

  <?php



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

  header("Content-Type: text/html;charset=utf-8");
  include('config.php');
  $sqlClientes = ("SELECT * FROM ruc WHERE FECHA_CARGA = '$fecha_actual' ORDER BY ID ASC");
  $queryData   = mysqli_query($con, $sqlClientes);
  $total_client = mysqli_num_rows($queryData);
  ?>

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

        <table class="table table-bordered table-striped">
       
          <tbody>
            <?php 
            $i = 1;
            while ($data = mysqli_fetch_array($queryData)) { ?>
            <tr>
            
            </tr>
          <?php } ?>

<?php
 

  
  include('config.php');
//$sqlClientes = ("SELECT * FROM ruc WHERE ESTADO ='PENDIENTE' and ASIGNADO = '$profiless' ORDER BY id ASC"); 
$sqlClientes = ("SELECT COUNT(*) AS CANTIDAD, ID, ASIGNADO, ESTADO, FECHA_CARGA, DECISION FROM ruc WHERE ESTADO = 'PENDIENTE' and FECHA_CARGA = '$fecha_actual' GROUP BY  DECISION ORDER BY  CANTIDAD DESC"); 
//$sqlClientes = ("SELECT R.ID, R.ASIGNADO, COUNT(*) AS CANTIDAD, R.ESTADO FROM ruc R INNER JOIN user US  US.logUser on (R.ID = US.idUser) GROUP BY ASIGNADO ORDER BY  CANTIDAD DESC");   
 // $sqlClientes = ("SELECT COUNT(RUC) AS CANTIDAD FROM ruc");   
//$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 class="table-responsive-xl">
     <table class="table  table-hover">
    <thead class="thead-dark">


            <tr>
                    
             
            
              <th>TERMINO</th>
                <th>CANTIDAD</th>
              <th>FECHA DE CARGA</th>
               <th>FECHA DE CARGA</th>
            
           
            </tr>
          </thead>
          <tbody>

            <?php     


            
         
            while ($data = mysqli_fetch_array($queryData)) { ?>
                
            <tr>
                <tbody id="myTable">           
        
            
              <td><strong><a href="select_menueq.php"><?php echo $data['DECISION']; ?></a></strong></td> 
                <td><strong><?php echo $data['CANTIDAD']; ?></strong></td> 
              <td><strong><?php echo $data['FECHA_CARGA']; ?></strong></td> 
        


           
   <!--    <td><center> <label><input type="radio" name ="id[]" class="selectall" value="<?= $data['ASIGNADO']?>" ></label> </center> </td> 

       <td>  <button name="submit" type="submit" name ="id" class="btn btn-warning btn-lg" class="selectall" value="<?= $data['ASIGNADO']?>">
          <span class="glyphicon glyphicon-eye-open"></span> </td>
</tr>-->



 
          <?php } ?>
          <?php
 

  
  include('config.php');
//$sqlClientes = ("SELECT * FROM ruc WHERE ESTADO ='PENDIENTE' and ASIGNADO = '$profiless' ORDER BY id ASC"); 
$sqlClientes = ("SELECT COUNT(*) AS CANTIDAD, ID, ASIGNADO, ESTADO, FECHA_CARGA, FECHA_ASIG, DECISION FROM ruc WHERE ESTADO = 'PENDIENTE' and FECHA_CARGA = '$fecha_actual' GROUP BY  ASIGNADO ORDER BY  CANTIDAD DESC"); 
//$sqlClientes = ("SELECT R.ID, R.ASIGNADO, COUNT(*) AS CANTIDAD, R.ESTADO FROM ruc R INNER JOIN user US  US.logUser on (R.ID = US.idUser) GROUP BY ASIGNADO ORDER BY  CANTIDAD DESC");   
 // $sqlClientes = ("SELECT COUNT(RUC) AS CANTIDAD FROM ruc");   
//$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 class="table-responsive-xl">
     <table class="table  table-hover">
    <thead class="thead-dark">


            <tr>
                    
             
           
              <th>ASIGNADO</th>
                 <th>CANTIDAD</th>
              <th>FECHA DE CARGA</th>
               <th>FECHA DE VALIDACION</th>
            
           
            </tr>
          </thead>
          <tbody>

            <?php     


            
         
            while ($data = mysqli_fetch_array($queryData)) { ?>
                
            <tr>
                <tbody id="myTable">           
        
            
              <td><strong><?php echo $data['ASIGNADO']; ?></a></strong></td> 
                <td><strong><?php echo $data['CANTIDAD']; ?></strong></td> 
              <td><strong><?php echo $data['FECHA_CARGA']; ?></strong></td> 
              <td><strong><?php echo $data['FECHA_ASIG']; ?></strong></td> 
           
   <!--    <td><center> <label><input type="radio" name ="id[]" class="selectall" value="<?= $data['ASIGNADO']?>" ></label> </center> </td> 

       <td>  <button name="submit" type="submit" name ="id" class="btn btn-warning btn-lg" class="selectall" value="<?= $data['ASIGNADO']?>">
          <span class="glyphicon glyphicon-eye-open"></span> </td>
</tr>-->



 
          <?php } ?>
         
          </tbody>
        </table>



    </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(1000);
        });      
});
</script>

</body>
</html>