Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // currentpage.php
- include_once 'getlogs.php';
- if(isset($_GET['new'])){
- echo '<audio autoplay><source src="beep.mp3" type="audio/mpeg"></audio>';
- }
- ?>
- <thead>
- <tr>
- <td><strong>Status<strong></td>
- <td><strong>Number</td></strong>
- <td><strong>Description</td></strong>
- <td><strong>IP</td></strong>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($Logs as $log): ?>
- <tr>
- <?php
- echo '<td>'.$log['status'].'</td>';
- echo '<td>'.$log['number'].'</td>';
- echo '<td>'.$log['description'].'</td>';
- echo '<td>'.$log['ip'].'</td>';;
- ?>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </div>
- <script>
- setInterval(function(){
- $.ajax({
- url: 'getlogs.php',
- dataType: 'text',
- success:function(data){
- if(data == 'new'){
- document.location = "currentpage.php?new";
- }
- }
- });
- }, 5000);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement