web/index.php
changeset 229 74c9ddc3640b
parent 207 621fa6caec0c
child 233 10d6fd6ce9ab
--- a/web/index.php	Mon Jul 18 13:40:06 2011 +0200
+++ b/web/index.php	Mon Jul 25 18:50:20 2011 +0200
@@ -5,7 +5,10 @@
  * include some common code (like we did in the 90s)
  * People still do this? ;)
  */
-include_once './common.php';
+
+include_once dirname(__FILE__).'/config.php';
+include_once dirname(__FILE__).'/'.$C_default_rep.'/config.php';
+include_once dirname(__FILE__).'/common.php';
 
 /**
  * Do we already have a valid Access Token or need to go get one?
@@ -46,29 +49,28 @@
 	<link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" >
 
 	<!-- JAVASCRIPT --> 
-	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-	<!--<script type="text/javascript" src="res/jquery.tools/jquery.tools.min.js"></script>-->
-	<script src="http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js"></script>
-	<script type="text/javascript" src="res/jquery.fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
-	<script type="text/javascript" src="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
-	<script type="text/javascript" src="res/niceforms/niceforms.js"></script>
-	<script src="http://widgets.twimg.com/j/2/widget.js"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('jquery','js'));?>"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'));?>"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'));?>"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('fancybox','js'));?>"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('niceforms','js'));?>"></script>
+	<script type="text/javascript" src="<?php echo(registry_url('tw-widget','js'));?>"></script>
 	
 	<!-- FONT -->
-	<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'>
-	<link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'>
-	<link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'>
+	<link href='<?php echo(registry_url('PT-Sans_Narrow','font'));?>' rel='stylesheet' type='text/css'>
+	<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">	
 	$(document).ready(function() {
 		$(".loginbutton").click(function() {
-			document.location.href="<?php URL_ROOT ?>?CONNECT=true";
+			document.location.href="<?php echo(URL_ROOT.$C_default_rep); ?>/client.php?CONNECT=true";
 		});
 		$("#IDENTIFIER").click(function() {
-			document.location.href="<?php URL_ROOT ?>?CONNECT=true";
+			document.location.href="<?php echo(URL_ROOT.$C_default_rep); ?>/client.php?CONNECT=true";
 		});
 		$("#ACCES").click(function() {
-			document.location.href="client.php";
+			document.location.href="<?php echo(URL_ROOT.$C_default_rep); ?>/client.php";
 		});
 		$(".archivesVideoBox").mouseover(function() {
 			//$(this).animate({'backgroundColor'});
@@ -89,6 +91,8 @@
 		}).slideshow();		
 		
 		$(".slidetabs").data("slideshow").play();
+
+		$(".scrollable").scrollable();
 	});
 
 
@@ -113,22 +117,26 @@
     <div class="container">
       <img src="images/ENMI_2010_logo.gif" class="logo">
 	  <ul class="menu"> 
-	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?CONNECT=true" class="menuLink">
+	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT.$C_default_rep); ?>/client.php?CONNECT=true" class="menuLink">
 	  	<?php print $translate->_("S&apos;identifier"); ?></a></li>
 	  <li class="menuUnderline"><a href="about.php" class="menuLink">
 	  	<?php print $translate->_("A propos"); ?></a></li>
 	  <li ><a href="mailto:contact@iri.centrepompidou.fr" class="menuLink" >
 	  	<?php print $translate->_("Contact"); ?></a></li>
 	  </ul>
+	  <ul class="menu"> 
+		  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>archives.php" class="menuLink">
+		  	<?php print $translate->_("Archives"); ?></a></li>
+	  </ul>
 	  
 	  <ul class="menu lang" > 
-	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
+	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>index.php?lang=ja_JP" class="menuLink" >
 	       <img src='images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
 	        <?php print $translate->_("Japonais"); ?></a></li>
-	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=fr" class="menuLink">
+	  <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>index.php?lang=fr" class="menuLink">
 	       <img src='images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
 	       <?php print $translate->_("Français"); ?></a></li>
-	  <li ><a href="<?php URL_ROOT ?>?lang=en" class="menuLink">
+	  <li ><a href="<?php echo(URL_ROOT); ?>index.php?lang=en" class="menuLink">
 	       <img src='images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
 	       <?php print $translate->_("Anglais"); ?></a></li>
 	  </ul>
@@ -177,14 +185,14 @@
 				</p>
 				</div>
 				<!-- fourth slide -->
-				<div class="slides" style="background-image:url('<?php echo($C_REP); ?>/images/slide4.jpg');">
+				<div class="slides" style="background-image:url('<?php echo("$C_default_rep/$config[slide_background]"); ?>');">
 				<p class="slideTitle" ><?php print $translate->_("4. TitreSlide"); ?></p>
 				<br/><br/><br/>
 				<p style="width:400px;padding-right:400px;" class="slideText">
-				<?php print $translate->_("$C_abstract"); ?>
+				<?php print($translate->_($config['abstract'])); ?>
 				 </p>
 
-				 <a class="button_b" href="client.php"><span> <?php print $translate->_("4. Button"); ?></span> </a>
+				 <a class="button_b" href="<?php echo(URL_ROOT.$C_default_rep); ?>/client.php"><span> <?php print $translate->_("4. Button"); ?></span> </a>
 				 
 				</div>
 			</div>
@@ -207,43 +215,24 @@
 	  <!-- --> 
 	  <div class="archivesBox">
 	  <div class="archivesBoxHeader"></div>
-		<div class="archivesBoxContainer">
-			<!-- -->
-			<h3 class="archivesTitle"><?php print $translate->_("Archive Title :"); ?></h3>
-			<!-- -->
-			<div id="AVB3" class="archivesVideoBox">
-				<a href="rsln/polemicaltimeline.php">
-					<img src="images/tail_clay.jpg" width="270" height="150"/>
-				</a>
-				<div class="AVBtitle">Clay Shirky le net, le surplus cognitif</div>
-				<div class="AVBtext">
-					par <a href="http://www.rslnmag.fr/" target="_blank">RSLN</a> à Microsoft France
-					<br/>le lundi 31 janvier 2011·| 08:30 - 10:30
-				</div>
-			</div>
+
+		<div class="archivesBoxContainer scrollable">
 			<!-- -->
-			<div id="AVB2" class="archivesVideoBox">
-				<a href="rsln-opendata/polemicaltimeline.php">
-					<img src="images/tail_opendata.jpg" width="270" height="150"/>
-				</a>
-				<div class="AVBtitle">OPENDATA</div>
-				<div class="AVBtext">
-					par <a href="http://www.rslnmag.fr/" target="_blank">RSLN</a> à Microsoft France
-					<br/>le jeudi 17 mars 2011 | 14:30 - 17:15
-				</div>
-			</div>
-			<!-- -->
-			<div id="AVB4" class="archivesVideoBox">
-				<a href="rsln-mercedes-bunz/polemicaltimeline.php">
-					<img src="images/tail_mercedes_bunz.jpg" width="270" height="150"/>
-				</a>
-				<div class="AVBtitle">Mercedes Bunz</div>
-				<div class="AVBtext">
-					par <a href="http://www.rslnmag.fr/" target="_blank">RSLN</a> à Microsoft France
-					<br/>le jeudi 7 avril 2011 | 19:30 - 21:00
+			<div class="archivesTitleActionsContainer">
+				<div class="archivesTitleContainer"><h3 class="archivesTitle"><?php print $translate->_("Archive Title :"); ?></h3></div>
+				<div class="archivesActionsContainer" id="actions">
+		   			<a class="prev browse left disabled"></a>
+		   			<a class="next browse right"></a>
 				</div>
 			</div>
 			
+			<!-- -->
+			<div class="items">
+			    <?php
+			    $arch_list = array_reverse($archives_list);
+			   	display_archives_list($arch_list, "archive_box_3 item", URL_ROOT, dirname(__FILE__)."/");
+			    ?>
+		    </div>
 		</div>
 		<div class="archivesBoxClear"></div>
 		<div class="archivesBoxFooter"></div>