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/base.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_once 'class/utils.class.php';
|
16
|
require_once 'constants.inc.php';
|
17
|
require_once('class/site_point.class.php');
|
18
|
|
19
|
if(isset($_GET['dir']) && is_dir($_GET['dir'])) {
|
20
|
$base_dir = $_GET['dir'];
|
21
|
} else {
|
22
|
$base_dir=PANORAMA_PATH;
|
23
|
}
|
24
|
|
25
|
$dir = new sites_dir($base_dir);
|
26
|
try {
|
27
|
$sites_list = site_point::get_all();
|
28
|
|
29
|
echo "<ul id=\"pano-list\">\n";
|
30
|
|
31
|
foreach($sites_list as $pt) {
|
32
|
$params = $pt->get_params();
|
33
|
$pos_file = sprintf('%s/%s', $pt->get_name(), $pt->get_prefix());
|
34
|
if (isset($params['titre'])) {
|
35
|
$cmt = $params['titre'];
|
36
|
$title = sprintf(' title="fichier : %s"', $pos_file);
|
37
|
} else {
|
38
|
$cmt = sprintf('<samp>%s</samp>', $pos_file);
|
39
|
$title = '';
|
40
|
}
|
41
|
printf ('<li%s>%s : <a href="%s">photo panoramique</a>', $title, $cmt, $pt->get_url());
|
42
|
if (isset($params['titre'])) {
|
43
|
printf('/ <a href="%s">carte</a></li>'."\n", $pt->get_map_url());
|
44
|
}
|
45
|
}
|
46
|
echo "</ul>\n";
|
47
|
} catch (Exception $e) {
|
48
|
printf("<h3 class=\"warning\">désolé mais aucun site n'est disponible...</h3>\n");
|
49
|
}
|
50
|
?>
|
51
|
<p id="interaction">
|
52
|
<a href="envoyer.php" title="Envoyer une image sur le site">Ajouter un panorama</a>
|
53
|
</p>
|
54
|
</section>
|
55
|
<footer class="validators"><samp>
|
56
|
page validée par
|
57
|
<a href="http://validator.w3.org/check?uri=referer"><img src="images/valid_xhtml.svg"
|
58
|
alt="Valid XHTML" title="xHTML validé !"/></a>
|
59
|
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="images/valid_css.svg"
|
60
|
alt="CSS validé !" title="CSS validé !"/></a>
|
61
|
</samp></footer>
|
62
|
</body>
|
63
|
</html>
|