Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('connect.php');
- ?>
- <?php
- $i = date("dd/mm/YY");
- if ($row['alert_code'] < $i) {
- echo ("atas");
- } else {
- echo ("bawah");
- }
- ?>
- <?php
- $result=mysqli_query($con,'select * from tb_data_tracker ORDER BY alert_id DESC LIMIT 10');
- while($row=mysqli_fetch_array($result)){
- ?>
- <table class="table small" id="<?php echo $row['alert_id']; ?>">
- <thead class="thead-default">
- <tr>
- <th>#</th>
- <th>Alert!</th>
- <th>Address</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th scope="row"><?php echo $row['alert_id']; ?></th>
- <td>
- <!--**
- - alert code
- = report username
- = report userphone
- **-->
- <?php
- $alert_code = $row['alert_code'];
- switch ($alert_code) {
- case 'Red':
- echo '<div class="alert alert-danger text-center text-danger"> <h4> ' .$row['alert_code']. '</h4></div>';
- break;
- case 'Yellow':
- echo '<div class="alert alert-warning text-center text-warning"> <h4> ' .$row['alert_code']. '</h4></div>';
- break;
- case 'Green':
- echo '<div class="alert alert-success text-center text-success"> <h4> ' .$row['alert_code']. '</h4></div>';
- break;
- }
- ?>
- <strong> Info pelapor:</strong> <br /> <?php echo $row['alert_report_userphone']; ?> <br /> <?php echo $row['alert_report_username']; ?>
- <br> (<?php echo $row['alert_datetime']; ?>)
- </td>
- <td><a href="#mapModal<?php echo $row['alert_id']; ?>" class="" data-toggle="modal">
- <span class="material-icons md-18" aria-hidden="true">map</span> Map </a> <p><br /> <?php echo $row['alert_address']; ?> </p>
- <h5><em><?php echo $row['alert_report_type']; ?></em></h5>
- </td>
- </tr>
- <?php include('addmodal.php'); ?>
- </tbody>
- </table>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement