web/client.php
changeset 291 db1e6bfaa54e
parent 276 f7669b499d41
child 298 28d9ecf31ac2
--- a/web/client.php	Wed Oct 05 13:39:57 2011 +0200
+++ b/web/client.php	Wed Oct 05 18:11:31 2011 +0200
@@ -1,9 +1,9 @@
 <?php
 
 if(!isset($_REQUEST['rep'])) {
-	include_once dirname(__FILE__).'/common.php';
-	header('Location: ' . URL_ROOT . "$C_default_rep/client.php" );
-	exit();
+    include_once dirname(__FILE__).'/common.php';
+    header('Location: ' . URL_ROOT . "$C_default_rep/client.php" );
+    exit();
 }
 
 $rep = $_REQUEST['rep'];
@@ -30,13 +30,13 @@
 
 
 $big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
-if(isset($config['client_visual']) && $config['client_visual'] != null ) {
-	$big_visual_url = URL_ROOT."$rep/".$config['client_visual'];
+if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) {
+	$big_visual_url = URL_ROOT."$rep/".$translate->_('config__client_visual');
 }
 
 $head_logo = URL_ROOT."$rep/images/head_logo.gif";
-if(isset($config['head_logo']) && $config['head_logo'] != null ) {
-	$head_logo = URL_ROOT."$rep/".$config['head_logo'];
+if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) {
+	$head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo');
 }
 
 ?>
@@ -48,17 +48,17 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <title>Live Video and Annotation</title>
-	<meta http-equiv="X-UA-Compatible" content="IE=8" /> 
+	<meta http-equiv="X-UA-Compatible" content="IE=8" />
 
     <!-- Framework CSS -->
     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-screen','css'));?>" type="text/css" media="screen, projection"/>
     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-print','css'));?>" type="text/css" media="print"/>
-    <!--[if lt IE 8]><link rel="stylesheet" href="<?php echo(registry_url('blueprint-ie','css'));?>" type="text/css" media="screen, projection"><![endif]--> 
+    <!--[if lt IE 8]><link rel="stylesheet" href="<?php echo(registry_url('blueprint-ie','css'));?>" type="text/css" media="screen, projection"><![endif]-->
 	<link rel="stylesheet" href="<?php echo(registry_url('blueprint-plugins-fancy-type','css'));?>" type="text/css" media="screen, projection"/>
 	<link rel="stylesheet" href="<?php echo(registry_url('custom','css'));?>" type="text/css" media="screen, projection"/>
 	<link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
 
-	<!-- JAVASCRIPT --> 
+	<!-- JAVASCRIPT -->
 	<script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
 	<script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
 	<script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'))?>"></script>
@@ -69,7 +69,7 @@
 	<link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
 	<link href='<?php echo(registry_url('Geo','font'))?>' rel='stylesheet' type='text/css'>
 
-	<script type="text/javascript">	
+	<script type="text/javascript">
 	$(document).ready(function() {
 
 			doTimer();
@@ -104,7 +104,7 @@
 				add_grammar("??");
 			});
 			
-			// SEND TWEETS 
+			// SEND TWEETS
 			$("#sendTweet").click(function(){
 				var MyStatus = $('#status').val();
 				$.post('tweet_ajax.php', {status:MyStatus}
@@ -123,7 +123,7 @@
 					
 				});
 				
-			});	
+			});
 
 			$("#status").bind("change keyup paste blur focus",function() {
 				newval = 140-$("#status").val().length;
@@ -133,13 +133,13 @@
 				}
 				else {
 					$('#tweetCounter').removeClass("tweetCounterNegative");
-				}				
-			});		
+				}
+			});
 			
 			$(".timeFrame").tooltip();
 			/*
-			*   Lightbox button 
-			*/			
+			*   Lightbox button
+			*/
 			
 			$("#Program").fancybox({
 				'width'				: '75%',
@@ -154,21 +154,20 @@
 				$.fancybox.close();
 			});
 			
-			// Buttons 
+			// Buttons
 			
-		
-		});
-		
-		
-		<!-- LIMIT TEXTAREA:
+
+        });
+
+		//<!-- LIMIT TEXTAREA:
 		function imposemax(Object) {
             return (Object.value.length <= 140);
-		}
-		// End -->
+		};
+        // End -->
 		
-		<!-- TIMER 
+		//<!-- TIMER
 	    var c=0;
-		var t;
+        var t;
 		var timer_is_on=0;
 
 		function timedCount()
@@ -224,7 +223,7 @@
 	  var _gaq = _gaq || [];
 	  _gaq.push(['_setAccount', 'UA-23581291-1']);
 	  _gaq.push(['_trackPageview']);
