Compare commits
3 Commits
9c77d8ffb0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bd87c9d1b | |||
| faec70c562 | |||
| cd1afc491c |
14
input.html
14
input.html
@@ -121,6 +121,12 @@
|
||||
outline: none;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
.optional-label {
|
||||
color: gray;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -138,7 +144,7 @@
|
||||
<input type="text" id="ac_type" name="ac_type" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ac_call">Callsign</label>
|
||||
<label class="optional-label" for="ac_call">Callsign (optional)</label>
|
||||
<input type="text" id="ac_call" name="ac_call">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -167,16 +173,16 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<label class="optional-label" for="email">Email (optional)</label>
|
||||
<input type="email" id="email" name="email" >
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone">Phone</label>
|
||||
<label class="optional-label" for="phone">Phone (optional)</label>
|
||||
<input type="text" id="phone" name="phone" >
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<label class="optional-label" for="notes">Notes (optional)</label>
|
||||
<textarea id="message" name="notes" rows="4" ></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
27
tower.php
27
tower.php
@@ -120,6 +120,7 @@ require_db_auth();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<center><h2>Swansea Inbound PPR <?php echo date('l d M Y'); ?></h2></center>
|
||||
|
||||
@@ -149,7 +150,7 @@ $result = $conn->query($sql);
|
||||
// Check if there are results
|
||||
if ($result->num_rows > 0) {
|
||||
// Start HTML table
|
||||
echo '<table border="1">
|
||||
echo '<table border="1" id="entries">
|
||||
<thead>
|
||||
<tr>';
|
||||
|
||||
@@ -169,7 +170,7 @@ if ($result->num_rows > 0) {
|
||||
|
||||
// Output table rows
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo '<tr onclick="openDetail(' . $row['id'] . ')">';
|
||||
echo '<tr data-id=' . $row['id'] . '>';
|
||||
foreach ($row as $key => $value) {
|
||||
if ($key != 'id' && $key != 'ac_call') {
|
||||
if ($key == 'ac_reg' && $row['ac_call'] != NULL) {
|
||||
@@ -197,6 +198,26 @@ $conn->close();
|
||||
|
||||
<script>
|
||||
function openPopup() {
|
||||
window.open("input.html", "PopupWindow", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=600, height=1100");
|
||||
popup = window.open("input.html", "PopupWindow", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=600, height=1100");
|
||||
const checkPopup = setInterval(() => {
|
||||
if (popup && popup.closed) {
|
||||
clearInterval(checkPopup);
|
||||
window.location.reload(); // Reload parent window
|
||||
}
|
||||
}, 500); // Check every 500ms
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
document.getElementById("entries").addEventListener("click", function (event) {
|
||||
let td = event.target.closest("td");
|
||||
if (!td) return; // Clicked outside <td>
|
||||
|
||||
let tr = td.parentElement; // Get the row
|
||||
|
||||
if (td !== tr.lastElementChild) {
|
||||
let rowId = tr.dataset.id; // Get the unique row ID
|
||||
openDetail(rowId);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user