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 * Do we already have a valid Access Token or need to go get one? |
|
11 */ |
|
12 if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_GET['CONNECT']) ) { |
|
13 /** |
|
14 * Guess we need to go get one! |
|
15 */ |
|
16 $token = $consumer->getRequestToken(); |
|
17 $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token); |
|
18 |
|
19 /** |
|
20 * Now redirect user to Twitter site so they can log in and |
|
21 * approve our access |
|
22 */ |
|
23 $consumer->redirect(); |
|
24 } |
|
25 |
|
26 /* CLIENT VAR LIVE */ |
|
27 |
|
28 $C_hashtag= "#THD12"; |
|
29 $C_link = "http://www.portailthd.fr/"; |
|
30 $C_title = "Bilan du projet Plateforme THD"; |
|
31 $C_REP = "thd/"; |
|
32 $C_description = "12 mai 2011<br/> |
|
33 Centre Pompidou<br/> |
|
34 <br/> |
|
35 Les acteurs de la plateforme THD et les organismes qui ont soutenu le projet se retrouvent le 12 mai 2011 pour faire le bilan de trois années d’actions prospectives et d’études d’usages autour de plus de 30 expérimentations de nouveaux services. |
|
36 "; |
|
37 |
|
38 $C_partenaires = " |
|
39 <a href='http://www.iri.centrepompidou.fr/' class='footerLink' target='_blank'> |
|
40 IRI </a> |
|
41 | <a href='http://www.capdigital.com/' class='footerLink' target='_blank'>Cap Digital</a> |
|
42 | <a href='http://www.portailthd.fr/' class='footerLink' target='_blank'>Portail THD</a>"; |
|
43 |
|
44 ?> |
|
45 |
|
46 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|
47 "http://www.w3.org/TR/html4/strict.dtd"> |
|
48 |
|
49 <html lang="<?php echo($actual); ?>"> |
|
50 <head> |
|
51 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
52 <title>Bilan du projet Plateforme THD</title> |
|
53 <meta http-equiv="X-UA-Compatible" content="IE=8" /> |
|
54 |
|
55 <!-- Framework CSS --> |
|
56 <link rel="stylesheet" href="res/blueprint/screen.css" type="text/css" media="screen, projection"> |
|
57 <link rel="stylesheet" href="res/blueprint/print.css" type="text/css" media="print"> |
|
58 <!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> |
|
59 <link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection"> |
|
60 <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection"> |
|
61 <link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen"> |
|
62 <link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" > |
|
63 |
|
64 <!-- JAVASCRIPT --> |
|
65 <script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script> |
|
66 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script> |
|
67 <script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'))?>"></script> |
|
68 <script type="text/javascript" src="<?php echo(registry_url('niceforms','js'))?>"></script> |
|
69 <script type="text/javascript" src="<?php echo(registry_url('tw-widget','js'))?>"></script> |
|
70 |
|
71 <!-- FONT --> |
|
72 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'> |
|
73 <link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'> |
|
74 <link href='<?php echo(registry_url('Geo','font'))?>' rel='stylesheet' type='text/css'> |
|
75 |
|
76 <script type="text/javascript"> |
|
77 $(document).ready(function() { |
|
78 |
|
79 doTimer(); |
|
80 //$("txt").hide(); |
|
81 $(".loginbutton").click(function() { |
|
82 document.location.href="<?php URL_ROOT ?>client.php?CONNECT=true"; |
|
83 }); |
|
84 $("#IDENTIFIER").click(function() { |
|
85 document.location.href="<?php URL_ROOT ?>client.php?CONNECT=true"; |
|
86 }); |
|
87 |
|
88 $("#messageSuccess").hide(); |
|
89 $("#messageFailed").hide(); |
|
90 $("#txt").hide(); |
|
91 |
|
92 // BUTTONS |
|
93 $("#positive").click(function(){ |
|
94 var MyValue = $('#status').attr("value"); |
|
95 $('#status').attr("value",MyValue+"++ "); |
|
96 }); |
|
97 $("#negative").click(function(){ |
|
98 var MyValue = $('#status').attr("value"); |
|
99 $('#status').attr("value",MyValue+"-- "); |
|
100 }); |
|
101 $("#reference").click(function(){ |
|
102 var MyValue = $('#status').attr("value"); |
|
103 $('#status').attr("value",MyValue+"== "); |
|
104 }); |
|
105 $("#question").click(function(){ |
|
106 var MyValue = $('#status').attr("value"); |
|
107 $('#status').attr("value",MyValue+"?? "); |
|
108 }); |
|
109 |
|
110 // SEND TWEETS |
|
111 $("#sendTweet").click(function(){ |
|
112 var MyStatus = $('#status').attr("value"); |
|
113 $.post('tweet_ajax.php', {status:MyStatus} |
|
114 ,function(data) { |
|
115 |
|
116 if(data=="true"){ |
|
117 $("#messageSuccess").show('fast'); |
|
118 $("#messageSuccess").delay(800).hide('slow'); |
|
119 $('#status').attr("value","#THD12"); |
|
120 }else{ |
|
121 $("#error").text(data); |
|
122 $("#messageFailed").show('fast'); |
|
123 $("#messageFailed").delay(800).hide('slow'); |
|
124 } |
|
125 |
|
126 }); |
|
127 |
|
128 }); |
|
129 |
|
130 $(".timeFrame").tooltip(); |
|
131 /* |
|
132 * Lightbox button |
|
133 */ |
|
134 $("#About").fancybox({ |
|
135 'titlePosition' : 'inside', |
|
136 'transitionIn' : 'none', |
|
137 'transitionOut' : 'none', |
|
138 'enableEscapeButton': 'none', |
|
139 'margin' : 1, |
|
140 'padding' : 0 |
|
141 }<?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){echo(").trigger('click');");}else{echo(");");} ?> |
|
142 |
|
143 |
|
144 $("#Program").fancybox({ |
|
145 'width' : '75%', |
|
146 'height' : '75%', |
|
147 'autoScale' : false, |
|
148 'transitionIn' : 'none', |
|
149 'transitionOut' : 'none', |
|
150 'type' : 'iframe' |
|
151 }); |
|
152 |
|
153 $("#Video_ldt").fancybox({ |
|
154 'width' : 1021, |
|
155 'height' : 661, |
|
156 'autoScale' : false, |
|
157 'transitionIn' : 'none', |
|
158 'transitionOut' : 'none', |
|
159 'type' : 'iframe' |
|
160 }); |
|
161 |
|
162 $("#ACCES").click(function() { |
|
163 $.fancybox.close(); |
|
164 }); |
|
165 |
|
166 // Buttons |
|
167 |
|
168 |
|
169 }); |
|
170 |
|
171 |
|
172 <!-- LIMIT TEXTAREA: |
|
173 function imposemax(Object) |
|
174 { |
|
175 return (Object.value.length <= 140); |
|
176 } |
|
177 // End --> |
|
178 |
|
179 <!-- TIMER |
|
180 var c=0; |
|
181 var t; |
|
182 var timer_is_on=0; |
|
183 |
|
184 function timedCount() |
|
185 { |
|
186 document.getElementById('txt').value=c; |
|
187 c = c+1; |
|
188 t = window.setTimeout("timedCount()",1000); |
|
189 $(".twtr-ft").hide(); |
|
190 $(".twtr-hd").hide(); |
|
191 //twtr-tweet |
|
192 $(".twtr-tweet").each(colorTweetings); |
|
193 |
|
194 } |
|
195 |
|
196 function colorTweetings (){ |
|
197 var tweettemp = $(this).html(); |
|
198 if (tweettemp.search(/\x3F\x3F/)!=-1){ |
|
199 $(this).css({'background-color': '#bfdbec','color':"#000"}); |
|
200 } |
|
201 if (tweettemp.search(/\x2B\x2B/)!=-1){ |
|
202 $(this).css({'background-color': '#c5e7cd','color':"#fff"}); |
|
203 } |
|
204 if (tweettemp.search(/\x2D\x2D/)!=-1){ |
|
205 $(this).css({'background-color': '#f6ced0','color':"#fff"}); |
|
206 } |
|
207 if (tweettemp.search(/\x3D\x3D/)!=-1){ |
|
208 $(this).css({'background-color': '#ecedc1','color':"#000"}); |
|
209 } |
|
210 }; |
|
211 |
|
212 |
|
213 |
|
214 function doTimer() |
|
215 { |
|
216 if (!timer_is_on) |
|
217 { |
|
218 timer_is_on=1; |
|
219 timedCount(); |
|
220 } |
|
221 } |
|
222 |
|
223 function stopCount() |
|
224 { |
|
225 clearTimeout(t); |
|
226 timer_is_on=0; |
|
227 } |
|
228 // |
|
229 //--> |
|
230 </script> |
|
231 |
|
232 <script type="text/javascript"> |
|
233 |
|
234 var _gaq = _gaq || []; |
|
235 _gaq.push(['_setAccount', 'UA-23581291-1']); |
|
236 _gaq.push(['_trackPageview']); |
|
237 |
|
238 (function() { |
|
239 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
240 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
241 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
242 })(); |
|
243 |
|
244 </script> |
|
245 |
|
246 </head> |
|
247 <body> |
|
248 <div class="container"> |
|
249 <img src="images/ENMI_2010_logo.gif" class="Producteur logo"> |
|
250 <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div> |
|
251 <ul class="menu"> |
|
252 <li class="menuUnderline"><a href="index.php" class="menuLink"> |
|
253 <?php print $translate->_("Accueil"); ?> </a></li> |
|
254 <li class="menuUnderline" ><a href="<?php echo($C_link); ?>" class="menuLink" target="_blank" id='Program'> |
|
255 <?php print $translate->_("Programme"); ?></a></li> |
|
256 <li ><a href="about.php" class="menuLink" > |
|
257 <?php print $translate->_("A propos"); ?></a></li> |
|
258 |
|
259 </ul> |
|
260 |
|
261 <ul class="menu" > |
|
262 <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" > |
|
263 <img src='images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> /> |
|
264 <?php print $translate->_("Japonais"); ?></a></li> |
|
265 <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink"> |
|
266 <img src='images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> /> |
|
267 <?php print $translate->_("Français"); ?></a></li> |
|
268 <li ><a href="<?php URL_ROOT ?>client.php?lang=en" class="menuLink"> |
|
269 <img src='images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> /> |
|
270 <?php print $translate->_("Anglais"); ?></a></li> |
|
271 </ul> |
|
272 |
|
273 |
|
274 <div class="videoLive"> |
|
275 <div class="videoLivePlayer"> |
|
276 <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375"> |
|
277 <param name="movie" value="res/mediaplayer/player.swf" /> |
|
278 <param name="allowfullscreen" value="true" /> |
|
279 <param name="allowscriptaccess" value="always" /> |
|
280 <param name="wmode" value="transparent" /> |
|
281 <param name="flashvars" value="autostart=true&live=true&image=images/bgd_player_thd.png&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&controlbar=none&autostart=true" /> |
|
282 <embed |
|
283 type="application/x-shockwave-flash" |
|
284 id="player2" |
|
285 name="player2" |
|
286 src="res/mediaplayer/player.swf" |
|
287 width="500" |
|
288 height="375" |
|
289 allowscriptaccess="always" |
|
290 allowfullscreen="true" |
|
291 wmode="transparent" |
|
292 flashvars="autostart=true&live=true&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&image=images/bgd_player_thd.png&controlbar=none&autostart=true" |
|
293 |
|
294 /> |
|
295 </object> |
|
296 |
|
297 </div> |
|
298 |
|
299 </div> |
|
300 |
|
301 <div class="videoLiveProgram"> |
|
302 |
|
303 <div class="arrowContainer"> |
|
304 <div class="arrow"> </div> |
|
305 </div> |
|
306 <div class="videoLiveProgramTitle"> |
|
307 <b><?php echo($C_title); ?></b></div> |
|
308 <div class="videoLiveProgramDescription"> |
|
309 <br><?php echo($C_description); ?></div> |
|
310 |
|
311 |
|
312 </div> |
|
313 |
|
314 <div class="tweetWriter"> |
|
315 <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3> |
|
316 <form action="tweet.php" method="post" id="statusform" > |
|
317 <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
318 echo("<div class='loginbutton' ><a href='".URL_ROOT."client.php?CONNECT=true' class='loginlink'> |
|
319 ".$translate->_("Vous n'êtes pas connecté.")."</a></div>"); |
|
320 }else{ |
|
321 echo("<textarea name='status' id='status' rows='3' cols='50' onkeypress='return imposemax(this);'>".$C_hashtag."</textarea>"); |
|
322 } |
|
323 ?> |
|
324 |
|
325 |
|
326 <div id="messageSuccess" style="background-color:lightgreen;"> |
|
327 <?php print $translate->_("Envoyé"); ?><br><br> |
|
328 </div> |
|
329 |
|
330 <div id="messageFailed" style="background-color:red;"> |
|
331 <?php print $translate->_("Erreur1"); ?><div id="error"> </div><br/><br> |
|
332 </div> |
|
333 |
|
334 |
|
335 |
|
336 <a class="button_w" href="#" id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" > |
|
337 <span><?php print $translate->_("Envoyer"); ?></span></a> |
|
338 <!--<button name="s" type="button" id="sendTweet" |
|
339 style="float:right;margin-right:15px;margin-left:35px;width:70px;" >Envoyer</button>--> |
|
340 <a |
|
341 |
|
342 id="positive" |
|
343 title="accord" |
|
344 class="tweetButton">++</a> |
|
345 <a |
|
346 |
|
347 id="negative" |
|
348 title="désaccord" |
|
349 class="tweetButton">--</a> |
|
350 <a |
|
351 |
|
352 id="reference" |
|
353 title="reference" |
|
354 class="tweetButton">==</a> |
|
355 <a |
|
356 |
|
357 id="question" |
|
358 title="question" |
|
359 class="tweetButton"> ??</a> |
|
360 </form> |
|
361 </div> |
|
362 |
|
363 <div class="tweetReader"> |
|
364 <script> |
|
365 new TWTR.Widget({ |
|
366 version: 2, |
|
367 type: 'search', |
|
368 search: '<?php echo($C_hashtag); ?>', |
|
369 interval: 1000, |
|
370 title: '', |
|
371 subject: '', |
|
372 width: 377, |
|
373 height: 450, |
|
374 theme: { |
|
375 shell: { |
|
376 background: '#ffffff', |
|
377 color: '#ffffff' |
|
378 }, |
|
379 tweets: { |
|
380 background: '#ffffff', |
|
381 color: '#444444', |
|
382 links: '#1985b5' |
|
383 } |
|
384 }, |
|
385 features: { |
|
386 scrollbar: false, |
|
387 loop: true, |
|
388 live: true, |
|
389 hashtags: true, |
|
390 timestamp: true, |
|
391 avatars: true, |
|
392 toptweets: true, |
|
393 behavior: 'default' |
|
394 } |
|
395 }).render().start(); |
|
396 </script> |
|
397 </div> |
|
398 |
|
399 <div class="footer"> |
|
400 <hr> |
|
401 <?php |
|
402 echo($C_partenaires); |
|
403 |
|
404 if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
405 echo("| <a href='clear.php' class='footerLink'>".$translate->_("Déconnexion")."</a>"); |
|
406 } |
|
407 ?> |
|
408 <input type="text" id="txt" size="3"/> |
|
409 |
|
410 </div> |
|
411 |
|
412 |
|
413 </div> |
|
414 |
|
415 <!-- LIGHTBOX --> |
|
416 <div style="display:none;"> |
|
417 <div id="Aboutbox" > |
|
418 <div class="lightBorder"> |
|
419 <div class="lightTitle" style="height:45px;"> </div> |
|
420 <div class="lightSubTitle"><?php print $translate->_("splatchPageTitle"); ?></div> |
|
421 <div class="lightDescription"><?php print $translate->_("splatchPageText"); ?></div> |
|
422 <div> |
|
423 <br/> |
|
424 <a class="button_b" href="#" id="IDENTIFIER"><span><?php print $translate->_("S'identifier"); ?></span></a> <br/><br/> |
|
425 <a class="button_w" href="#" id="ACCES"><span><?php print $translate->_("Libre accès"); ?></span></a> |
|
426 </div> |
|
427 </div> |
|
428 </div> |
|
429 </div> |
|
430 <!-- END LIGHTBOX --> |
|
431 |
|
432 |
|
433 </body> |
|
434 </html> |
|