-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGalery.php
55 lines (47 loc) · 1.54 KB
/
Galery.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
<?php
$connect = mysqli_connect("localhost", "root", "", "galery");
if (!$connect)
{
echo "Error Code: " . mysqli_connect_errno() . "<br>";
echo "Error Message: " . mysqli_connect_error() . "<br>";
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<style> body
{
background-image: url("Images/Background.jpeg");
}
</style>
<link href="node_modules/lightbox2/src/css/lightbox.css" rel="stylesheet"/>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/Galery.css">
<link rel="shortcut icon" href="images/ServerLogoTrans.ico">
<title>Galery</title>
</head>
<body>
<h2>Galerie</h2>
<div class="PhotoScreen">
<?php
$query = 'SELECT id,Filename
FROM images
ORDER BY Filename';
$result = mysqli_query($connect, $query);
while ($record = mysqli_fetch_assoc($result))
{
echo '
<a href="UserUploaded/'.$record["Filename"].'" data-lightbox="Boosters" data-title="'.$record["Filename"].'">
<img src="UserUploaded/'.$record["Filename"].'" width = auto height = 500pt>
</a>
';
}
?>
</div>
<!-- <a href="Upload.php"><button class="button normalbutton">Upload</button></a> -->
<script src="node_modules/lightbox2/dist/js/lightbox-plus-jquery.js"></script>
</body>
</html>