diff --git a/search_results.php b/search_results.php index a352fb7..b8d8c42 100644 --- a/search_results.php +++ b/search_results.php @@ -56,12 +56,66 @@ if($result->num_rows >0){
num_rows >0){ - echo ""; - while ($row1 = $result->fetch_assoc()) { - echo " "; + echo "
Event IDUnitAlertStart Date and TimeDescriptionEnd Date and TimeUserEdit
".$row1["event_id"]."".$row1["unit_name"]."".$row1["alert_name"]."".$row1["date_time_start"]."".$row1["description"]."".$row1["date_time_end"]."".$row1["user"]."Edit
"; + 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');