-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminPaneel.php
204 lines (140 loc) · 6.2 KB
/
adminPaneel.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?php
/**
* Created by PhpStorm.
* User: BobFagit
* Date: 13-12-2016
* Time: 09:21
*/
session_start();
include("./includes/header.php");
?>
<body>
<div class="container-fluid">
<div class="row" style="padding-top:90px;">
<div class="col-md-6 col-md-offset-3">
<!--verwijderen foto vanaf hier-->
<form class="form-group" method="POST" action="adminPaneel.php">
<h1>Verwijder een foto!</h1>
<div class="well">
<label for="onderwerpen">Selecteer</label>
<select class="form-control" name="dir" id="onderwerpen">
<?php
$scan = scandir("./assets/images");
foreach (array_slice($scan, 2) as $option){
echo "<option>". $option ."</option>";
}
?>
</select>
<input class="form-control" type="submit" value="Inhoud map">
</form>
<form class="form-group" method="POST" action="fotoVerwijderen.php">
<ul class="list-group">
<?php
if(ISSET($_POST['dir'])){
$_SESSION['dir'] = $_POST['dir'];
$dir1 = "assets/images/".$_SESSION['dir']."/";
$dir = scandir("assets/images/".$_POST['dir']);
echo "<div class='form-control' style='overflow: scroll; height: 500px;'>";
foreach (array_slice($dir, 2) as $item){
echo "
<li class='list-group-item list-group-item-action' onmouseover=\"showPhoto('".$dir1.$item."')\" onmouseout=\"hidePhoto('".$dir1.$item."')\">
<input class='form-group' name='verwijderen' value='$item' type='checkbox'>
".$dir1.$item."
<div id='".$dir1.$item."' style='display:none'>
<img style='width:25%;' class='img-responsive' src='".$dir1.$item."'></div>
</li>
";
}
}
echo "</ul>";
if(ISSET($_POST['dir'])) {
echo "<input class='form-control' type='submit' value='Verwijder Foto'>";
}
?>
</div>
</form>
<!--uploaden foto vanaf hier -->
<form class="form-group" method="POST" action="upload.php" enctype="multipart/form-data">
<h1>Upload een foto!</h1>
<div class="well">
<div class="form-group" style="position: static;">
<label for="onderwerpen">Selecteer</label>
<select class="form-control" name="dir" id="onderwerpen">
<?php
$scan1 = scandir("./assets/images");
foreach (array_slice($scan1, 2) as $option1){
echo "<option>". $option1 ."</option>";
}
?>
</select>
<p class="help-block">Selecteer hier de categorie waar de foto bij hoort.</p>
</div>
<div class="form-group" style="position: static;">
<label class="form-control-label" for="fileToUpload">Selecteer een foto:</label>
<input class="form-control" type="file" name="fileToUpload" id="fileToUpload">
<p class="help-block">Selecteer hier de foto die u wilt uploaden.</p>
</div>
<div class="form-group" style="padding-right: 20px; position: static;">
<input class="form-control" type="submit" value="Upload Image" name="submit">
</div>
</div>
</form>
<!--Map/album toevoegen-->
<form class="form-group" method="POST" action="mapMaken.php">
<h1>Maak een nieuw album!</h1>
<div class="well">
<div class="form-group">
<label for="album">Type hier de naam van het nieuwe album:</label>
<input class="form-control" type="text" name="album">
<br>
<input class="form-control" type="submit" value="Maak album" name="submit">
</div>
</div>
</form>
<!--map/album verwijderen-->
<form class="form-group" method="POST" action="mapVerwijderen.php">
<h1>Verwijder een album!</h1>
<div class="well">
<div class="form-group">
<label for="albumVerwijder">Selecteer het album die verwijderd moet worden</label>
<select class="form-control" name="albumVerwijder">
<?php
$dir2 = scandir("./assets/images");
foreach(array_slice($dir2, 2) as $album){
echo"<option>". $album ."</option>";
}
?>
</select>
<input class="form-control" type="submit" value="verwijder album">
</div>
</div>
</form>
</div>
</div>
<script>
function showPhoto(item){
var e = document.getElementById(item);
e.style.display = 'block';
}
function hidePhoto(item){
var e = document.getElementById(item);
e.style.display = 'none';
}
</script>
<script src="assets/web/assets/jquery/jquery.min.js"></script>
<script src="assets/tether/tether.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/smooth-scroll/SmoothScroll.js"></script>
<script src="assets/viewportChecker/jquery.viewportchecker.js"></script>
<script src="assets/bootstrap-carousel-swipe/bootstrap-carousel-swipe.js"></script>
<script src="assets/jquery-mb-ytplayer/jquery.mb.YTPlayer.min.js"></script>
<script src="assets/masonry/masonry.pkgd.min.js"></script>
<script src="assets/imagesloaded/imagesloaded.pkgd.min.js"></script>
<script src="assets/dropdown/js/script.min.js"></script>
<script src="assets/touchSwipe/jquery.touchSwipe.min.js"></script>
<script src="assets/theme/js/script.js"></script>
<script src="assets/mobirise-slider-video/script.js"></script>
<script src="assets/mobirise-gallery/player.min.js"></script>
<script src="assets/mobirise-gallery/script.js"></script>
</body>
</html>