<?php


$consulta = $_POST['Consultar'];

?>



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

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








<div class="container">



       


<br>
<br>

    <div class="row">

    

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


    
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h5 class="text-center">TOTAL</h5>            
         
       
                    <p class="text-center">VALIDADOS</p>
              
</div>
 <form action="qtyuser3.php" method="POST">


   <th><input class="btn btn-success" name="submit" type="submit" value="Consultar" /> 
                <center> </center> </th>     
<th>
    <center><select class="form-control" name="Consultar" autofocus required/></center>

<option value=""></option>
<option value="J AMPUERO">J AMPUERO</option> 
<option value="P MOYA">P MOYA</option>
<option value="K FERNANDEZ">K FERNANDEZ</option>
<option value="P GROSSLING">P GROSSLING</option>
<option value="J GONZALEZ">J GONZALEZ</option>
<option value="M FLORES">M FLORES</option>
<option value="E RUBIO">E RUBIO</option>
<option value="F CHAVEZ">F CHAVEZ</option>
<option value="L MARTINEZ">L MARTINEZ</option>
<option value="G GASTON">G GASTON</option>
<option value="J RODRIGUEZ">J MARTINEZ</option>
<option value="J BERNALES">J BERNALES</option>
<option value="J LINARES">J LINARES</option>


</th>    



</select>


</table>
</tbody>


        </div>

        </div>


        

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



            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h5 class="text-center">TOTAL</h5>
                    <p class="text-center">VALIDADOS</p>
              
</div>
   
 <?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, FECHA_ASIG, ASIGNADO FROM ruc  WHERE ASIGNADO = '$consulta' GROUP BY ASIGNADO 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);


  ?>

     <table class="table  table-hover">
    <thead class="thead-dark">



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

            <?php     


            
            $rut = '15844765-7';
            $i = 1;
            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>  
              
            
             

       
</tr>



          <?php } ?>

</table>
</tbody>
        </div>

        </div>



      <div class="col-sm-4">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="text-center">CASOS ASIGNADOS</h3>
                    <p class="text-center">VALIDADOS</p>
              
</div>
   
 <?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  WHERE ASIGNADO = '$consulta' 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);

 

  ?>

     <table class="table  table-hover">
    <thead class="thead-dark">



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

       
</tr>



          <?php } ?>

</table>
        </div>

        </div>  </div> 



<br>
<br>




   <div class="col-md-3">
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <h5 class="text-center">CASOS POR FECHA</h5>
                    <p class="text-center"></p>
              
</div>
   
 <?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, FECHA_ASIG FROM ruc  WHERE ASIGNADO = '$consulta' GROUP BY FECHA_ASIG ORDER BY  FECHA_CARGA 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);


  ?>

     <table class="table  table-hover">
    <thead class="thead-dark">



 <tr>
           
              <th>FECHA ASIGNACION</th>
              <tH>CANTIDAD</tH>
             
              
            </tr>
          </thead>
          <tbody>

            <?php     


            
            $rut = '15844765-7';
            $i = 1;
            while ($data = mysqli_fetch_array($queryData)) { ?>
            <tr>
                <tbody id="myTable">
             
             
              <td><strong><?php echo $data['FECHA_ASIG']; ?></strong></td> 
              <td><strong><?php echo $data['CANTIDAD']; ?></strong></td>  
              
            
             

       
</tr>



          <?php } ?>

</table>
</tbody>
        </div>

        </div>











        <div class="col-md-3">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="text-center">EQUIPOS</h3>
                    <p class="text-center"></p>
                </div>
               <?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, FECHA_ASIG, DECISION FROM ruc WHERE ASIGNADO = '$consulta' AND DECISION = 'EQUIPO' GROUP BY FECHA_ASIG ORDER BY  FECHA_CARGA 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);


  ?>


     <table class="table  table-hover">
    <thead class="thead-dark">



  <tr>
                    
             <th>FECHA</th>
              <tH>CANTIDAD</tH>
              
                
          
           
            </tr>
          </thead>
          <tbody>

            <?php     


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

                   
           
   

</tr>




</body>
</html>





 
          <?php } ?>

          </table>
</tbody>
        </div>

       






        </div>
        <div class="col-md-3">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <h5 class="text-center">TRANSFERENCIAS</h5>
                    <p class="text-center"></p>
               
        </div>


   <?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, FECHA_ASIG, DECISION FROM ruc WHERE ASIGNADO = '$consulta'  AND DECISION = 'TRANSFERENCIAS' GROUP BY FECHA_ASIG ORDER BY  FECHA_CARGA 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);


  ?>


     <table class="table">
    <thead class="thead-dark">



  <tr>
                    
          <th>FECHA</th>
              <tH>CANTIDAD</tH>
              
                
          
           
            </tr>
          </thead>
          <tbody>

            <?php     


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

</tr>




</body>
</html>





 
          <?php } ?>

          </table>
</tbody>
</div>

        
        </div>


        <div class="col-md-2">
            <div class="panel panel-warning">
                <div class="panel-heading">
                    <h3 class="text-center">AP</h3>
                    <p class="text-center"></p>
                </div>




   <?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, FECHA_ASIG, DECISION FROM ruc WHERE ASIGNADO = '$consulta' AND DECISION = 'AP' GROUP BY FECHA_ASIG ORDER BY  FECHA_CARGA 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);


  ?>


     <table class="table  table-hover">
    <thead class="thead-dark">



  <tr>
                    
            <th>FECHA</th>
              <tH>CANTIDAD</tH>
                
          
           
            </tr>
          </thead>
          <tbody>

            <?php     


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

                   
           
   

</tr>




</body>
</html>





 
          <?php } ?>

          </table>
</tbody>
</div>

        </div>



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