-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecords.html
93 lines (91 loc) · 3.05 KB
/
records.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Records - St. Lawrence Guild</title>
<link rel="icon" href="C:\Church\public\ch_Y0b_icon.ico" type="ch_Y0b_icon.ico">
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #00274D; /* Deep blue background */
color: white;
}
.content {
margin: 20px;
}
table {
width: 80%;
margin: auto;
border-collapse: collapse;
background-color: white;
color: #00274D; /* Deep blue text */
}
th, td {
border: 1px solid #ddd;
padding: 8px;
}
th {
background-color: #FFCC33; /* Gold header */
color: #00274D; /* Deep blue text */
}
button {
background-color: #FFCC33; /* Gold button */
border: none;
padding: 5px 10px;
color: #00274D; /* Deep blue text */
cursor: pointer;
}
button:hover {
background-color: #FFB732; /* Slightly darker gold on hover */
}
</style>
</head>
<body>
<div class="header">
<h1>Thank your for using this free service. Support at <a href = https://mail.google.com/mail/u/0/#inbox> [email protected]<a/> </h1><img src = "images.jpg">
</div>
<div class="content">
<h1>Records</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Surname</th>
<th>Status</th>
<th>Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="recordsTableBody">
</tbody>
</table>
</div>
<script>
function loadRecords() {
const records = JSON.parse(localStorage.getItem('records')) || [];
const tableBody = document.getElementById('recordsTableBody');
tableBody.innerHTML = '';
records.forEach((record, index) => {
const row = document.createElement('tr');
row.innerHTML = `
<td>${record.name}</td>
<td>${record.surname}</td>
<td>${record.status}</td>
<td>${new Date(record.date).toLocaleDateString()}</td>
<td><button onclick="deleteRecord(${index})">Delete</button></td>
`;
tableBody.appendChild(row);
});
}
function deleteRecord(index) {
let records = JSON.parse(localStorage.getItem('records')) || [];
records.splice(index, 1);
localStorage.setItem('records', JSON.stringify(records));
loadRecords();
}
window.onload = loadRecords;
</script>
</body>
</html>