-	  _gaq.push(['_setAllowAnchor', true]); 
+	  _gaq.push(['_setAllowAnchor', true]);
 	
 	  (function() {
 	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
@@ -240,17 +239,17 @@
     <div class="container">
       <img src="<?php echo($head_logo); ?>" class="Producteur logo">
       <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
-	  <ul class="menu"> 
+	  <ul class="menu">
 	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>" class="menuLink">
 	  	<?php print $translate->_("Accueil"); ?> </a></li>
-	  <li class="menuUnderline" ><a href="<?php echo($config['link']); ?>" class="menuLink" target="_blank" id='Program'> 
+	  <li class="menuUnderline" ><a href="<?php echo($translate->_('config__link')); ?>" class="menuLink" target="_blank" id='Program'>
 	  	<?php print $translate->_("Programme"); ?></a></li>
 	  <li ><a href="about.php" class="menuLink" >
 	  	<?php print $translate->_("A propos"); ?></a></li>
 
 	  </ul>
 	  
-	  	  <ul class="menu" > 
+	  	  <ul class="menu" >
 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
 	       <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
 	        <?php print $translate->_("Japonais"); ?></a></li>
@@ -266,28 +265,28 @@
 	  <div class="videoLive">
 	  <?php if ($config['islive']):?>
 	  <div class="videoLivePlayer">
-			<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375"> 
-				<param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" /> 
-				<param name="allowfullscreen" value="true" /> 
-				<param name="allowscriptaccess" value="always" /> 
+			<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375">
+				<param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" />
+				<param name="allowfullscreen" value="true" />
+				<param name="allowscriptaccess" value="always" />
 				<param name="wmode" value="transparent" />
-				<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" /> 
-				<embed 
+				<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" />
+				<embed
 					type="application/x-shockwave-flash"
 					id="player2"
 					name="player2"
-					src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" 
-					width="500" 
+					src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"
+					width="500"
 					height="375"
-					allowscriptaccess="always" 
+					allowscriptaccess="always"
 					allowfullscreen="true"
 					wmode="transparent"
-					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" 
+					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"
 					
-				/> 
-			</object> 
+				/>
+			</object>
 			
-		</div>	
+		</div>
 	  	<?php else: ?>
 	  
 		<div class="videoLivePlayer">
@@ -297,15 +296,15 @@
 		
 	  </div>
 
-	<div class="videoLiveProgram">	
+	<div class="videoLiveProgram">
 		
 		<div class="arrowContainer">
 			<div class="arrow"> </div>
 		</div>
 		<div class="videoLiveProgramTitle">
-			<b><?php echo($config['title']); ?></b></div>
+			<b><?php echo($translate->_('config__title')); ?></b></div>
 		<div class="videoLiveProgramDescription">
-			<br><?php echo($config['description']); ?></div>
+			<br><?php echo($translate->_('config__description')); ?></div>
 		
 		
 	</div>
@@ -334,18 +333,18 @@
 			
 			<a class="button_w" href="#"  id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" >
 				<span><?php print $translate->_("Envoyer"); ?></span>
-			</a> 
+			</a>
 			<!--<button name="s" type="button" id="sendTweet"
 					style="float:right;margin-right:15px;margin-left:35px;width:70px;"  >Envoyer</button>-->
 			<?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
-			<input id="tweetCounter" value="<?php echo(140-strlen($config[hashtag]));?>" disabled="disabled" size="3"/>
+			<input id="tweetCounter" value="<?php echo(140-strlen($config['hashtag']));?>" disabled="disabled" size="3"/>
 			<?php endif;?>
-			<a 
+			<a
 					
 					id="positive"
 					title="accord"
 					class="tweetButton">++</a>
-			<a 
+			<a
 					
 					id="negative"
 					title="désaccord"
@@ -355,9 +354,9 @@
 					id="reference"
 					title="reference"
 					class="tweetButton">==</a>
-			<a 
+			<a
 					
-					id="question"  
+					id="question"
 					title="question"
 					class="tweetButton"> ??</a>
 		</form>
@@ -401,8 +400,8 @@
 
       <div class="footer">
 		<hr>
-		 <?php 
-				echo($config['partenaires']);
+		 <?php
+				echo($translate->_('config__partenaires'));
 				
 				if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
 					echo("| 	<a href='clear.php'  class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
@@ -410,7 +409,7 @@
 		 ?>
 		  <input type="hidden" id="txt"/>
 		  
-	  </div>   
+	  </div>
 	
 
     </div>