-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
124 lines (108 loc) · 2.93 KB
/
index.php
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
require_once 'config/connection.php';
// Ambil data jenis surat dari database
$sql = "SELECT id, nama_surat FROM jenis_surat";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pembuatan Surat Otomatis</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
header {
background-color: #e0f2f1;
color: #004d40;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
margin: 0;
font-size: 24px;
}
.login-admin {
margin-right: 20px;
}
.login-admin a {
color: #004d40;
text-decoration: none;
padding: 10px 20px;
border: 2px solid #004d40;
border-radius: 5px;
transition: background-color 0.3s, color 0.3s;
}
.login-admin a:hover {
background-color: #b2dfdb;
color: #004d40;
}
main {
padding: 20px;
text-align: center;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.container a {
background-color: #007bff;
color: white;
text-decoration: none;
padding: 15px 20px;
margin: 10px;
border-radius: 5px;
flex: 1 1 calc(33.333% - 40px); /* Adjust the width based on container space */
box-sizing: border-box;
text-align: center;
transition: background-color 0.3s, color 0.3s;
}
.container a:hover {
background-color: #0056b3;
}
.back-home {
margin-top: 20px;
text-align: center;
}
footer {
background-color: #e0f2f1;
color: #004d40;
text-align: center;
padding: 10px;
position: fixed;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<header>
<h1>Sistem Persuratan Online Gampong Beusa Seberang</h1>
<div class="login-admin">
<a href="auth/login.php">Login</a>
</div>
</header>
<main>
<h2>Pilih Jenis Surat yang Ingin Anda Buat:</h2>
<div class="container">
<?php while($row = $result->fetch_assoc()): ?>
<a href="guest/buat_surat.php?type=<?= $row['id'] ?>"><?= htmlspecialchars($row['nama_surat']) ?></a>
<?php endwhile; ?>
</div>
</main>
<footer>
<p>© 2024 Sistem Persuratan Online</p>
</footer>
</body>
</html>
<?php
$conn->close();
?>