web/client.php
changeset 291 db1e6bfaa54e
parent 276 f7669b499d41
child 298 28d9ecf31ac2
equal deleted inserted replaced
290:2ddd11ec2da2 291:db1e6bfaa54e
     1 <?php
     1 <?php
     2 
     2 
     3 if(!isset($_REQUEST['rep'])) {
     3 if(!isset($_REQUEST['rep'])) {
     4 	include_once dirname(__FILE__).'/common.php';
     4     include_once dirname(__FILE__).'/common.php';
     5 	header('Location: ' . URL_ROOT . "$C_default_rep/client.php" );
     5     header('Location: ' . URL_ROOT . "$C_default_rep/client.php" );
     6 	exit();
     6     exit();
     7 }
     7 }
     8 
     8 
     9 $rep = $_REQUEST['rep'];
     9 $rep = $_REQUEST['rep'];
    10 include_once dirname(__FILE__).'/'.$rep.'/config.php';
    10 include_once dirname(__FILE__).'/'.$rep.'/config.php';
    11 
    11 
    28     $consumer->redirect();
    28     $consumer->redirect();
    29 }
    29 }
    30 
    30 
    31 
    31 
    32 $big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
    32 $big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
    33 if(isset($config['client_visual']) && $config['client_visual'] != null ) {
    33 if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) {
    34 	$big_visual_url = URL_ROOT."$rep/".$config['client_visual'];
    34 	$big_visual_url = URL_ROOT."$rep/".$translate->_('config__client_visual');
    35 }
    35 }
    36 
    36 
    37 $head_logo = URL_ROOT."$rep/images/head_logo.gif";
    37 $head_logo = URL_ROOT."$rep/images/head_logo.gif";
    38 if(isset($config['head_logo']) && $config['head_logo'] != null ) {
    38 if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) {
    39 	$head_logo = URL_ROOT."$rep/".$config['head_logo'];
    39 	$head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo');
    40 }
    40 }
    41 
    41 
    42 ?>
    42 ?>
    43 
    43 
    44 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    44 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    46 
    46 
    47 <html lang="<?php echo($actual); ?>">
    47 <html lang="<?php echo($actual); ?>">
    48   <head>
    48   <head>
    49     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    49     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    50     <title>Live Video and Annotation</title>
    50     <title>Live Video and Annotation</title>
    51 	<meta http-equiv="X-UA-Compatible" content="IE=8" /> 
    51 	<meta http-equiv="X-UA-Compatible" content="IE=8" />
    52 
    52 
    53     <!-- Framework CSS -->
    53     <!-- Framework CSS -->
    54     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-screen','css'));?>" type="text/css" media="screen, projection"/>
    54     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-screen','css'));?>" type="text/css" media="screen, projection"/>
    55     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-print','css'));?>" type="text/css" media="print"/>
    55     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-print','css'));?>" type="text/css" media="print"/>
    56     <!--[if lt IE 8]><link rel="stylesheet" href="<?php echo(registry_url('blueprint-ie','css'));?>" type="text/css" media="screen, projection"><![endif]--> 
    56     <!--[if lt IE 8]><link rel="stylesheet" href="<?php echo(registry_url('blueprint-ie','css'));?>" type="text/css" media="screen, projection"><![endif]-->
    57 	<link rel="stylesheet" href="<?php echo(registry_url('blueprint-plugins-fancy-type','css'));?>" type="text/css" media="screen, projection"/>
    57 	<link rel="stylesheet" href="<?php echo(registry_url('blueprint-plugins-fancy-type','css'));?>" type="text/css" media="screen, projection"/>
    58 	<link rel="stylesheet" href="<?php echo(registry_url('custom','css'));?>" type="text/css" media="screen, projection"/>
    58 	<link rel="stylesheet" href="<?php echo(registry_url('custom','css'));?>" type="text/css" media="screen, projection"/>
    59 	<link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
    59 	<link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
    60 
    60 
    61 	<!-- JAVASCRIPT --> 
    61 	<!-- JAVASCRIPT -->
    62 	<script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
    62 	<script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
    63 	<script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
    63 	<script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
    64 	<script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'))?>"></script>
    64 	<script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'))?>"></script>
    65 	<script type="text/javascript" src="<?php echo(registry_url('tw-widget','js'))?>"></script>
    65 	<script type="text/javascript" src="<?php echo(registry_url('tw-widget','js'))?>"></script>
    66 	
    66 	
    67 	<!-- FONT -->
    67 	<!-- FONT -->
    68 	<link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'>
    68 	<link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'>
    69 	<link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
    69 	<link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
    70 	<link href='<?php echo(registry_url('Geo','font'))?>' rel='stylesheet' type='text/css'>
    70 	<link href='<?php echo(registry_url('Geo','font'))?>' rel='stylesheet' type='text/css'>
    71 
    71 
    72 	<script type="text/javascript">	
    72 	<script type="text/javascript">
    73 	$(document).ready(function() {
    73 	$(document).ready(function() {
    74 
    74 
    75 			doTimer();
    75 			doTimer();
    76 			//$("txt").hide();
    76 			//$("txt").hide();
    77 			$(".loginbutton").click(function() {
    77 			$(".loginbutton").click(function() {
   102 			});
   102 			});
   103 			$("#question").click(function(){
   103 			$("#question").click(function(){
   104 				add_grammar("??");
   104 				add_grammar("??");
   105 			});
   105 			});
   106 			
   106 			
   107 			// SEND TWEETS 
   107 			// SEND TWEETS
   108 			$("#sendTweet").click(function(){
   108 			$("#sendTweet").click(function(){
   109 				var MyStatus = $('#status').val();
   109 				var MyStatus = $('#status').val();
   110 				$.post('tweet_ajax.php', {status:MyStatus}
   110 				$.post('tweet_ajax.php', {status:MyStatus}
   111 				,function(data) {
   111 				,function(data) {
   112 				
   112 				
   121 						$("#messageFailed").delay(800).hide('slow');
   121 						$("#messageFailed").delay(800).hide('slow');
   122 					}
   122 					}
   123 					
   123 					
   124 				});
   124 				});
   125 				
   125 				
   126 			});	
   126 			});
   127 
   127 
   128 			$("#status").bind("change keyup paste blur focus",function() {
   128 			$("#status").bind("change keyup paste blur focus",function() {
   129 				newval = 140-$("#status").val().length;
   129 				newval = 140-$("#status").val().length;
   130 				$('#tweetCounter').val(newval);
   130 				$('#tweetCounter').val(newval);
   131 				if(newval < 0) {
   131 				if(newval < 0) {
   132 					$('#tweetCounter').addClass("tweetCounterNegative");
   132 					$('#tweetCounter').addClass("tweetCounterNegative");
   133 				}
   133 				}
   134 				else {
   134 				else {
   135 					$('#tweetCounter').removeClass("tweetCounterNegative");
   135 					$('#tweetCounter').removeClass("tweetCounterNegative");
   136 				}				
   136 				}
   137 			});		
   137 			});
   138 			
   138 			
   139 			$(".timeFrame").tooltip();
   139 			$(".timeFrame").tooltip();
   140 			/*
   140 			/*
   141 			*   Lightbox button 
   141 			*   Lightbox button
   142 			*/			
   142 			*/
   143 			
   143 			
   144 			$("#Program").fancybox({
   144 			$("#Program").fancybox({
   145 				'width'				: '75%',
   145 				'width'				: '75%',
   146 				'height'			: '75%',
   146 				'height'			: '75%',
   147 				'autoScale'			: false,
   147 				'autoScale'			: false,
   152 			
   152 			
   153 			$("#ACCES").click(function() {
   153 			$("#ACCES").click(function() {
   154 				$.fancybox.close();
   154 				$.fancybox.close();
   155 			});
   155 			});
   156 			
   156 			
   157 			// Buttons 
   157 			// Buttons
   158 			
   158 			
   159 		
   159 
   160 		});
   160         });
   161 		
   161 
   162 		
   162 		//<!-- LIMIT TEXTAREA:
   163 		<!-- LIMIT TEXTAREA:
       
   164 		function imposemax(Object) {
   163 		function imposemax(Object) {
   165             return (Object.value.length <= 140);
   164             return (Object.value.length <= 140);
   166 		}
   165 		};
   167 		// End -->
   166         // End -->
   168 		
   167 		
   169 		<!-- TIMER 
   168 		//<!-- TIMER
   170 	    var c=0;
   169 	    var c=0;
   171 		var t;
   170         var t;
   172 		var timer_is_on=0;
   171 		var timer_is_on=0;
   173 
   172 
   174 		function timedCount()
   173 		function timedCount()
   175 		{
   174 		{
   176 			document.getElementById('txt').value=c;
   175 			document.getElementById('txt').value=c;
   222 	<script type="text/javascript">
   221 	<script type="text/javascript">
   223 	
   222 	
   224 	  var _gaq = _gaq || [];
   223 	  var _gaq = _gaq || [];
   225 	  _gaq.push(['_setAccount', 'UA-23581291-1']);
   224 	  _gaq.push(['_setAccount', 'UA-23581291-1']);
   226 	  _gaq.push(['_trackPageview']);
   225 	  _gaq.push(['_trackPageview']);
   227 	  _gaq.push(['_setAllowAnchor', true]); 
   226 	  _gaq.push(['_setAllowAnchor', true]);
   228 	
   227 	
   229 	  (function() {
   228 	  (function() {
   230 	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   229 	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   231 	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   230 	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   232 	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   231 	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   238   <body>
   237   <body>
   239 	<div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div>
   238 	<div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div>
   240     <div class="container">
   239     <div class="container">
   241       <img src="<?php echo($head_logo); ?>" class="Producteur logo">
   240       <img src="<?php echo($head_logo); ?>" class="Producteur logo">
   242       <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
   241       <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
   243 	  <ul class="menu"> 
   242 	  <ul class="menu">
   244 	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>" class="menuLink">
   243 	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>" class="menuLink">
   245 	  	<?php print $translate->_("Accueil"); ?> </a></li>
   244 	  	<?php print $translate->_("Accueil"); ?> </a></li>
   246 	  <li class="menuUnderline" ><a href="<?php echo($config['link']); ?>" class="menuLink" target="_blank" id='Program'> 
   245 	  <li class="menuUnderline" ><a href="<?php echo($translate->_('config__link')); ?>" class="menuLink" target="_blank" id='Program'>
   247 	  	<?php print $translate->_("Programme"); ?></a></li>
   246 	  	<?php print $translate->_("Programme"); ?></a></li>
   248 	  <li ><a href="about.php" class="menuLink" >
   247 	  <li ><a href="about.php" class="menuLink" >
   249 	  	<?php print $translate->_("A propos"); ?></a></li>
   248 	  	<?php print $translate->_("A propos"); ?></a></li>
   250 
   249 
   251 	  </ul>
   250 	  </ul>
   252 	  
   251 	  
   253 	  	  <ul class="menu" > 
   252 	  	  <ul class="menu" >
   254 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
   253 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
   255 	       <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
   254 	       <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
   256 	        <?php print $translate->_("Japonais"); ?></a></li>
   255 	        <?php print $translate->_("Japonais"); ?></a></li>
   257 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink">
   256 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink">
   258 	       <img src='<?php echo(URL_ROOT); ?>images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
   257 	       <img src='<?php echo(URL_ROOT); ?>images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
   264 
   263 
   265 	  
   264 	  
   266 	  <div class="videoLive">
   265 	  <div class="videoLive">
   267 	  <?php if ($config['islive']):?>
   266 	  <?php if ($config['islive']):?>
   268 	  <div class="videoLivePlayer">
   267 	  <div class="videoLivePlayer">
   269 			<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375"> 
   268 			<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375">
   270 				<param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" /> 
   269 				<param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" />
   271 				<param name="allowfullscreen" value="true" /> 
   270 				<param name="allowfullscreen" value="true" />
   272 				<param name="allowscriptaccess" value="always" /> 
   271 				<param name="allowscriptaccess" value="always" />
   273 				<param name="wmode" value="transparent" />
   272 				<param name="wmode" value="transparent" />
   274 				<param name="flashvars" value="autostart=true&live=true&image=<?php echo($big_visual_url); ?>&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&controlbar=none&autostart=true" /> 
   273 				<param name="flashvars" value="autostart=true&live=true&image=<?php echo($big_visual_url); ?>&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&controlbar=none&autostart=true" />
   275 				<embed 
   274 				<embed
   276 					type="application/x-shockwave-flash"
   275 					type="application/x-shockwave-flash"
   277 					id="player2"
   276 					id="player2"
   278 					name="player2"
   277 					name="player2"
   279 					src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" 
   278 					src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"
   280 					width="500" 
   279 					width="500"
   281 					height="375"
   280 					height="375"
   282 					allowscriptaccess="always" 
   281 					allowscriptaccess="always"
   283 					allowfullscreen="true"
   282 					allowfullscreen="true"
   284 					wmode="transparent"
   283 					wmode="transparent"
   285 					flashvars="autostart=true&live=true&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&image=<?php echo($big_visual_url); ?>&controlbar=none&autostart=true" 
   284 					flashvars="autostart=true&live=true&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&image=<?php echo($big_visual_url); ?>&controlbar=none&autostart=true"
   286 					
   285 					
   287 				/> 
   286 				/>
   288 			</object> 
   287 			</object>
   289 			
   288 			
   290 		</div>	
   289 		</div>
   291 	  	<?php else: ?>
   290 	  	<?php else: ?>
   292 	  
   291 	  
   293 		<div class="videoLivePlayer">
   292 		<div class="videoLivePlayer">
   294 			<img src="<?php echo($big_visual_url); ?>" width="500"  height="375" />
   293 			<img src="<?php echo($big_visual_url); ?>" width="500"  height="375" />
   295 		</div>
   294 		</div>
   296 		<?php endif; ?>
   295 		<?php endif; ?>
   297 		
   296 		
   298 	  </div>
   297 	  </div>
   299 
   298 
   300 	<div class="videoLiveProgram">	
   299 	<div class="videoLiveProgram">
   301 		
   300 		
   302 		<div class="arrowContainer">
   301 		<div class="arrowContainer">
   303 			<div class="arrow"> </div>
   302 			<div class="arrow"> </div>
   304 		</div>
   303 		</div>
   305 		<div class="videoLiveProgramTitle">
   304 		<div class="videoLiveProgramTitle">
   306 			<b><?php echo($config['title']); ?></b></div>
   305 			<b><?php echo($translate->_('config__title')); ?></b></div>
   307 		<div class="videoLiveProgramDescription">
   306 		<div class="videoLiveProgramDescription">
   308 			<br><?php echo($config['description']); ?></div>
   307 			<br><?php echo($translate->_('config__description')); ?></div>
   309 		
   308 		
   310 		
   309 		
   311 	</div>
   310 	</div>
   312 	  
   311 	  
   313 	  <div class="tweetWriter">
   312 	  <div class="tweetWriter">
   332 
   331 
   333 			  
   332 			  
   334 			
   333 			
   335 			<a class="button_w" href="#"  id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" >
   334 			<a class="button_w" href="#"  id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" >
   336 				<span><?php print $translate->_("Envoyer"); ?></span>
   335 				<span><?php print $translate->_("Envoyer"); ?></span>
   337 			</a> 
   336 			</a>
   338 			<!--<button name="s" type="button" id="sendTweet"
   337 			<!--<button name="s" type="button" id="sendTweet"
   339 					style="float:right;margin-right:15px;margin-left:35px;width:70px;"  >Envoyer</button>-->
   338 					style="float:right;margin-right:15px;margin-left:35px;width:70px;"  >Envoyer</button>-->
   340 			<?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
   339 			<?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
   341 			<input id="tweetCounter" value="<?php echo(140-strlen($config[hashtag]));?>" disabled="disabled" size="3"/>
   340 			<input id="tweetCounter" value="<?php echo(140-strlen($config['hashtag']));?>" disabled="disabled" size="3"/>
   342 			<?php endif;?>
   341 			<?php endif;?>
   343 			<a 
   342 			<a
   344 					
   343 					
   345 					id="positive"
   344 					id="positive"
   346 					title="accord"
   345 					title="accord"
   347 					class="tweetButton">++</a>
   346 					class="tweetButton">++</a>
   348 			<a 
   347 			<a
   349 					
   348 					
   350 					id="negative"
   349 					id="negative"
   351 					title="désaccord"
   350 					title="désaccord"
   352 					class="tweetButton">--</a>
   351 					class="tweetButton">--</a>
   353 			<a
   352 			<a
   354 					
   353 					
   355 					id="reference"
   354 					id="reference"
   356 					title="reference"
   355 					title="reference"
   357 					class="tweetButton">==</a>
   356 					class="tweetButton">==</a>
   358 			<a 
   357 			<a
   359 					
   358 					
   360 					id="question"  
   359 					id="question"
   361 					title="question"
   360 					title="question"
   362 					class="tweetButton"> ??</a>
   361 					class="tweetButton"> ??</a>
   363 		</form>
   362 		</form>
   364 	  </div>
   363 	  </div>
   365 	  
   364 	  
   399 			</script>
   398 			</script>
   400 	  </div>
   399 	  </div>
   401 
   400 
   402       <div class="footer">
   401       <div class="footer">
   403 		<hr>
   402 		<hr>
   404 		 <?php 
   403 		 <?php
   405 				echo($config['partenaires']);
   404 				echo($translate->_('config__partenaires'));
   406 				
   405 				
   407 				if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
   406 				if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
   408 					echo("| 	<a href='clear.php'  class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
   407 					echo("| 	<a href='clear.php'  class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
   409 				}
   408 				}
   410 		 ?>
   409 		 ?>
   411 		  <input type="hidden" id="txt"/>
   410 		  <input type="hidden" id="txt"/>
   412 		  
   411 		  
   413 	  </div>   
   412 	  </div>
   414 	
   413 	
   415 
   414 
   416     </div>
   415     </div>
   417 	
   416 	
   418   </body>
   417   </body>