1
|
<!DOCTYPE html>
|
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
3
|
<head>
|
4
|
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
5
|
<title>Liste des images transformables en panoramas</title>
|
6
|
<link rel="stylesheet" media="screen" href="css/index_style.css"/>
|
7
|
</head>
|
8
|
<body>
|
9
|
<header>
|
10
|
<h1><img src="images/tetaneutral.svg" alt="tetaneutral.net"/></h1>
|
11
|
</header>
|
12
|
<section id="main">
|
13
|
<h2>Liste des images transformables en panoramas</h2>
|
14
|
<?php
|
15
|
require 'class/utils.class.php';
|
16
|
utils::init();
|
17
|
|
18
|
if(isset($_GET['dir']) && is_dir($_GET['dir'])) {
|
19
|
$base_dir = $_GET['dir'];
|
20
|
} else {
|
21
|
$base_dir='upload';
|
22
|
}
|
23
|
|
24
|
try {
|
25
|
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
26
|
$did = opendir($base_dir);
|
27
|
|
28
|
echo "<ul id=\"pano-list\">\n";
|
29
|
|
30
|
while(false !== ($filename = readdir($did))) {
|
31
|
if (!preg_match('/^\.\.?$/', $filename)) {
|
32
|
$ftype = finfo_file($finfo, $base_dir.'/'.$filename);
|
33
|
if (isset($ftype)) {
|
34
|
$cmt = $filename;
|
35
|
$title = sprintf(' title="fichier de type %s"', $ftype);
|
36
|
} else {
|
37
|
$cmt = sprintf('<samp>%s</samp>', $filename);
|
38
|
$title = '';
|
39
|
}
|
40
|
printf ('<li%s><a href="genererPano.php?dir=%s&name=%s">%s</a></li>'."\n", $title, $base_dir, $filename, $cmt);
|
41
|
}
|
42
|
}
|
43
|
echo "</ul>\n";
|
44
|
finfo_close($finfo);
|
45
|
} catch (Exception $e) {
|
46
|
printf("<h3 class=\"warning\">désolé mais aucun site n'est disponible...</h3>\n");
|
47
|
}
|
48
|
?>
|
49
|
<p id="interaction">
|
50
|
<a href="." title="Revenir à la liste des panoramas">Retour</a>
|
51
|
</p>
|
52
|
</section>
|
53
|
<footer class="validators"><samp>
|
54
|
page validée par
|
55
|
<a href="http://validator.w3.org/check?uri=referer"><img src="images/valid_xhtml.svg"
|
56
|
alt="Valid XHTML" title="xHTML validé !"/></a>
|
57
|
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="images/valid_css.svg"
|
58
|
alt="CSS validé !" title="CSS validé !"/></a>
|
59
|
</samp></footer>
|
60
|
</body>
|
61
|
</html>
|