

<!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>


</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>

<body style="height:100px">

<nav class="navbar navbar-expand-sm bg-success navbar-dark fixed-top">
 <ul class="navbar-nav mr-auto collapse navbar-collapse">
     
     <li class="nav-item active">
      <a class="nav-link" href="路">MENU</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="menuExceltransfer.php">TRANSFERENCIAS</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="menuExceltodo.php">TODO</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="menuExcelap.php">AP</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="menuExceleq.php">EQUIPOS</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="vistacde.php">CDE</a>
    </li>
     <li class="nav-item">
      <a class="nav-link" href="vistaproteccion.php">MEDIDAS DE PROTECCION</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="vistapowerbi.php">POWERR BI</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="viewprec2.php">PRODUCCION</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="menu.php">REASIGNAR</a>
    </li>
  </ul>

    <div class="my-7 my-lg-0">
      <h5 class="navbar-brand"><header><h1>Bienvenido(a): <?php echo $profiless ?></h1></header> </h5>
    </div>
</nav>

<br>
<br>
<br>
<br>


<body>


    
  
<?php



  include("conect.php");
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);

if (isset($_POST['submit'])) {
  if (isset($_POST['id'])) {

    foreach($_POST['id'] as $id){
     $sql= "UPDATE ruc SET ESTADO   ='VALIDADO' WHERE id = '$id'";
    // $sql = "UPDATE clientes SET estado ='$esta', instruccion = '$estare' , DV = '$dvs' WHERE id = '$estar'";
      // $sql= "DELETE FROM clientes WHERE id = '$id'";
     
     echo $id;
   mysqli_query($conn, $sql);
  }

}
}
?>


  

<table class="table">
  
  <tbody>
  

     

      <td><div class="group">
  <form action="select_menu.php" method="POST">
<div class="group">
    

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



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

  
  include('config.php');
//$sqlClientes = ("SELECT * FROM ruc WHERE ESTADO ='PENDIENTE' and ASIGNADO = '$profiless' ORDER BY id ASC"); 
$sqlClientes = ("SELECT COUNT(*) AS CANTIDAD, DECISION, FECHA_CARGA FROM ruc  GROUP BY DECISION 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>-->





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

 <tr>
              <th>#</th>
              <th>CANTIDAD</th>
              <tH>DECISION</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><?php echo $data['DECISION']; ?></strong></td> 
              <td><strong><?php echo $data['CANTIDAD']; ?></strong></td>  
              
            
             

       
</tr>


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

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

<?php

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

}


?>

  
  <?php
 
 

  
  include('config.php');
//$sqlClientes = ("SELECT * FROM ruc WHERE ESTADO ='PENDIENTE' and ASIGNADO = '$profiless' ORDER BY id ASC"); 
$sqlClientes = ("SELECT COUNT(*) AS CANTIDAD, ASIGNADO,ESTADO, FECHA_CARGA FROM ruc 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>

<BR>
<BR>

<br><br>
   
  <!--
  <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>-->





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

      <tr>
                    
              <th>USUARIO</th>
              <th>CANTIDAD</th>
              
                
                <th>VER</th>
           
            </tr>
          </thead>
          <tbody>

            <?php     


            
         
            while ($data = mysqli_fetch_array($queryData)) { ?>
            <tr>
                <tbody id="myTable">           
            <td><strong><?php echo $data['ASIGNADO']; ?></strong></td>  
              <td><strong><?php echo $data['CANTIDAD']; ?></strong></td> 
                   
           
   

      <td>  <a href="qtyuser.php?asignado=<?= $data['ASIGNADO']?>" class="btn btn-warning btn-lg" name="submit" type="submit"/a>
          <span class="glyphicon glyphicon-eye-open"></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>

