|
1 <?php |
|
2 |
|
3 /** |
|
4 * include some common code (like we did in the 90s) |
|
5 * People still do this? ;) |
|
6 */ |
|
7 include_once './common.php'; |
|
8 |
|
9 |
|
10 |
|
11 /** |
|
12 * Do we already have a valid Access Token or need to go get one? |
|
13 */ |
|
14 if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_GET['CONNECT']) ) { |
|
15 /** |
|
16 * Guess we need to go get one! |
|
17 */ |
|
18 $token = $consumer->getRequestToken(); |
|
19 $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token); |
|
20 |
|
21 /** |
|
22 * Now redirect user to Twitter site so they can log in and |
|
23 * approve our access |
|
24 */ |
|
25 $consumer->redirect(); |
|
26 } |
|
27 |
|
28 |
|
29 ?> |
|
30 |
|
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|
32 "http://www.w3.org/TR/html4/strict.dtd"> |
|
33 |
|
34 <html lang="<?php echo($actual); ?>"> |
|
35 <head> |
|
36 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
37 <title>RSLN - Live Video and Annotation</title> |
|
38 <meta http-equiv="X-UA-Compatible" content="IE=8" /> |
|
39 |
|
40 <!-- Framework CSS --> |
|
41 <link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection"> |
|
42 <link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print"> |
|
43 <!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> |
|
44 <link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection"> |
|
45 <link rel="stylesheet" href="../res/css/custom.css" type="text/css" media="screen, projection"> |
|
46 <link rel="stylesheet" type="text/css" href="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen"> |
|
47 <link rel="stylesheet" type="text/css" href="../res/niceforms/niceforms-custom.css" media="screen" > |
|
48 |
|
49 <!-- JAVASCRIPT --> |
|
50 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
|
51 <script type="text/javascript" src="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script> |
|
52 <script type="text/javascript" src="../res/metadataplayer/res/js/jquery.tools.min.js"></script> |
|
53 <script type="text/javascript" src="../res/niceforms/niceforms.js"></script> |
|
54 <script src="http://widgets.twimg.com/j/2/widget.js"></script> |
|
55 |
|
56 <!-- FONT --> |
|
57 <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'> |
|
58 <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'> |
|
59 <link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'> |
|
60 |
|
61 <script type="text/javascript"> |
|
62 $(document).ready(function() { |
|
63 |
|
64 doTimer(); |
|
65 //$("txt").hide(); |
|
66 $(".loginbutton").click(function() { |
|
67 document.location.href="<?php URL_ROOT ?>?CONNECT=true"; |
|
68 }); |
|
69 $("#IDENTIFIER").click(function() { |
|
70 document.location.href="<?php URL_ROOT ?>?CONNECT=true"; |
|
71 }); |
|
72 |
|
73 $("#messageSuccess").hide(); |
|
74 $("#messageFailed").hide(); |
|
75 $("#txt").hide(); |
|
76 |
|
77 // BUTTONS |
|
78 $("#positive").click(function(){ |
|
79 var MyValue = $('#status').attr("value"); |
|
80 $('#status').attr("value",MyValue+"++ "); |
|
81 }); |
|
82 $("#negative").click(function(){ |
|
83 var MyValue = $('#status').attr("value"); |
|
84 $('#status').attr("value",MyValue+"-- "); |
|
85 }); |
|
86 $("#reference").click(function(){ |
|
87 var MyValue = $('#status').attr("value"); |
|
88 $('#status').attr("value",MyValue+"== "); |
|
89 }); |
|
90 $("#question").click(function(){ |
|
91 var MyValue = $('#status').attr("value"); |
|
92 $('#status').attr("value",MyValue+"?? "); |
|
93 }); |
|
94 |
|
95 // SEND TWEETS |
|
96 $("#sendTweet").click(function(){ |
|
97 var MyStatus = $('#status').attr("value"); |
|
98 $.post('tweet_ajax.php', {status:MyStatus} |
|
99 ,function(data) { |
|
100 |
|
101 if(data=="true"){ |
|
102 $("#messageSuccess").show('fast'); |
|
103 $("#messageSuccess").delay(800).hide('slow'); |
|
104 $('#status').attr("value","#SNCP"); |
|
105 }else{ |
|
106 $("#error").text(data); |
|
107 $("#messageFailed").show('fast'); |
|
108 $("#messageFailed").delay(800).hide('slow'); |
|
109 } |
|
110 |
|
111 }); |
|
112 |
|
113 }); |
|
114 |
|
115 $(".timeFrame").tooltip(); |
|
116 /* |
|
117 * Lightbox button |
|
118 */ |
|
119 $("#About").fancybox({ |
|
120 'titlePosition' : 'inside', |
|
121 'transitionIn' : 'none', |
|
122 'transitionOut' : 'none', |
|
123 'enableEscapeButton': 'none', |
|
124 'margin' : 1, |
|
125 'padding' : 0 |
|
126 }<?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){echo(").trigger('click');");}else{echo(");");} ?> |
|
127 |
|
128 |
|
129 $("#Program").fancybox({ |
|
130 'width' : '75%', |
|
131 'height' : '75%', |
|
132 'autoScale' : false, |
|
133 'transitionIn' : 'none', |
|
134 'transitionOut' : 'none', |
|
135 'type' : 'iframe' |
|
136 }); |
|
137 |
|
138 $("#Video_ldt").fancybox({ |
|
139 'width' : 1021, |
|
140 'height' : 661, |
|
141 'autoScale' : false, |
|
142 'transitionIn' : 'none', |
|
143 'transitionOut' : 'none', |
|
144 'type' : 'iframe' |
|
145 }); |
|
146 |
|
147 $("#ACCES").click(function() { |
|
148 $.fancybox.close(); |
|
149 }); |
|
150 |
|
151 // Buttons |
|
152 |
|
153 |
|
154 }); |
|
155 |
|
156 |
|
157 <!-- LIMIT TEXTAREA: |
|
158 function imposemax(Object) |
|
159 { |
|
160 return (Object.value.length <= 140); |
|
161 } |
|
162 // End --> |
|
163 |
|
164 <!-- TIMER |
|
165 var c=0; |
|
166 var t; |
|
167 var timer_is_on=0; |
|
168 |
|
169 function timedCount() |
|
170 { |
|
171 document.getElementById('txt').value=c; |
|
172 c = c+1; |
|
173 t = window.setTimeout("timedCount()",1000); |
|
174 $(".twtr-ft").hide(); |
|
175 $(".twtr-hd").hide(); |
|
176 //twtr-tweet |
|
177 $(".twtr-tweet").each(colorTweetings); |
|
178 |
|
179 } |
|
180 |
|
181 function colorTweetings (){ |
|
182 var tweettemp = $(this).html(); |
|
183 if (tweettemp.search(/\x3F\x3F/)!=-1){ |
|
184 $(this).css({'background-color': '#bfdbec','color':"#000"}); |
|
185 } |
|
186 if (tweettemp.search(/\x2B\x2B/)!=-1){ |
|
187 $(this).css({'background-color': '#c5e7cd','color':"#fff"}); |
|
188 } |
|
189 if (tweettemp.search(/\x2D\x2D/)!=-1){ |
|
190 $(this).css({'background-color': '#f6ced0','color':"#fff"}); |
|
191 } |
|
192 if (tweettemp.search(/\x3D\x3D/)!=-1){ |
|
193 $(this).css({'background-color': '#ecedc1','color':"#000"}); |
|
194 } |
|
195 }; |
|
196 |
|
197 |
|
198 |
|
199 function doTimer() |
|
200 { |
|
201 if (!timer_is_on) |
|
202 { |
|
203 timer_is_on=1; |
|
204 timedCount(); |
|
205 } |
|
206 } |
|
207 |
|
208 function stopCount() |
|
209 { |
|
210 clearTimeout(t); |
|
211 timer_is_on=0; |
|
212 } |
|
213 // |
|
214 //--> |
|
215 </script> |
|
216 |
|
217 <script type="text/javascript"> |
|
218 |
|
219 var _gaq = _gaq || []; |
|
220 _gaq.push(['_setAccount', 'UA-9955524-3']); |
|
221 _gaq.push(['_setDomainName', '.iri.centrepompidou.fr']); |
|
222 _gaq.push(['_trackPageview']); |
|
223 |
|
224 (function() { |
|
225 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
226 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
227 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
228 })(); |
|
229 |
|
230 </script> |
|
231 |
|
232 </head> |
|
233 <body> |
|
234 <div class="container"> |
|
235 <img src="images/head_logo.gif" class="Producteur logo"> |
|
236 <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div> |
|
237 <ul class="menu"> |
|
238 <li class="menuUnderline"><a href="index.php" class="menuLink"> |
|
239 <?php print $translate->_("Accueil"); ?> </a></li> |
|
240 <li ><a href="../about.php" class="menuLink" > |
|
241 <?php print $translate->_("A propos"); ?></a></li> |
|
242 |
|
243 </ul> |
|
244 |
|
245 <ul class="menu" > |
|
246 <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=fr" class="menuLink"> |
|
247 <img src='../images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> /> |
|
248 <?php print $translate->_("Français"); ?></a></li> |
|
249 </ul> |
|
250 |
|
251 |
|
252 <div class="videoLive"> |
|
253 <div class="videoLivePlayer"> |
|
254 <img src="images/big_visuel_mb.png" width="500" height="375" /> |
|
255 </div> |
|
256 |
|
257 </div> |
|
258 |
|
259 <div class="videoLiveProgram"> |
|
260 |
|
261 <div class="arrowContainer"> |
|
262 <div class="arrow"> </div> |
|
263 </div> |
|
264 <div class="videoLiveProgramTitle"> |
|
265 <b>Les Stratégies Virtuelles des Musées : l'Heure de Vérité</b></div> |
|
266 <div class="videoLiveProgramDescription"> |
|
267 <h3>JEUDI 26 MAI 2011</h3><br /> |
|
268 <h4>DE 10H A 13H<br /> |
|
269 PETITE SALLE, NIVEAU -1</h4><br /> |
|
270 Intervenants :<br /> |
|
271 <b>Carlo d'Asaro Biondo</b>, vice-président de Google<br/> |
|
272 <b>Franck Riester</b>, député de Seine-et-Marne<br/> |
|
273 <b>Marc Sands</b>, directeur des publics et de l'information, Tate Gallery, Londres<br/> |
|
274 <b>Alain Seban</b>, président du Centre Pompidou<br/> |
|
275 <b>Bernard Stiegler</b>, philosophe et directeur de l'Institut de Recherche et d'Innovation (IRI)<br /><br /> |
|
276 Animée par <b>Brice Couturier</b>, écrivain et producteur à France Culture<br /><br /> |
|
277 La table ronde sera suivie d'un déjeuner-buffet<br /><br /><br /> |
|
278 RSVP: <b>rp@centrepompidou.fr</b> ou <b>01 44 78 15 05</b> |
|
279 </div> |
|
280 |
|
281 |
|
282 </div> |
|
283 |
|
284 <div class="tweetWriter"> |
|
285 <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3> |
|
286 <form action="tweet.php" method="post" id="statusform" > |
|
287 <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
288 echo("<div class='loginbutton' ><a href='".URL_ROOT."?CONNECT=true' class='loginlink'> |
|
289 ".$translate->_("Vous n'êtes pas connecté.")."</a></div>"); |
|
290 }else{ |
|
291 echo("<textarea name='status' id='status' rows='3' cols='50' onkeypress='return imposemax(this);'>".$C_hashtag."</textarea>"); |
|
292 } |
|
293 ?> |
|
294 |
|
295 |
|
296 <div id="messageSuccess" style="background-color:lightgreen;"> |
|
297 <?php print $translate->_("Envoyé"); ?><br><br> |
|
298 </div> |
|
299 |
|
300 <div id="messageFailed" style="background-color:red;"> |
|
301 <?php print $translate->_("Erreur1"); ?><div id="error"> </div><br/><br> |
|
302 </div> |
|
303 |
|
304 |
|
305 |
|
306 <a class="button_w" href="#" id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" > |
|
307 <span><?php print $translate->_("Envoyer"); ?></span></a> |
|
308 <!--<button name="s" type="button" id="sendTweet" |
|
309 style="float:right;margin-right:15px;margin-left:35px;width:70px;" >Envoyer</button>--> |
|
310 <a |
|
311 |
|
312 id="positive" |
|
313 title="accord" |
|
314 class="tweetButton">++</a> |
|
315 <a |
|
316 |
|
317 id="negative" |
|
318 title="désaccord" |
|
319 class="tweetButton">--</a> |
|
320 <a |
|
321 |
|
322 id="reference" |
|
323 title="reference" |
|
324 class="tweetButton">==</a> |
|
325 <a |
|
326 |
|
327 id="question" |
|
328 title="question" |
|
329 class="tweetButton"> ??</a> |
|
330 </form> |
|
331 </div> |
|
332 |
|
333 <div class="tweetReader"> |
|
334 <script> |
|
335 new TWTR.Widget({ |
|
336 version: 2, |
|
337 type: 'search', |
|
338 search: '<?php echo($C_hashtag); ?>', |
|
339 interval: 1000, |
|
340 title: '', |
|
341 subject: '', |
|
342 width: 377, |
|
343 height: 450, |
|
344 theme: { |
|
345 shell: { |
|
346 background: '#ffffff', |
|
347 color: '#ffffff' |
|
348 }, |
|
349 tweets: { |
|
350 background: '#ffffff', |
|
351 color: '#444444', |
|
352 links: '#1985b5' |
|
353 } |
|
354 }, |
|
355 features: { |
|
356 scrollbar: false, |
|
357 loop: true, |
|
358 live: true, |
|
359 hashtags: true, |
|
360 timestamp: true, |
|
361 avatars: true, |
|
362 toptweets: true, |
|
363 behavior: 'default' |
|
364 } |
|
365 }).render().start(); |
|
366 </script> |
|
367 </div> |
|
368 |
|
369 <div class="footer"> |
|
370 <hr> |
|
371 <?php |
|
372 echo($C_partenaires); |
|
373 |
|
374 if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
375 echo("| <a href='clear.php' class='footerLink'>".$translate->_("Déconnexion")."</a>"); |
|
376 } |
|
377 ?> |
|
378 <input type="text" id="txt" size="3"/> |
|
379 |
|
380 </div> |
|
381 |
|
382 |
|
383 </div> |
|
384 |
|
385 <!-- LIGHTBOX --> |
|
386 <div style="display:none;"> |
|
387 <div id="Aboutbox" > |
|
388 <div class="lightBorder"> |
|
389 <div class="lightTitle" style="height:45px;"> </div> |
|
390 <div class="lightSubTitle"><?php print $translate->_("splatchPageTitle"); ?></div> |
|
391 <div class="lightDescription"><?php print $translate->_("splatchPageText"); ?></div> |
|
392 <div> |
|
393 <br/> |
|
394 <a class="button_b" href="#" id="IDENTIFIER"><span><?php print $translate->_("S'identifier"); ?></span></a> <br/><br/> |
|
395 <a class="button_w" href="#" id="ACCES"><span><?php print $translate->_("Libre accès"); ?></span></a> |
|
396 </div> |
|
397 </div> |
|
398 </div> |
|
399 </div> |
|
400 <!-- END LIGHTBOX --> |
|
401 |
|
402 |
|
403 </body> |
|
404 </html> |