web/fens_FabLab_Design_Metadata/polemicaltimeline.php
changeset 220 42aeb2bfc58e
parent 200 df98bc033a67
equal deleted inserted replaced
219:66fa89a3d42c 220:42aeb2bfc58e
     2 
     2 
     3 /**
     3 /**
     4  * include some common code (like we did in the 90s)
     4  * include some common code (like we did in the 90s)
     5  * People still do this? ;)
     5  * People still do this? ;)
     6  */
     6  */
       
     7 include_once 'config.php';
     7  // configuration 
     8  // configuration 
     8 include 'common.php';
     9 include 'common.php';
     9  // objet actuel 
    10  // objet actuel 
    10 include_once 'config.php';
    11 
       
    12 $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
    11 
    13 
    12 ?>
    14 ?>
    13 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    15 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    14 <html lang="<?php echo($actual); ?>">
    16 <html lang="<?php echo($actual); ?>">
    15   <head>
    17   <head>
    21 	<meta name="robots" content="index, follow">
    23 	<meta name="robots" content="index, follow">
    22 	
    24 	
    23 	<!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> -->
    25 	<!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> -->
    24 	<!-- JAVASCRIPT --> 
    26 	<!-- JAVASCRIPT --> 
    25 	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    27 	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
       
    28 	<script type="text/javascript">	
       
    29 		$.noConflict();
       
    30 	</script>
    26 	<script type="text/javascript" src="../res/raphael/raphael-min.js"></script>
    31 	<script type="text/javascript" src="../res/raphael/raphael-min.js"></script>
    27 	<script type="text/javascript" src="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    32 	<script type="text/javascript" src="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    28 	<script type="text/javascript" src="../res/niceforms/niceforms.js"></script>
    33 	<script type="text/javascript" src="../res/niceforms/niceforms.js"></script>
       
    34 	<script type="text/javascript" src="../res/jquery.url/jquery.url.js"></script>
       
    35 	<script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
    29 		
    36 		
    30 	<!-- Framework CSS -->
    37 	<!-- Framework CSS -->
    31     <link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
    38     <link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
    32     <link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print">
    39     <link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print">
    33 	<link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
    40 	<link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
    39 	<link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'>
    46 	<link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'>
    40 	<link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'>
    47 	<link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'>
    41 	
    48 	
    42 	<style type="text/css"> 
    49 	<style type="text/css"> 
    43 		.tweetButton{float:left;margin-right:5px;}
    50 		.tweetButton{float:left;margin-right:5px;}
    44 		.videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:638px;}
    51 		.videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:748px;}
    45 		.videoLive{width:650px;height:640px;background:#fff;float:right;margin-top:20px;padding:5px;}
    52 		.videoLive{width:650px;height:750px;background:#fff;float:right;margin-top:20px;padding:5px;}			
    46 					
    53 		.tweetExplain{background-image:url(images/tweetExplainBgd.gif);width:250px;height:750px;padding:10px;position:absolute; margin-top:70px;}
    47 					.tweetExplain{background-image:url(../images/tweetExplainBgd.gif);width:250px;height:640px;padding:10px;position:absolute; margin-top:70px;}
    54 		.footer{margin-top:850px;width:960px;height:20px;position:absolute;text-align:center;}
    48 		.footer{margin-top:740px;width:960px;height:20px;position:absolute;text-align:center;}
       
    49 		.tooltip{
    55 		.tooltip{
    50 			 z-index: 10000000000;
    56 			 z-index: 10000000000;
    51 		}
    57 		}
    52 		#tip{
    58 		#tip{
    53 			 position : absolute;
    59 			 position : absolute;
    74 			padding-top: 0px;
    80 			padding-top: 0px;
    75 			z-index: 9;
    81 			z-index: 9;
    76 			position : absolute;
    82 			position : absolute;
    77 		}
    83 		}
    78 
    84 
    79 	</style>
    85 	</style>	
    80 	<script type="text/javascript">
    86 	<script type="text/javascript">
    81 	
    87   		// Configuration Polemical Timeline
    82 	  var _gaq = _gaq || [];
    88   		<?php
    83 	  _gaq.push(['_setAccount', 'UA-23581291-1']);
    89   		if(is_array($config['metadata'])):
    84 	  _gaq.push(['_trackPageview']);
    90   			reset($config['metadata']);
    85 
    91   		    $first_key = key($config['metadata']);
    86 	  (function() {
    92   		?>
    87 	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    93   		var metadatas = jQuery.parseJSON('<?php echo(json_encode($config['metadata'])); ?>');
    88 	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    94   		var url = jQuery.url();
    89 	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    95   		var metadata_key = url.fparam('metadata');
    90 	  })();
    96   		if(typeof metadata_key === "undefined" || metadata_key.length === 0) {
    91 	
    97   			metadata_key = "<?php echo($first_key);?>";
    92 	</script>
    98   		} 
       
    99   		<?php else: ?>
       
   100   		var metadatas = { metadata: {url: "<?php echo($config['metadata'])?>", duration: <?php echo($config['duration'])?>} };
       
   101   		var metadata_key = "metadata"; 
       
   102   		<?php endif;?>
       
   103   		
       
   104 		var config = {
       
   105 					target:"chartTimeline",
       
   106 					x:8,
       
   107 					y:418,
       
   108 					width:<?php echo($player_width); ?>,
       
   109 					height:<?php echo($player_height); ?>,
       
   110 					heightmax:<?php echo($player_height); ?>,
       
   111 					duration:metadatas[metadata_key].duration,
       
   112 					metadata:metadatas[metadata_key].url
       
   113 					};
       
   114   	</script>
       
   115 	<script type='text/javascript' src='../res/metadataplayer.polemic/src/js/polemic.js'></script>
    93 	<script type="text/javascript">
   116 	<script type="text/javascript">
    94 		$(document).ready(function() {
   117 		jQuery.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
    95 		
   118 
    96 			$("#Embeded").fancybox({
   119 		jQuery(document).ready(function() {
       
   120 			
       
   121 			jQuery("#mdselect_"+metadata_key).attr("selected","selected");
       
   122 			jQuery("#mdselect").change(function() {
       
   123 				var metadata_key = this.options[this.selectedIndex].value;
       
   124 				window.location.hash = "#metadata="+metadata_key;
       
   125 				window.location.href = window.location.href;
       
   126 				window.location.reload(true);
       
   127 				jQuery("#Embeded").attr('href','embed_form.php?metadata='+metadata_key);
       
   128 			});
       
   129 			if(metadata_key !== "metadata") {
       
   130 				jQuery("#Embeded").attr('href','embed_form.php?metadata='+metadata_key);
       
   131 			}
       
   132 			jQuery("#Embeded").fancybox({
    97 				'width'				: 360,
   133 				'width'				: 360,
    98 				'height'			: 360,
   134 				'height'			: 360,
    99 				'autoDimensions'	: false,
   135 				'autoDimensions'	: false,
   100 				'transitionIn'		: 'none',
   136 				'transitionIn'		: 'none',
   101 				'transitionOut'		: 'none',
   137 				'transitionOut'		: 'none',
   102 				'type'				: 'iframe'
   138 				'type'				: 'iframe'
   103 			});
   139 			});
   104 			
   140 			
   105 		});
   141 		});
       
   142 	</script>	
       
   143 	<script type="text/javascript">
       
   144 		var _gaq = _gaq || [];
       
   145 		_gaq.push(['_setAccount', 'UA-23581291-1']);
       
   146 		_gaq.push(['_trackPageview']);
       
   147 		
       
   148 		(function() {
       
   149 		    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       
   150 		    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       
   151 		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       
   152 		})();
   106 	</script>
   153 	</script>
   107 	
       
   108   </head>
   154   </head>
   109   <script type="text/javascript">
       
   110   	// Configuration Polemical Timeline
       
   111 	var config = {
       
   112 					target:"chartTimeline",
       
   113 					x:8,
       
   114 					y:418,
       
   115 					width:650,
       
   116 					height:480,
       
   117 					heightmax:480,
       
   118 					duration:<?php echo($config['duration']); ?>,
       
   119 					metadata:"<?php echo($config['metadata']); ?>"
       
   120 					};
       
   121   </script>
       
   122   <script type='text/javascript' src='../res/metadataplayer.polemic/src/js/polemic.js'></script>
       
   123   <body>
   155   <body>
   124   
   156   
   125 
   157 
   126   <!-- tooltip --> 
   158   <!-- tooltip --> 
   127   <div id="tip">
   159   <div id="tip">
   136 		   <?php print $translate->_("Accueil"); ?></a></li>
   168 		   <?php print $translate->_("Accueil"); ?></a></li>
   137 		  <li class="menuUnderline"><a href="embed_form.php" class="menuLink" id="Embeded">
   169 		  <li class="menuUnderline"><a href="embed_form.php" class="menuLink" id="Embeded">
   138 		    <?php print $translate->_("Partager"); ?></a></li>
   170 		    <?php print $translate->_("Partager"); ?></a></li>
   139 		  <li >&nbsp;</li>
   171 		  <li >&nbsp;</li>
   140 	  </ul>
   172 	  </ul>
   141 	  
   173 	<?php if(is_array($config['metadata'])):?>
   142 	<ul class="menu lang" > 
   174 	<ul id="content_select_ul" class="menu mdselect">
       
   175 	    <?php print $translate->_("changer de contenu"); ?><br/>
       
   176 	    <select id="mdselect">
       
   177 	    	<?php foreach ($config['metadata'] as $key => $value):?>
       
   178 	    	<option value="<?php echo($key); ?>" id="mdselect_<?php echo($key); ?>" ><?php echo($value['display']); ?></option>
       
   179 	    	<?php endforeach;?>
       
   180 	    </select>
       
   181 	</ul>
       
   182 	<ul class="menu shortlang" >
       
   183 	<?php else:?>
       
   184 	<ul class="menu lang" >
       
   185 	<?php endif;?>	  
   143 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
   186 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
   144 	       <img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
   187 	       <img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
   145 	        <?php print $translate->_("Japonais"); ?></a></li>
   188 	        <?php print $translate->_("Japonais"); ?></a></li>
   146 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=fr" class="menuLink">
   189 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=fr" class="menuLink">
   147 	       <img src='../images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
   190 	       <img src='../images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
   168 
   211 
   169 
   212 
   170 
   213 
   171 	  <div class="videoLive" >
   214 	  <div class="videoLive" >
   172 		<div class="videoLivePlayer">
   215 		<div class="videoLivePlayer">
   173 
   216 			<div id="chartTimeline"> </div>
   174 		<div id="chartTimeline"> </div>	
   217 			<script type="text/javascript">
   175 		<script type="text/javascript">
   218 				var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
   176 			var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
   219 			</script>
   177 		</script>
   220 			<div id="player_project_embed" class="iri_player_embed"></div>
   178 		
       
   179 		<script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
       
   180 		<script type="text/javascript">
       
   181 			$.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
       
   182 		</script>
       
   183 		
       
   184 		<div id="player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed" class="iri_player_embed"> </div>
       
   185 			<script type="text/javascript">
   221 			<script type="text/javascript">
   186 				var configMP = {
   222 				var configMP = {
   187 						/*metadata:{
       
   188 							format:'cinelab',
       
   189 							src:'metadata.json',
       
   190 							load:'json'},*/
       
   191 						metadata:{
   223 						metadata:{
   192 							format:'cinelab',
   224 							format:'cinelab',
   193 							src:'<?php echo($config['metadata']); ?>',
   225 							src:config.metadata,
   194 							load:'jsonp'},
   226 							load:'jsonp'},
   195 						gui:{
   227 						gui:{
   196 							width:650,
   228 							width:config.width,
   197 							height:480,
   229 							height:config.height,
   198 							mode:'video',
   230 							mode:'video',
   199 							container:'player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed',
   231 							container:'player_project_embed',
   200 							debug:false,
   232 							debug:false,
   201 							css:'../res/css/LdtPlayer.css'},
   233 							css:'../res/css/LdtPlayer.css'},
   202 	
   234 			
   203 						player:{
   235 						player:{
   204 							type:'jwplayer',
   236 							type:'jwplayer',
   205 							src:'http://www.iri.centrepompidou.fr//dev/ldt/static/ldt/swf/player.swf'}
   237 							src:'../res/metadataplayer/res/swf/player.swf'}
   206 					};
   238 					};
   207 				__IriSP.init(configMP);     
   239 				__IriSP.init(configMP);
   208 			</script>
   240 			</script>
   209 		</div>	
   241 		</div>
   210 	  </div>
   242 	  </div>
   211 
   243 
   212  
   244  
   213       <div class="footer">
   245       <div class="footer">
   214 		<hr>
   246 		<hr>