-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscreenshots.php
44 lines (36 loc) · 1.32 KB
/
screenshots.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
<?php require_once('header.php'); ?>
<h1 property="dc:title" datatype="">Screenshots</h1>
<div class="content clearfix">
<div class="field field-name-body field-type-text-with-summary field-label-hidden">
<div class="field-items">
<div class="field-item even" property="content:encoded">
<?php
$dir = "./screenshots/";
$arrFiles = array();
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (filetype($dir . $file) == 'file'){
$arrExtension = explode('.', $file);
$arrFilename = explode('_', $arrExtension[0]);
$imageNo = $arrFilename[0];
$tempFile = array();
$tempFile['note'] = str_replace($imageNo, "<b>".$imageNo."</b>. ", join(' ', $arrFilename));
$tempFile['image'] = $dir . $file;
$arrFiles[(int) $imageNo] = $tempFile;
}
}
closedir($dh);
}
}
ksort($arrFiles);
foreach ($arrFiles as $f){
echo '<img style="border: thin solid #000;" width="550px" src="'.$f['image'].'"><br />';
echo '<i>'. $f['note'] .'</i><br /><br />';
}
?>
</div>
</div>
</div>
</div>
<?php require_once('footer.php'); ?>