|
1 <?php |
|
2 /** |
|
3 * TODO : |
|
4 * - activer le safe_mode |
|
5 * - definir un open_basedir pour protéger le serveur (probleme avec l'activation du safe mode ???) |
|
6 * - trier les dossiers par date |
|
7 * - |
|
8 */ |
|
9 |
|
10 /* !! code a revoir, ne fonctionne pas !! */ |
|
11 /* |
|
12 echo "safe_mode = ".ini_get('safe_mode'); |
|
13 |
|
14 |
|
15 if(ini_set('safe_mode',TRUE)){ |
|
16 echo '[safe_mode modifié]'; |
|
17 }else{ |
|
18 echo '[safe_mode non modifié]'; |
|
19 |
|
20 } |
|
21 |
|
22 ini_set("open_basedir", "/home/www/documents/audio/"); |
|
23 |
|
24 |
|
25 |
|
26 // Check for safe mode |
|
27 if( ini_get('safe_mode') ){ |
|
28 // Do it the safe mode way |
|
29 echo "[safe mode activated]"; |
|
30 |
|
31 }else{ |
|
32 // Do it the regular way |
|
33 echo "[safe mode non activated]"; |
|
34 } |
|
35 |
|
36 */ |
|
37 include_once('includes/functions.php'); |
|
38 |
|
39 if(isset($_GET['dir'])){ |
|
40 |
|
41 $BASE = rawurldecode($_GET['dir']); |
|
42 /*SECURITE*/ |
|
43 if(!strstr($BASE, 'audio')) $BASE = "/home/www/documents/audio"; |
|
44 /* SECURITE (evite de parcourir les repertoire en remontant via les .. */ |
|
45 if(ereg('[..]',$BASE)) $BASE = "/home/www/documents/audio"; |
|
46 |
|
47 /*affiche les infos du seminaire*/ |
|
48 if(strstr(strtolower($BASE), 'regards')) $descrip = '/home/www/privatedoc/infors.htm'; |
|
49 if(strstr(strtolower($BASE), 'lectures')) $descrip = '/home/www/privatedoc/infols.htm'; |
|
50 if(strstr(strtolower($BASE), 'jugement')) $descrip = '/home/www/privatedoc/infojugement.htm'; |
|
51 if(strstr(strtolower($BASE), 'modernite')) $descrip = '/home/www/privatedoc/infomodernite.htm'; |
|
52 if(strstr(strtolower($BASE), 'pratique')) $descrip = '/home/www/privatedoc/infopratique.htm'; |
|
53 if(strstr(strtolower($BASE), 'autres')) $descrip = ''; |
|
54 } |
|
55 else{ |
|
56 /* racine */ |
|
57 $BASE = "/home/www/documents/audio"; |
|
58 $descrip = ''; |
|
59 } |
|
60 |
|
61 |
|
62 ?> |
|
63 |
|
64 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
65 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
66 <head> |
|
67 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
68 <meta name="description" content="Institut de rechcerche et d'innovation" /> |
|
69 <title>Institut de Recherche et d'innovation</title> |
|
70 <link href="../res/css/style.css" rel="stylesheet" type="text/css" /> |
|
71 <script type="text/javascript" src="js/prototype.js"></script> |
|
72 <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> |
|
73 <script type="text/javascript" src="js/swfobject.js"></script> |
|
74 <script type="text/javascript"> |
|
75 // <![CDATA[ |
|
76 |
|
77 // get our flash movie object |
|
78 var flashMovie; |
|
79 function init() { |
|
80 if (document.getElementById) { |
|
81 flashMovie = document.getElementById("mymovie"); |
|
82 } |
|
83 } |
|
84 |
|
85 // wait for the page to fully load before initializing |
|
86 window.onload = init; |
|
87 |
|
88 // for updating media in the player |
|
89 function switchMedia(rep) { |
|
90 if (flashMovie) { |
|
91 var url = 'http://www.iri.centrepompidou.fr/documents/audio/'+rep; |
|
92 flashMovie.switchMedia(url, true); |
|
93 } |
|
94 } |
|
95 |
|
96 |
|
97 // ]]> |
|
98 </script> |
|
99 </head> |
|
100 <body> |
|
101 |
|
102 <div> |
|
103 <a href="http://www.iri.centrepompidou.fr"><img src="../res/img/logo-iri-petit.png" class="logo" alt="Logo Iri" /></a> |
|
104 </div> |
|
105 |
|
106 <div id="layer1"> |
|
107 <div id="layer2"> |
|
108 <h1><img src="../res/img/titre_iri.png" alt="Institut de Recherche et d'Innovation" /></h1> |
|
109 |
|
110 <div> |
|
111 <h2><img src="../res/img/consulter_doc.png" alt="Consulter les fonds"/></h2><br/> |
|
112 <p style="padding-right:250px;padding-left:10px;"><img src="img/help.png"> |
|
113 Ce service de consultation met à disposition les |
|
114 enregistrements audio des séminaires et ateliers de l'IRI (en écoute et en téléchargement). Les enregistements sont classés par date et séminaire.</p> |
|
115 </div> |
|
116 <table cellspacing="0" cellpadding="10" width="100%" style="border:1px solid #cccccc; font-size:12px;"> |
|
117 <?php |
|
118 /* lien sur la racine */ |
|
119 if(!$dir) { |
|
120 |
|
121 |
|
122 $navig = substr($BASE,26); |
|
123 $navtab = explode('/', $navig); |
|
124 |
|
125 |
|
126 if($navtab[0] != '') $navLinked = '<a href="javascript:history.go(-'.(count($navtab)).')">..</a> / '; |
|
127 |
|
128 $cpt=0; |
|
129 foreach($navtab as $link): |
|
130 |
|
131 $link = deInterCaps($link); |
|
132 $link = UtoWS($link); |
|
133 |
|
134 if($cpt+1 == count($navtab)){ |
|
135 |
|
136 $navLinked .= $link; |
|
137 } |
|
138 else{ |
|
139 |
|
140 $navLinked .='<a href="javascript:history.go(-'.(count($navtab)-1).')">'.trim($link).'</a>'; |
|
141 } |
|
142 if($cpt != (count($navtab)-1)) $navLinked .= ' / '; |
|
143 $cpt++; |
|
144 endforeach; |
|
145 |
|
146 echo "<tr><td colspan='2'><h3>".strtoupper($navLinked)."</h3></td></tr>"; |
|
147 } |
|
148 |
|
149 ?> |
|
150 |
|
151 <tr><td style="vertical-align:top"> |
|
152 |
|
153 |
|
154 <?php |
|
155 list_dir($BASE, rawurldecode($dir), 2); |
|
156 |
|
157 /* répertoire initial à lister */ |
|
158 if(!$dir) { |
|
159 $dir = $BASE; |
|
160 } |
|
161 |
|
162 list_file(rawurldecode($dir)); |
|
163 ?> |
|
164 |
|
165 <td width="30%" align="center" rowspan="2" style="vertical-align:top"><div id="flashcontent"></div></td> |
|
166 </td> |
|
167 </tr> |
|
168 |
|
169 |
|
170 </table> |
|
171 <?php if($descrip != ''):?> |
|
172 <div style="font-size:11px; background-color:#ebebeb; margin-top:10px; padding-left:10px; padding-right:10px;line-height:17px; border:1px solid #cccccc"><?php include($descrip);?></div> |
|
173 <?php endif;?> |
|
174 |
|
175 <?php |
|
176 if(strstr(strtolower($BASE),"regards")): |
|
177 $date = ereg_replace("_",'',$navtab[count($navtab)-1]); |
|
178 if(is_numeric($date)): |
|
179 ?> |
|
180 |
|
181 <div id="moreinfo" style="display:none;"> |
|
182 <div><h2>documentation Wiki IRI</h2></div> |
|
183 <br/><br/> |
|
184 <div style="border:5px solid #CCCCCC"> |
|
185 <iframe src="http://www.iri.centrepompidou.fr/wiki/doku.php?id=college:seminaire_rs_<?=$date?>" width="100%" height="350px" marginheight="0" marginwidth="0" frameborder="0" scrolling="auto"></iframe> |
|
186 </div> |
|
187 </div> |
|
188 <?php endif; endif;?> |
|
189 <br/> |
|
190 |
|
191 <script type="text/javascript"> |
|
192 var so = new SWFObject("media/mp3player.swf", "mymovie", "340", "157", "8.0.5", "#ffffff", true); |
|
193 so.addParam("quality", "high"); |
|
194 so.addParam("wmode", "transparent"); |
|
195 so.addParam("salign", "lt"); |
|
196 so.addVariable("extDrag", false); |
|
197 so.write("flashcontent"); |
|
198 </script> |
|
199 |
|
200 </div> |
|
201 |
|
202 </div> |
|
203 </body> |
|
204 </html> |