simpel-foto-systeem
fotos.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
show.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
error_reporting(E_ALL);
if (preg_match('/\.\./',$_GET['map'])) {
echo "Geen toegang";
} else {
$map = htmlentities($_GET['map']);
$maindir = 'fotos/' . $map. '/';
if($handle = opendir($maindir)){
while($file = readdir($handle)){
if(eregi('.jpg|.jpeg|.gif|.bmp|.png', $file)){
echo '<A href="' . $maindir . $file . '" target ="_blank"><img src="' . $maindir . $file . '" width="250" height="250" border="0" /></a>';
}
}
}
}
?>
error_reporting(E_ALL);
if (preg_match('/\.\./',$_GET['map'])) {
echo "Geen toegang";
} else {
$map = htmlentities($_GET['map']);
$maindir = 'fotos/' . $map. '/';
if($handle = opendir($maindir)){
while($file = readdir($handle)){
if(eregi('.jpg|.jpeg|.gif|.bmp|.png', $file)){
echo '<A href="' . $maindir . $file . '" target ="_blank"><img src="' . $maindir . $file . '" width="250" height="250" border="0" /></a>';
}
}
}
}
?>