web/CPV/common.php
author Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Fri, 10 Jun 2011 10:12:45 +0200
changeset 171 b103fbabd5dc
parent 150 ffaea21247c4
permissions -rwxr-xr-x
Polemical timeline for CPV

<?php

/**
 * If you haven't edited php.ini to add the Zend Framework and the
 * Zend Framework Incubator to the PHP include_path, then do so here.
 * Don't use mine!
 */
set_include_path(
    'lib'
    . PATH_SEPARATOR . get_include_path()
);


include_once dirname(__FILE__).'/../traduction.php';
include_once dirname(__FILE__).'/traduction.php';


/**
 * Make sure Zend_Oauth's Consumer is loaded
 */
require_once dirname(__FILE__).'/../lib/Zend/Oauth/Consumer.php';

/** Zend_Locale */
require_once dirname(__FILE__).'/../lib/Zend/Locale.php';
 
/** Zend_Translate_Adapter */
require_once dirname(__FILE__).'/../lib/Zend/Translate/Adapter.php';

/**
 * Start up the ol' session engine
 */
session_start();

/**
 * Include the configuration data for our OAuth Client (array $configuration)
 */
include_once dirname(__FILE__).'/config.php';

/**
 * Setup an instance of the Consumer for use
 */
$consumer = new Zend_Oauth_Consumer($configuration);

/**
 * TRADUCTION
**/


Zend_Loader::loadClass('Zend_Translate'); 
Zend_Loader::loadClass('Zend_Http_Cookie'); 


$client = new Zend_Http_Client();
$translate = new Zend_Translate('array', $init, 'fr');

$translate->addTranslation($english, 'en');
$translate->addTranslation($japan, 'ja_JP');
$translate->addTranslation($french, 'fr');

$actual = $translate->getLocale();

//$translate->setLocale("en");
// $acceptCookie = $this->_request->getCookie('acceptCookie',0);

if(isset($_GET['lang'])==false and isset($_SESSION['lang'])==false){
	
	if($actual!='fr' and $actual!='en' and $actual!='ja_JP'){
		$translate->setLocale("fr");
		 $_SESSION['lang']="fr";
	}
	
} else if (isset($_GET['lang'])==true){
	$translate->setLocale($_GET['lang']);
    $_SESSION['lang'] = $_GET['lang'];
    $actual = $_SESSION['lang'];

} else if (isset($_SESSION['lang'])==true){
	$translate->setLocale( $_SESSION['lang']);
    $actual = $_SESSION['lang'];
	
}

/* NEXT CONFERENCE AND CLIENT PAGE INFORMATION
*/
/* CLIENT VAR LIVE */

$C_hashtag = "#SNCP";
$C_link  = "http://www.iri.centrepompidou.fr/evenement/atelier-preparatoire-aux-entretiens-du-nouveau-monde-industriel-technologies-de-la-confiance/";
$C_title = "Les Stratégies Virtuelles des Musées&nbsp;: l'Heure de Vérité";
$C_abstract = "Les Stratégies Virtuelles des Musées&nbsp;: l'Heure de Vérité";
$C_REP   = "CPV/";
$C_description  = "<h3>JEUDI 26 MAI 2011</h3><br />
<h4>DE 10H A 13H<br />
PETITE SALLE, NIVEAU -1</h4><br />
Intervenants&nbsp;:<br />
<b>Carlo d'Asaro Biondo</b>, vice-président de Google<br/>
<b>Franck Riester</b>, député de Seine-et-Marne<br/>
<b>Marc Sands</b>, directeur des publics et de l'information, Tate Gallery, Londres<br/>
<b>Alain Seban</b>, président du Centre Pompidou<br/>
<b>Bernard Stiegler</b>, philosophe et directeur de l'Institut de Recherche et d'Innovation (IRI)<br /><br />
Animée par <b>Brice Couturier</b>, écrivain et producteur à France Culture<br /><br />
La table ronde sera suivie d'un déjeuner-buffet<br /><br /><br />
RSVP: <b>rp@centrepompidou.fr</b> ou <b>01 44 78 15 05</b>";

$C_partenaires = "<a href='http://www.iri.centrepompidou.fr/' class='footerLink' target='_blank'> IRI </a>
		 |  <a href='http://www.centrepompidou.fr/' class='footerLink' target='_blank' > Centre Pompidou  </a>";