query($query); if($result->num_rows >0){ ?> BMS Event Search Results

BMS Events

Search Results"; include("includes/menu.php"); ?>

num_rows >0){ echo ""; while ($row1 = $result->fetch_assoc()) { echo "
Event IDUnitAlertStart Date and TimeDescriptionEnd Date and TimeUserUpdatesAttachmentsEdit
"; echo "".$row1["event_id"].""; echo ""; print_r($row1["unit_name"]); echo ""; print_r($row1["alert_name"]); echo ""; print_r($row1["date_time_start"]); echo ""; echo nl2br($row1["description"]); echo ""; print_r($row1["date_time_end"]); echo ""; print_r($row1["user"]); echo ""; $update_query = "SELECT update_desc, update_date_time, update_user, update_image FROM event_updates WHERE event_updates.event_id=".$row1["event_id"].";"; $update_result = $conn->query($update_query); if ($update_result->num_rows >0){ while ($update_row = $update_result->fetch_assoc()) { echo ""; if(empty($update_row['update_image'])) { echo "
"; echo "Info: "; echo ""; echo nl2br($update_row['update_desc']); echo "
"; echo "User: "; echo ""; print_r($update_row['update_user']); echo "
"; echo "Time: "; echo ""; print_r($update_row['update_date_time']); echo "
"; } else { echo "
"; echo "Image: "; echo ""; echo "Attachment"; echo "
"; } } } else { echo "No updates to this event"; } echo ""; if(empty($row1["event_image"])) { echo ""; } else { echo "Attachment"; } echo ""; echo "Edit"; echo ""; } echo ""; } } else{ echo('No Results Found! Please Go back and try again'); } ?>