This repository has been archived by the owner on Oct 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.php
91 lines (79 loc) · 2.57 KB
/
gallery.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
<?php
/**
* Created by PhpStorm.
* User: rdanko
* Date: 26.5.2017
* Time: 9:56
*/
include_once 'session.php';
?>
<head>
<?php
include_once 'includes.php';
?>
<link href="assets/lightGallery/css/lightgallery.css" rel="stylesheet">
<link href="assets/css/gallery.css" rel="stylesheet">
<script src="assets/lightGallery/js/lightgallery.min.js"></script>
<script src="assets/lightGallery/js/lg-thumbnail.min.js"></script>
<script src="assets/lightGallery/js/lg-zoom.js"></script>
<script src="assets/lightGallery/js/lg-fullscreen.min.js"></script>
<script src="assets/js/gallery.js"></script>
<script src="assets/lightGallery/js/lg-autoplay.js"></script>
<script src="assets/lightGallery/js/lg-zoom.js"></script>
<script src="assets/lightGallery/js/lg-hash.js"></script>
<script src="assets/lightGallery/js/lg-pager.js"></script>
</head>
<body>
<?php
include_once 'menu.php';
include_once 'DB_config.php';
?>
<div class="row row-no-margin">
<div class="container-fluid col-lg-3">
<table class="table table-hover col-lg-12">
<thead>
<th>
<?php echo $lang['galery.galery_list']; ?>
</th>
</thead>
<tbody>
<?php
$conn = new mysqli($servername, $username, $password, $db_name);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$conn->set_charset('utf8');
$stmt = $conn->stmt_init();
if ($stmt = $conn->prepare("SELECT id,date,title_sk,title_en,folder FROM GALERY")){
$stmt->execute();
/* bind result variables */
$stmt->bind_result($id, $date, $title_sk, $title_en, $folder);
while ($stmt->fetch()) {
echo "<tr folder=" . $folder . "><td>";
if ($_SESSION['lang'] == "en"){
echo $title_en;
}
elseif ($_SESSION['lang'] == "sk"){
echo $title_sk;
}
echo "</td></tr>";
}
$stmt->close();
}
else{
echo "false";
}
$conn->close();
?>
</tbody>
</table>
</div>
<div class="container-fluid col-lg-9">
<div class="demo-gallery">
<ul id="lightgallery" class="list-unstyled row">
</ul>
</div>
</div>
</div>
<?php include_once('footer.php');?>
</body>