-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.php
143 lines (115 loc) · 4.43 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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
require_once 'assets/config/config.php';
require_once "vendor/autoload.php";
/*
* The Photo Tech Guru
* Created by John R. Pepp
* Date Created: July, 12, 2021
* Last Revision: September 6, 2022 @ 8:00 AM
* Version: 3.50 ßeta
*
*/
use PhotoTech\ErrorHandler;
use PhotoTech\Database;
use PhotoTech\LoginRepository as Login;
use PhotoTech\ImageContentManager;
$errorHandler = new ErrorHandler();
// Register the exception handler method
set_exception_handler([$errorHandler, 'handleException']);
$database = new Database();
$pdo = $database->createPDO();
$count = new ImageContentManager($pdo);
$total = $count->countAllPage('wildlife');
// New Instance of Login Class
$login = new Login($pdo);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=yes, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Photo Gallery</title>
<style>
.sidebar_pages {
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
justify-content: flex-start;
height: auto;
width: 100%;
}
</style>
<link rel="stylesheet" media="all" href="assets/css/stylesheet.css">
</head>
<body class="site">
<header class="nav">
<input type="checkbox" class="nav-btn" id="nav-btn">
<label for="nav-btn">
<span></span>
<span></span>
<span></span>
</label>
<nav class="nav-links" id="nav-links">
<?php $database->regular_navigation(); ?>
</nav>
<div class="name-website">
<h1 class="webtitle">The Photo Tech Guru</h1>
</div>
</header>
<main class="content" data-count="<?= $total ?>">
<div class="main_container">
<div class="home_article">
<div class="container">
</div>
</div>
<div class="home_sidebar">
<?php
if ($login->check_login_token()) {
$database->showAdminNavigation();
}
?>
<form id="gallery_category" action="gallery.php" method="post">
<label for="category">Category:</label>
<select id="category" class="select-css" name="category" tabindex="1">
<option value="general">General</option>
<option selected value="wildlife">Wildlife</option>
<option value="landscape">Landscape</option>
<option value="lego">LEGO</option>
<option value="halloween">Halloween</option>
</select>
</form>
<div class="sidebar_pages">
</div>
</div>
</div>
</main>
<aside class="sidebar">
</aside>
<div class="lightbox">
</div>
<footer class="colophon">
<p>© <?php echo date("Y") ?> The Photo Tech Guru</p>
</footer>
<!--
Copyright (c) 2022 by Annastasshia (https://codepen.io/annastasshia/pen/YzpEajJ)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<script src="assets/js/images.js"></script>
<script>
function toggleNavMenu() {
let navLinks = document.getElementById('nav-links');
if (navLinks.style.height === '0px' || navLinks.style.height === '') {
navLinks.style.height = 'calc(100vh - 3.125em)';
navLinks.style.overflowY = 'auto';
} else {
navLinks.style.height = '0px';
navLinks.style.overflowY = 'hidden';
}
}
</script>
</body>
</html>