Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <?php
  2. include('connect.php');
  3. ?>
  4. <?php
  5.  
  6. $i = date("dd/mm/YY");
  7.  
  8. if ($row['alert_code'] < $i) {
  9. echo ("atas");
  10. } else {
  11. echo ("bawah");
  12. }
  13. ?>
  14.  
  15. <?php
  16. $result=mysqli_query($con,'select * from tb_data_tracker ORDER BY alert_id DESC LIMIT 10');
  17.  
  18. while($row=mysqli_fetch_array($result)){
  19. ?>
  20.  
  21. <table class="table small" id="<?php echo $row['alert_id']; ?>">
  22. <thead class="thead-default">
  23. <tr>
  24. <th>#</th>
  25. <th>Alert!</th>
  26. <th>Address</th>
  27.  
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <tr>
  32. <th scope="row"><?php echo $row['alert_id']; ?></th>
  33. <td>
  34. <!--**
  35. - alert code
  36. = report username
  37. = report userphone
  38. **-->
  39.  
  40. <?php
  41. $alert_code = $row['alert_code'];
  42.  
  43. switch ($alert_code) {
  44. case 'Red':
  45. echo '<div class="alert alert-danger text-center text-danger"> <h4> ' .$row['alert_code']. '</h4></div>';
  46. break;
  47. case 'Yellow':
  48. echo '<div class="alert alert-warning text-center text-warning"> <h4> ' .$row['alert_code']. '</h4></div>';
  49. break;
  50. case 'Green':
  51. echo '<div class="alert alert-success text-center text-success"> <h4> ' .$row['alert_code']. '</h4></div>';
  52. break;
  53. }
  54.  
  55. ?>
  56.  
  57. <strong> Info pelapor:</strong> <br /> <?php echo $row['alert_report_userphone']; ?> <br /> <?php echo $row['alert_report_username']; ?>
  58. <br> (<?php echo $row['alert_datetime']; ?>)
  59.  
  60. </td>
  61. <td><a href="#mapModal<?php echo $row['alert_id']; ?>" class="" data-toggle="modal">
  62. <span class="material-icons md-18" aria-hidden="true">map</span> Map </a> <p><br /> <?php echo $row['alert_address']; ?> </p>
  63.  
  64. <h5><em><?php echo $row['alert_report_type']; ?></em></h5>
  65. </td>
  66.  
  67. </tr>
  68. <?php include('addmodal.php'); ?>
  69.  
  70. </tbody>
  71. </table>
  72. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement