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 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 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='tiles';
|
22
|
}
|
23
|
|
24
|
$dir = new sites_dir($base_dir);
|
25
|
try {
|
26
|
$sites_list = $dir->get_sites();
|
27
|
|
28
|
echo "<ul id=\"pano-list\">\n";
|
29
|
|
30
|
foreach($sites_list as $pt) {
|
31
|
$params = $pt->get_params();
|
32
|
$pos_file = sprintf('%s/%s', $pt->get_name(), $pt->get_prefix());
|
33
|
if (isset($params['titre'])) {
|
34
|
$cmt = $params['titre'];
|
35
|
$title = sprintf(' title="fichier : %s"', $pos_file);
|
36
|
} else {
|
37
|
$cmt = sprintf('<samp>%s</samp>', $pos_file);
|
38
|
$title = '';
|
39
|
}
|
40
|
printf ('<li%s><a href="panorama.php?dir=%s&panorama=%s">%s</a></li>'."\n", $title, $base_dir, $pt->get_name(), $cmt);
|
41
|
}
|
42
|
echo "</ul>\n";
|
43
|
} catch (Exception $e) {
|
44
|
printf("<h3 class=\"warning\">désolé mais aucun site n'est disponible...</h3>\n");
|
45
|
}
|
46
|
?>
|
47
|
<p id="interaction">
|
48
|
<a href="envoyer.php" title="Envoyer une image sur le site">Ajouter un panorama</a>
|
49
|
<a href="creerPano.php" title="Générer un panorama à partir d\'une image déjà envoyée">Générer un panorama</a>
|
50
|
</p>
|
51
|
</section>
|
52
|
<footer>
|
53
|
<p class="validators"><a href="http://validator.w3.org/check?uri=referer">page xHTML validé !</a></p>
|
54
|
</footer>
|
55
|
</body>
|
56
|
</html>
|