<?php
date_default_timezone_set('America/Monterrey');

$sql="SELECT * FROM estatus_servicios where id_servicio=$id_ser";
        $query = mysqli_query($con, $sql);
        //loop through fetched data
     $numrows = mysqli_num_rows($query);
         "Total de Registros: <strong>".$numrows."</strong>";
        //echo "sql ". $sql;
        if ($numrows>0){
          echo "<div class='list-group'>";
          while ($r=mysqli_fetch_array($query)) {
             $id_servicio=$r['id_servicio'];
             $name=$r['nombre'];
              $ruta=$r['ruta'];  
              $estatus=$r['estatus'];                          
             $act=date('d/m/Y', strtotime($r['act']));
             $act_h=date('h:i a', strtotime($r['act']));
             $act_corr=date('d/m/Y', strtotime($r['act_correc']));
             $act_corr_h=date('h:i a', strtotime($r['act_correc']));
            ?>

            <div class="list-group-item">
                              <h4 class="list-group-item-heading">
                                 <?php echo $name; 
                                   
                                   if ($estatus=="ONLINE") {
                                     echo " <span class='label label-success'>En Linea</span>  <img src='success.png' class='parpadea'  style='width:12px;height:12px;'>";}
                                     elseif ($estatus=="OFFLINE") {
                                      echo " <span class='label label-danger'>FUERA DE LINEA</span>";
                                       // code...
                                     }
                                   
                                 ?>

                                 
                              </h4>
                               <p class="list-group-item-text">
                                <i class="fa fa-clock-o"></i> <small><strong>Act. </strong> <?php echo $act_h;  ?></small>  <a href="#"  data-toggle="tooltip" data-placement="bottom" title="<?php echo $act ?>">
                                    <i class="fa fa-question-circle"></i>
                                  </a>                              
                              </p>
                              <p class="list-group-item-text">
                                <i class="fa fa-clock-o"></i> <small><strong>Act. Correcta </strong>  <?php echo $act_corr_h;  ?></small>   <a href="#"  data-toggle="tooltip" data-placement="bottom" title="<?php echo $act_corr ?>">
                                    <i class="fa fa-question-circle"></i>
                                  </a>                         
                              </p>
                          </div>


                    
                      <?php
 		}
          
                 }
                  ?>