-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.php
42 lines (34 loc) · 883 Bytes
/
view.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
<?php
// Include the database configuration file
require_once 'dbConfig.php';
// Get image data from database
$result = $db->query("SELECT image FROM images ORDER BY uploaded DESC");
?>
<!DOCTYPE html>
<html>
<head>
<title>NOTICES</title>
<style>
body {
background-color: linen;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<h1><center>NOTICES</h1></center>
<?php if($result->num_rows > 0){ ?>
<div class="gallery">
<?php while($row = $result->fetch_assoc()){ ?>
<img src="data:image/jpg;charset=utf8;base64,<?php echo base64_encode($row['image']); ?>" height="400" width="400" />
<?php } ?>
</div>
<?php }
else{ ?>
<p class="status error">Image(s) not found...</p>
<?php
}
?>
</body>
</html>