dispositivos.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php $this->renderInclude("header");?>
  2. <hr class=".page-title-hr">
  3. <table class="table table-hover table-striped">
  4. <thead>
  5. <tr>
  6. <th>Dispositivo</th>
  7. <th>Registrado</th>
  8. <th>Último inicio de sesión</th>
  9. <th></th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. <?php while ($d = $this->db()->getRow($dispositivos)) { ?>
  14. <tr>
  15. <td><?php echo $d->dispositivo;?></td>
  16. <td><?php echo $d->registrado;?></td>
  17. <td><?php echo $d->ultimo_login;?></td>
  18. <td><button type="button" class="btn btn-danger btn-xs delete" data-id="<?php echo $d->id;?>">Eliminar</button></td>
  19. </tr>
  20. <?php } ?>
  21. </tbody>
  22. </table>
  23. <script>
  24. $(document).ready(function(){
  25. $('.delete').click(function(){
  26. const id = $(this).attr('data-id');
  27. $.webApp_modal('¿Desea eliminar el dispositivo?', 'Eliminar', [
  28. {
  29. text: 'Eliminar',
  30. eventFunction: function(){
  31. $.blockUI();
  32. window.location = 'usuario/dispositivos?id=' + id;
  33. }
  34. },
  35. {
  36. text: 'Cancelar',
  37. close: true
  38. }
  39. ], 'S');
  40. });
  41. });
  42. </script>
  43. <?php $this->renderInclude("footer");?>