Advertisement
Guest User

Untitled

a guest
Jun 4th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <?php
  2. // currentpage.php
  3. include_once 'getlogs.php';
  4. if(isset($_GET['new'])){
  5. echo '<audio autoplay><source src="beep.mp3" type="audio/mpeg"></audio>';
  6. }
  7. ?>
  8.  
  9. <thead>
  10. <tr>
  11. <td><strong>Status<strong></td>
  12. <td><strong>Number</td></strong>
  13. <td><strong>Description</td></strong>
  14. <td><strong>IP</td></strong>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <?php foreach ($Logs as $log): ?>
  19. <tr>
  20. <?php
  21. echo '<td>'.$log['status'].'</td>';
  22. echo '<td>'.$log['number'].'</td>';
  23. echo '<td>'.$log['description'].'</td>';
  24. echo '<td>'.$log['ip'].'</td>';;
  25. ?>
  26. </tr>
  27. <?php endforeach; ?>
  28. </tbody>
  29. </div>
  30. <script>
  31. setInterval(function(){
  32. $.ajax({
  33. url: 'getlogs.php',
  34. dataType: 'text',
  35. success:function(data){
  36. if(data == 'new'){
  37. document.location = "currentpage.php?new";
  38. }
  39. }
  40. });
  41. }, 5000);
  42. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement