Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <button type="button" name="Delete" Onclick="if(confirm('Tem certeza de que deseja excluir esta Mensagem?')) deletar();" class="btn btn-primary"><i class="glyphicon glyphicon-envelope"></i><i class="glyphicon glyphicon-remove-sign"></i></button>
  2.  
  3. <table class="table table-responsive table-striped table-bordered table-condensed table-hover">
  4. <thead>
  5. <tr>
  6. <th>De</th>
  7. <th>Assunto</th>
  8. <th>Prioridade</th>
  9. <th>Recebido</th>
  10. </tr>
  11. </thead>
  12. <thead>
  13. <tr>
  14. <?php
  15. do{
  16. if($nomede != $produto["De"]){
  17. ?>
  18. <th width="10%" colspan=4>Recebido: <?php echo $produto["Data"]; ?></th>
  19. <?php
  20. $nomede = $produto["De"];
  21. }
  22. ?>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <tr>
  27. <td><?php echo $produto["De"]; ?></td>
  28. <td class="td-info view_data apagar" id="<?php echo $produto["Id"]; ?>,<?php echo $produto["Para"]; ?>" data-toggle="modal" href="#dataModal" width="20%" <?php echo $produto["Status"] != '0'?' style="font-weight:bold; font-size: 90%" ':' style="font-weight:normal; font-size: 90%" '?>><?php echo $produto["Assunto"]; ?></td>
  29. <td><?php echo $produto["Prioridade"]; ?></td>
  30. <td><?php echo $produto["Hora"]; ?></td>
  31. </tr>
  32. <?php } while($produto = $resultado_cursos->fetch_assoc()); ?>
  33. </tbody>
  34. </table>
  35.  
  36. function deletar(){
  37. var ids = []; //arraypara armazenar os id's a serem deletados
  38. $(".colorir").each(function(){ //percorre todos os tr que possui a classe colorir
  39. ids.push($(this).find(".apagar").attr("Id")); //adiciona o id da linha ao array
  40. $(this).remove();
  41. })
  42.  
  43. $.ajax({
  44. url: './deletealerta',
  45. type: 'POST',
  46. cache: false,
  47. data: {ids:ids},
  48. error: function(){
  49.  
  50. },
  51. success: function(result)
  52. {
  53. }
  54. });
  55. }
  56.  
  57. .colorir {
  58. background-color:#81BEF7;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement