From 0d08ae04cd03aa73cda27c206303c8071f7b123c Mon Sep 17 00:00:00 2001 From: Russ Date: Sun, 5 Apr 2015 18:50:19 -0400 Subject: [PATCH] Added edit button to viewevent.php, cleaned up other misc files. --- index.php | 4 +-- search_results.php | 2 +- viewevent.php | 69 +++++++++++++++++++++++++--------------------- 3 files changed, 41 insertions(+), 34 deletions(-) diff --git a/index.php b/index.php index f2a1f3f..b9530b5 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,7 @@ if( $_SESSION['access'] != 1 ) { if ($result1->num_rows >0){ echo ""; while ($row1 = $result1->fetch_assoc()) { - echo " "; + 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
".$row1["event_id"]."".$row1["unit_name"]."".$row1["alert_name"]."".$row1["date_time_start"]."".$row1["description"]."".$row1["date_time_end"]."".$row1["user"]."Edit
"; } else { @@ -52,7 +52,7 @@ if( $_SESSION['access'] != 1 ) { echo "This does not include ongoing events."; echo ""; while ($row2 = $result2->fetch_assoc()) { - echo " "; + echo " "; } echo "
Event IDUnitAlertStart Date and TimeDescriptionEnd Date and TimeUserEdit
".$row2["event_id"]."".$row2["unit_name"]."".$row2["alert_name"]."".$row2["date_time_start"]."".$row2["description"]."".$row2["date_time_end"]."".$row2["user"]."Edit
".$row2["event_id"]."".$row2["unit_name"]."".$row2["alert_name"]."".$row2["date_time_start"]."".$row2["description"]."".$row2["date_time_end"]."".$row2["user"]."Edit
"; } else { diff --git a/search_results.php b/search_results.php index 8402cb5..a352fb7 100644 --- a/search_results.php +++ b/search_results.php @@ -58,7 +58,7 @@ if($result->num_rows >0){ if ($result->num_rows >0){ echo ""; while ($row1 = $result->fetch_assoc()) { - echo " "; + 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
".$row1["event_id"]."".$row1["unit_name"]."".$row1["alert_name"]."".$row1["date_time_start"]."".$row1["description"]."".$row1["date_time_end"]."".$row1["user"]."Edit
"; } diff --git a/viewevent.php b/viewevent.php index cbd2af5..74c5493 100644 --- a/viewevent.php +++ b/viewevent.php @@ -9,7 +9,7 @@ if( $_SESSION['access'] != 1 ) { ?> - + BMS Events @@ -21,8 +21,8 @@ if( $_SESSION['access'] != 1 ) { echo "Hello, "; print_r($_SESSION['uname']); } - echo "

View Event

"; - include("includes/menu.php"); ?> + echo "

View Event

"; + include("includes/menu.php"); ?>
query($sql1); if ($result1->num_rows >0){ while ($row1 = $result1->fetch_assoc()) { - echo "
"; - echo "
"; - echo "Unit: "; - echo ""; - print_r($row1['unit_name']); - echo "
"; - echo "Alert: "; - echo ""; - print_r($row1['alert_name']); - echo "
"; - echo "Start Date and Time: "; - echo ""; - print_r($row1['date_time_start']); - echo "
"; - echo "Currently Ongoing? "; - echo ""; - if($row1['is_ongoing'] ==1) { - echo "Yes"; - } else { - echo "No"; - } - echo "
"; - echo "End Date and Time: "; - echo ""; - print_r($row1['date_time_end']); - echo "
"; - } - } else { + echo "
"; + echo ""; + echo "
"; + echo "Unit: "; + echo ""; + print_r($row1['unit_name']); + echo "
"; + echo "Alert: "; + echo ""; + print_r($row1['alert_name']); + echo "
"; + echo "Description: "; + echo ""; + echo nl2br($row1['description']); + echo "
"; + echo "Start Date and Time: "; + echo ""; + print_r($row1['date_time_start']); + echo "
"; + echo "Currently Ongoing? "; + echo ""; + if($row1['is_ongoing'] ==1) { + echo "Yes"; + } else { + echo "No"; + } + echo "
"; + echo "End Date and Time: "; + echo ""; + print_r($row1['date_time_end']); + echo "
"; + echo "Edit Event"; + echo "
"; + } + } else { echo "

ERROR Event ID Not Found

"; } if ($conn1->connect_error) {