Projet

Général

Profil

Paste
Télécharger (1,09 ko) Statistiques
| Branche: | Révision:

root / index.php @ f60262e6

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/all.css" />
7
  <script src="js/pano.js"></script>
8
</head>
9
<body>
10
  <h1>Liste des panoramas</h1>   
11
  <?php
12
   require 'class/site_point.class.php';
13
   require 'class/sites_dir.class.php';
14
   echo '<ul>';
15
   if(isset($_GET['dir']) && is_dir($_GET['dir'])) {
16
     $base_dir = $_GET['dir'];
17
   } else {
18
     $base_dir = 'tiles';
19
   }
20

    
21
   $dir = new sites_dir($base_dir);
22

    
23
   foreach($dir->get_sites() as $pt) {
24
     $params = $pt->get_params();
25
     if (isset($params['titre'])) {
26
       $cmt = $params['titre'];
27
     } else {
28
       $cmt = sprintf('fichier <samp>%s/%s</samp>', $pt->get_name(), $pt->get_prefix());
29
     }
30
     printf ('<li><a href="panorama.php?dir=%s&amp;panorama=%s">%s</a></li>'."\n", $base_dir, $pt->get_name(), $cmt);
31
   }
32
   echo '</ul>';
33
  ?>
34
  <p><a href="http://validator.w3.org/check?uri=referer">page xHTML validé !</a></p>
35
</body>
36
</html>