Révision a752b78b
ID | a752b78bc7d3222382bfa1f6bd511e1c5e20af51 |
Parent | 4b86e496 |
Enfant | f524783f |
Amélioration du style et apports de nouveaux points de référence.
Fichiers
- ajouté
- modifié
- copié
- renommé
- supprimé
Révisions
creerPano.php | ||
---|---|---|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> |
|
3 |
<head> |
|
4 |
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> |
|
5 |
<link rel="stylesheet" media="screen" href="css/ttn_style_1.css" /> |
|
6 |
<title>creation d'un panoramique</title> |
|
7 |
<script type="text/javascript"> |
|
8 |
|
|
9 |
function showLoad(outgoingLink){ |
|
10 |
|
|
11 |
var link = document.getElementById(outgoingLink); |
|
12 |
var loader = document.createElement('img'); |
|
13 |
loader.id = 'loader'; |
|
14 |
loader.src ='images/loader2.gif'; |
|
15 |
var li = link.parentNode; |
|
16 |
li.appendChild(loader); |
|
17 |
} |
|
18 |
</script> |
|
19 |
</head> |
|
20 |
<body> |
|
21 |
<img id="top" src="images/top.png" alt=""> |
|
22 |
<div id="page_container"> |
|
23 |
<h1><img src="images/tetaneutral.svg"></h1> |
|
24 |
<h2>Listes des photos sur le serveur</h2> |
|
25 |
<p>Cliquez pour générer un panorama</p> |
|
26 |
<div id="containerList"> |
|
27 |
<ul> |
|
28 |
|
|
29 |
<?php |
|
30 |
|
|
31 |
$base_dir = "upload/"; // modifier selon l'arborescence. |
|
32 |
try |
|
33 |
{ |
|
34 |
// On ouvre le dossier ou se trouve les images |
|
35 |
$dir_fd = opendir($base_dir); |
|
36 |
|
|
37 |
$i=0; // Garantir l'unicité du id des liens. |
|
38 |
while (false !== ($image_name = readdir($dir_fd))) { |
|
39 |
$dir = $base_dir.$image_name; |
|
40 |
|
|
41 |
if ($image_name != "." && $image_name != "..") // N'affiche pas les répertoires parents et courant. |
|
42 |
{ |
|
43 |
printf('<li><a href="genererPano.php?name=%s" id="link_'.$i.'" onclick="showLoad(this.id);return true;">%s</a></li>'."\n",$image_name,$image_name); |
|
44 |
$i++; |
|
45 |
} |
|
46 |
|
|
47 |
|
|
48 |
} |
|
49 |
} |
|
50 |
catch(Exception $e) |
|
51 |
{ |
|
52 |
die('Erreur : '.$e->getMessage()); |
|
53 |
} |
|
54 |
?> |
|
55 |
</ul> |
|
56 |
</div> |
|
57 |
<div id="footer"><a href="./index.php">Retour à l'index</a></div> |
|
58 |
|
|
59 |
</div> |
|
60 |
<img id="bottom" src="images/bottom.png" alt=""> |
|
61 |
</body> |
|
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); // Retourne le type mime du fichier |
|
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> |
|
62 | 61 |
</html> |
css/index_style.css | ||
---|---|---|
22 | 22 |
padding:0.2rem; |
23 | 23 |
} |
24 | 24 |
|
25 |
img {vertical-align:middle} |
|
25 |
img { |
|
26 |
vertical-align:middle; |
|
27 |
height:1em; |
|
28 |
} |
|
26 | 29 |
|
27 | 30 |
h2 { |
28 | 31 |
padding:0.5em 1em; |
... | ... | |
83 | 86 |
margin:1rem 0 |
84 | 87 |
} |
85 | 88 |
|
86 |
.validators a { |
|
87 |
background-color:#fff; |
|
89 |
.validators samp { |
|
88 | 90 |
border-radius: 0.4rem; |
89 |
padding:0.3ex;
|
|
91 |
padding:0.2em 0.3em;
|
|
90 | 92 |
text-shadow: 0.1em 0.05em 0.15em #444; |
93 |
background-color:#fff; |
|
94 |
} |
|
95 |
|
|
96 |
.validators a { |
|
97 |
border:solid 0.2em #FFF; |
|
98 |
} |
|
99 |
|
|
100 |
.validators a:hover { |
|
101 |
border-color:#F00; |
|
91 | 102 |
} |
index.php | ||
---|---|---|
49 | 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 | 50 |
</p> |
51 | 51 |
</section> |
52 |
<footer> |
|
53 |
<p class="validators"><a href="http://validator.w3.org/check?uri=referer">page xHTML validé !</a></p> |
|
54 |
</footer> |
|
52 |
<footer class="validators"><samp> |
|
53 |
page validée par |
|
54 |
<a href="http://validator.w3.org/check?uri=referer"><img src="images/valid_xhtml.svg" |
|
55 |
alt="Valid XHTML" title="xHTML validé !"/></a> |
|
56 |
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="images/valid_css.svg" |
|
57 |
alt="CSS validé !" title="CSS validé !"/></a> |
|
58 |
</samp></footer> |
|
55 | 59 |
</body> |
56 | 60 |
</html> |
panorama.php | ||
---|---|---|
191 | 191 |
<p id="res"></p> |
192 | 192 |
<div class="validators"> |
193 | 193 |
page validée par |
194 |
<a href="http://validator.w3.org/check?uri=referer"><img src="images/valid_xhtml.svg" alt="Valid XHTML 1.1" title="xHTML 1.1 validé !"/></a>
|
|
195 |
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="images/valid_css.svg" alt="CSS validé !" title="CSS validé !"/></a> |
|
194 |
<a href="http://validator.w3.org/check?uri=referer"><img src="images/valid_xhtml.svg" alt="Valid XHTML" title="xHTML validé !"/></a>
|
|
195 |
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="images/valid_css.svg" alt="CSS validé !" title="CSS validé !"/></a>
|
|
196 | 196 |
</div> |
197 | 197 |
</body> |
198 | 198 |
</html> |
ref_points.php | ||
---|---|---|
22 | 22 |
"Cheminée du sang de serp" => array(43.62494, 1.42202, 170), |
23 | 23 |
"Château d'eau de blagnac" => array(43.62443, 1.39547, 170), |
24 | 24 |
"Château d'eau de fenouillet" => array(43.67984, 1.39290,170), |
25 |
"Tour du boulevard de Genève" => array(43.617408, 1.419533, 163), |
|
25 | 26 |
); |