From 2fec3cd2d3d302dea152569a45e164aa6c7ec6a8 Mon Sep 17 00:00:00 2001 From: Mateja Date: Mon, 5 Oct 2020 14:32:19 +0200 Subject: Callsign and query fixes --- admin.php | 4 ++-- index.php | 4 ++-- request-edit.js | 6 ++++-- reservation.php | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/admin.php b/admin.php index 17da123..579d985 100644 --- a/admin.php +++ b/admin.php @@ -41,13 +41,13 @@ if (isset($_SESSION['admin']) && $_SESSION['admin'] == true) { echo ""; echo "ID"; echo "Approved"; - echo "Operator Sign"; + echo "Operator Callsign"; echo "QSO"; echo "From"; echo "To"; echo "Frequencies"; echo "Modes"; - echo "Special sign"; + echo "Special Callsign"; echo "Operator Name"; echo "Operator Email"; echo "Operator Phone"; diff --git a/index.php b/index.php index 5262804..aac73e8 100644 --- a/index.php +++ b/index.php @@ -42,12 +42,12 @@ session_start(); echo "Operator"; echo "From"; echo "To"; - echo "Special sign"; + echo "Special Callsign"; echo "Frequencies"; echo "QSO"; echo "\n"; - foreach($db->query("SELECT * FROM $table where approved=true ORDER BY `id` DESC") as $row) { + foreach($db->query("SELECT * FROM $table where approved=true ORDER BY `fromTime`") as $row) { echo ""; echo "" . $row['operatorCall'] . ""; echo "" . $row['fromTime'] . ""; diff --git a/request-edit.js b/request-edit.js index 8ed5336..ad862c5 100644 --- a/request-edit.js +++ b/request-edit.js @@ -18,9 +18,11 @@ function btnAction(action, btn) { operatorPhone: trData[11].firstElementChild.innerText } - if (actionData.action == 'delete') - if (confirm("Are you sure you want to delete reservation #" + actionData.id + " made by " + actionData.operatorCall + "?")) + if (actionData.action == 'delete') { + if (confirm("Are you sure you want to delete reservation #" + actionData.id + " made by " + actionData.operatorCall + "?") === true) trDom.remove(); + else return; + } var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { diff --git a/reservation.php b/reservation.php index 689f74e..154af0b 100644 --- a/reservation.php +++ b/reservation.php @@ -36,7 +36,7 @@ if (isset($_SESSION["msg"])) {
- + @@ -124,7 +124,7 @@ if (isset($_SESSION["msg"])) { - + -- cgit v1.2.3