aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-05 14:32:19 +0200
committerMateja <mail@matejamaric.com>2020-10-05 14:32:19 +0200
commit2fec3cd2d3d302dea152569a45e164aa6c7ec6a8 (patch)
tree895b76b07fb3edf4e54bf77748fd6b57aaaf3a6e
parent61f1ca8df73673e42fa52e5b73ab8c9fa3dab5fb (diff)
downloadold-php-yota-2fec3cd2d3d302dea152569a45e164aa6c7ec6a8.tar.gz
old-php-yota-2fec3cd2d3d302dea152569a45e164aa6c7ec6a8.zip
Callsign and query fixes
-rw-r--r--admin.php4
-rw-r--r--index.php4
-rw-r--r--request-edit.js6
-rw-r--r--reservation.php4
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 "<tr>";
echo "<th>ID</th>";
echo "<th>Approved</th>";
- echo "<th>Operator Sign</th>";
+ echo "<th>Operator Callsign</th>";
echo "<th>QSO</th>";
echo "<th>From</th>";
echo "<th>To</th>";
echo "<th>Frequencies</th>";
echo "<th>Modes</th>";
- echo "<th>Special sign</th>";
+ echo "<th>Special Callsign</th>";
echo "<th>Operator Name</th>";
echo "<th>Operator Email</th>";
echo "<th>Operator Phone</th>";
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 "<th>Operator</th>";
echo "<th>From</th>";
echo "<th>To</th>";
- echo "<th>Special sign</th>";
+ echo "<th>Special Callsign</th>";
echo "<th>Frequencies</th>";
echo "<th>QSO</th>";
echo "</tr></thead><tbody>\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 "<tr>";
echo "<td>" . $row['operatorCall'] . "</td>";
echo "<td>" . $row['fromTime'] . "</td>";
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"])) {
<form action="handle-reservation.php" method="post">
<!-- SPECIAL CALL -->
-<label for="special-call">Special Call:</label>
+<label for="special-call">Special Callsign:</label>
<select id="special-call" name="scall">
<option value="YT50SCWC">YT50SCWC</option>
</select>
@@ -124,7 +124,7 @@ if (isset($_SESSION["msg"])) {
</fieldset>
<!-- OPERATOR CALL -->
-<label for="operator-call">Operator call sign:</label>
+<label for="operator-call">Operator Callsign:</label>
<input type="text" id="operator-call" name="ocall">
<!-- OPERATOR NAME -->
<label for="operator-name">Operator name:</label>