web/client_old.php
changeset 420 eb7c2cff1816
child 452 a408065d36e0
equal deleted inserted replaced
419:ad151a86046f 420:eb7c2cff1816
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       
     2    "http://www.w3.org/TR/html4/strict.dtd">
       
     3 
       
     4 <html lang="<?php echo($actual); ?>">
       
     5   <head>
       
     6     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       
     7     <title>Live Video and Annotation</title>
       
     8 	<meta http-equiv="X-UA-Compatible" content="IE=8" />
       
     9 
       
    10     <!-- Framework CSS -->
       
    11     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-screen','css'));?>" type="text/css" media="screen, projection"/>
       
    12     <link rel="stylesheet" href="<?php echo(registry_url('blueprint-print','css'));?>" type="text/css" media="print"/>
       
    13     <!--[if lt IE 8]><link rel="stylesheet" href="<?php echo(registry_url('blueprint-ie','css'));?>" type="text/css" media="screen, projection"><![endif]-->
       
    14 	<link rel="stylesheet" href="<?php echo(registry_url('blueprint-plugins-fancy-type','css'));?>" type="text/css" media="screen, projection"/>
       
    15 	<link rel="stylesheet" href="<?php echo(registry_url('custom','css'));?>" type="text/css" media="screen, projection"/>
       
    16 	<link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
       
    17 
       
    18 	<!-- JAVASCRIPT -->
       
    19 	<script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
       
    20 	<script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
       
    21 	<script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'))?>"></script>
       
    22 	<script type="text/javascript" src="<?php echo(registry_url('tw-widget','js'))?>"></script>
       
    23 	
       
    24 	<!-- FONT -->
       
    25 	<link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'>
       
    26 	<link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
       
    27 	<link href='<?php echo(registry_url('Geo','font'))?>' rel='stylesheet' type='text/css'>
       
    28 
       
    29 	<script type="text/javascript">
       
    30 	$(document).ready(function() {
       
    31 
       
    32 			doTimer();
       
    33 			//$("txt").hide();
       
    34 			$(".loginbutton").click(function() {
       
    35 				document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    36 			});
       
    37 			$("#IDENTIFIER").click(function() {
       
    38 				document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    39 			});
       
    40 			
       
    41 			$("#messageSuccess").hide();
       
    42 			$("#messageFailed").hide();
       
    43 
       
    44 
       
    45 			function add_grammar(value) {
       
    46 				$('#status').val($('#status').val()+value+" ");
       
    47 				$('#status').change();
       
    48 			}
       
    49 			
       
    50 			// BUTTONS
       
    51 			$("#positive").click(function(){
       
    52 				add_grammar("++");
       
    53 			});
       
    54 			$("#negative").click(function(){
       
    55 				add_grammar("--");
       
    56 			});
       
    57 			$("#reference").click(function(){
       
    58 				add_grammar("==");
       
    59 			});
       
    60 			$("#question").click(function(){
       
    61 				add_grammar("??");
       
    62 			});
       
    63 			
       
    64 			// SEND TWEETS
       
    65 			$("#sendTweet").click(function(){
       
    66 				var MyStatus = $('#status').val();
       
    67 				$.post('tweet_ajax.php', {status:MyStatus}
       
    68 				,function(data) {
       
    69 				
       
    70 					if(data=="true"){
       
    71 						$("#messageSuccess").show('fast');
       
    72 						$("#messageSuccess").delay(800).hide('slow');
       
    73 						$('#status').val("<?php echo($config['hashtag']); ?>");
       
    74 						$('#status').change();
       
    75 					}else{
       
    76 						$("#error").text(data);
       
    77 						$("#messageFailed").show('fast');
       
    78 						$("#messageFailed").delay(800).hide('slow');
       
    79 					}
       
    80 					
       
    81 				});
       
    82 				
       
    83 			});
       
    84 
       
    85 			$("#status").bind("change keyup paste blur focus",function() {
       
    86 				newval = 140-$("#status").val().length;
       
    87 				$('#tweetCounter').val(newval);
       
    88 				if(newval < 0) {
       
    89 					$('#tweetCounter').addClass("tweetCounterNegative");
       
    90 				}
       
    91 				else {
       
    92 					$('#tweetCounter').removeClass("tweetCounterNegative");
       
    93 				}
       
    94 			});
       
    95 			
       
    96 			$(".timeFrame").tooltip();
       
    97 			/*
       
    98 			*   Lightbox button
       
    99 			*/
       
   100 			
       
   101 			$("#Program").fancybox({
       
   102 				'width'				: '75%',
       
   103 				'height'			: '75%',
       
   104 				'autoScale'			: false,
       
   105 				'transitionIn'		: 'none',
       
   106 				'transitionOut'		: 'none',
       
   107 				'type'				: 'iframe'
       
   108 			});
       
   109 			
       
   110 			$("#ACCES").click(function() {
       
   111 				$.fancybox.close();
       
   112 			});
       
   113 			
       
   114 			// Buttons
       
   115 			
       
   116 
       
   117         });
       
   118 
       
   119 		//<!-- LIMIT TEXTAREA:
       
   120 		function imposemax(Object) {
       
   121             return (Object.value.length <= 140);
       
   122 		};
       
   123         // End -->
       
   124 		
       
   125 		//<!-- TIMER
       
   126 	    var c=0;
       
   127         var t;
       
   128 		var timer_is_on=0;
       
   129 
       
   130 		function timedCount()
       
   131 		{
       
   132 			document.getElementById('txt').value=c;
       
   133 			c = c+1;
       
   134 			t = window.setTimeout("timedCount()",1000);
       
   135 			$(".twtr-ft").hide();
       
   136 			$(".twtr-hd").hide();
       
   137 			//twtr-tweet
       
   138 			$(".twtr-tweet").each(colorTweetings);
       
   139 		
       
   140 		}
       
   141 
       
   142 		function colorTweetings (){
       
   143 				var tweettemp = $(this).html();
       
   144 				if (tweettemp.search(/\x3F\x3F/)!=-1){
       
   145 					 $(this).css({'background-color': '#bfdbec','color':"#000"});
       
   146 				}
       
   147 				if (tweettemp.search(/\x2B\x2B/)!=-1){
       
   148 					 $(this).css({'background-color': '#c5e7cd','color':"#fff"});
       
   149 				}
       
   150 				if (tweettemp.search(/\x2D\x2D/)!=-1){
       
   151 					 $(this).css({'background-color': '#f6ced0','color':"#fff"});
       
   152 				}
       
   153 				if (tweettemp.search(/\x3D\x3D/)!=-1){
       
   154 					 $(this).css({'background-color': '#ecedc1','color':"#000"});
       
   155 				}
       
   156 		};
       
   157 			
       
   158 
       
   159 		
       
   160 		function doTimer()
       
   161 		{
       
   162 		if (!timer_is_on)
       
   163 		  {
       
   164 		  timer_is_on=1;
       
   165 		  timedCount();
       
   166 		  }
       
   167 		}
       
   168 
       
   169 		function stopCount()
       
   170 		{
       
   171 			clearTimeout(t);
       
   172 			timer_is_on=0;
       
   173 		}
       
   174 		//
       
   175 		//-->
       
   176 	</script>
       
   177 	
       
   178 	<script type="text/javascript">
       
   179 	
       
   180 	  var _gaq = _gaq || [];
       
   181 	  _gaq.push(['_setAccount', 'UA-23581291-1']);
       
   182 	  _gaq.push(['_trackPageview']);
       
   183 	  _gaq.push(['_setAllowAnchor', true]);
       
   184 	
       
   185 	  (function() {
       
   186 	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       
   187 	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       
   188 	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       
   189 	  })();
       
   190 	
       
   191 	</script>
       
   192 	
       
   193   </head>
       
   194   <body>
       
   195 	<div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div>
       
   196     <div class="container">
       
   197       <img src="<?php echo($head_logo); ?>" class="Producteur logo">
       
   198       <div id="minilogo" style="height:5px;top:5px;"></div>
       
   199 	  <ul class="menu">
       
   200 	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>" class="menuLink">
       
   201 	  	<?php print $translate->_("Accueil"); ?> </a></li>
       
   202 	  <li class="menuUnderline" ><a href="<?php echo($translate->_('config__link')); ?>" class="menuLink" target="_blank" id='Program'>
       
   203 	  	<?php print $translate->_("Programme"); ?></a></li>
       
   204 	  <li ><a href="../about.php" class="menuLink" >
       
   205 	  	<?php print $translate->_("A propos"); ?></a></li>
       
   206 
       
   207 	  </ul>
       
   208 	  
       
   209 	  	  <ul class="menu" >
       
   210 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
       
   211 	       <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
       
   212 	        <?php print $translate->_("Japonais"); ?></a></li>
       
   213 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink">
       
   214 	       <img src='<?php echo(URL_ROOT); ?>images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
       
   215 	       <?php print $translate->_("Français"); ?></a></li>
       
   216 	  <li ><a href="<?php URL_ROOT ?>client.php?lang=en" class="menuLink">
       
   217 	       <img src='<?php echo(URL_ROOT); ?>images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
       
   218 	       <?php print $translate->_("Anglais"); ?></a></li>
       
   219 	  </ul>
       
   220 
       
   221 	  
       
   222 	  <div class="videoLive">
       
   223 	  <?php if ($config['islive']):?>
       
   224 	  <div class="videoLivePlayer">
       
   225 			<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="500" height="375">
       
   226 				<param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" />
       
   227 				<param name="allowfullscreen" value="true" />
       
   228 				<param name="allowscriptaccess" value="always" />
       
   229 				<param name="wmode" value="transparent" />
       
   230 				<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" />
       
   231 				<embed
       
   232 					type="application/x-shockwave-flash"
       
   233 					id="player2"
       
   234 					name="player2"
       
   235 					src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"
       
   236 					width="500"
       
   237 					height="375"
       
   238 					allowscriptaccess="always"
       
   239 					allowfullscreen="true"
       
   240 					wmode="transparent"
       
   241 					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"
       
   242 					
       
   243 				/>
       
   244 			</object>
       
   245 			
       
   246 		</div>
       
   247 		<?php elseif(isset($config['islive_embed']) && count($config['islive_embed'])>0):?>
       
   248 		<div class="videoLivePlayer">
       
   249 		    <?php echo($config['islive_embed']); ?>
       
   250 		</div>
       
   251 	  	<?php else: ?>
       
   252 		<div class="videoLivePlayer">
       
   253 			<img src="<?php echo($big_visual_url); ?>" width="500"  height="375" />
       
   254 		</div>
       
   255 		<?php endif; ?>
       
   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><?php echo($translate->_('config__title')); ?></b></div>
       
   266 		<div class="videoLiveProgramDescription">
       
   267 			<br><?php echo($translate->_('config__description')); ?></div>
       
   268 		
       
   269 		
       
   270 	</div>
       
   271 	  
       
   272 	  <div class="tweetWriter">
       
   273 		<h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
       
   274 		<form  action="tweet.php" method="post" id="statusform" >
       
   275 		<?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   276 				echo("<div class='loginbutton' ><a href='".URL_ROOT."$rep/client.php?CONNECT=true' class='loginlink'>
       
   277 				".$translate->_("Vous n'êtes pas connecté.")."</a></div>");
       
   278 			  }else{
       
   279 				echo("<textarea name='status' id='status' rows='3' cols='50' onkeypress='return imposemax(this);'>$config[hashtag]</textarea>");
       
   280 			  }
       
   281 		?>
       
   282 
       
   283 
       
   284 				<div id="messageSuccess" style="background-color:lightgreen;">
       
   285 					<?php print $translate->_("Envoyé"); ?><br><br>
       
   286 				</div>
       
   287 				
       
   288 				<div id="messageFailed" style="background-color:red;">
       
   289 					<?php print $translate->_("Erreur1"); ?><div id="error">&nbsp;</div><br/><br>
       
   290 				</div>
       
   291 
       
   292 			  
       
   293 			
       
   294 			<a class="button_w" href="#"  id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" >
       
   295 				<span><?php print $translate->_("Envoyer"); ?></span>
       
   296 			</a>
       
   297 			<!--<button name="s" type="button" id="sendTweet"
       
   298 					style="float:right;margin-right:15px;margin-left:35px;width:70px;"  >Envoyer</button>-->
       
   299 			<?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
       
   300 			<input id="tweetCounter" value="<?php echo(140-strlen($config['hashtag']));?>" disabled="disabled" size="3"/>
       
   301 			<?php endif;?>
       
   302 			<a
       
   303 					
       
   304 					id="positive"
       
   305 					title="accord"
       
   306 					class="tweetButton">++</a>
       
   307 			<a
       
   308 					
       
   309 					id="negative"
       
   310 					title="désaccord"
       
   311 					class="tweetButton">--</a>
       
   312 			<a
       
   313 					
       
   314 					id="reference"
       
   315 					title="reference"
       
   316 					class="tweetButton">==</a>
       
   317 			<a
       
   318 					
       
   319 					id="question"
       
   320 					title="question"
       
   321 					class="tweetButton"> ??</a>
       
   322 		</form>
       
   323 	  </div>
       
   324 	  
       
   325 	  <div class="tweetReader">
       
   326 			<script>
       
   327 				new TWTR.Widget({
       
   328 				  version: 2,
       
   329 				  type: 'search',
       
   330 				  search: '<?php echo($config['hashtag']); ?>',
       
   331 				  interval: 3000,
       
   332 				  title: '',
       
   333 				  subject: '',
       
   334 				  width: 377,
       
   335 				  height: 450,
       
   336 				  theme: {
       
   337 					shell: {
       
   338 					  background: '#ffffff',
       
   339 					  color: '#ffffff'
       
   340 					},
       
   341 					tweets: {
       
   342 					  background: '#ffffff',
       
   343 					  color: '#444444',
       
   344 					  links: '#1985b5'
       
   345 					}
       
   346 				  },
       
   347 				  features: {
       
   348 					scrollbar: true,
       
   349 					loop: false,
       
   350 					live: true,
       
   351 					hashtags: true,
       
   352 					timestamp: true,
       
   353 					avatars: true,
       
   354 					toptweets: true,
       
   355 					behavior: 'all'
       
   356 				  }
       
   357 				}).render().start();
       
   358 			</script>
       
   359 	  </div>
       
   360 
       
   361       <div class="footer">
       
   362 		<hr>
       
   363 		 <?php
       
   364 				echo($translate->_('config__partenaires'));
       
   365 				
       
   366 				if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   367 					echo("| 	<a href='clear.php'  class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
       
   368 				}
       
   369 		 ?>
       
   370 		  <input type="hidden" id="txt"/>
       
   371 		  
       
   372 	  </div>
       
   373 	
       
   374 
       
   375     </div>
       
   376 	
       
   377   </body>
       
   378 </html>