web/common.php
author Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Mon, 20 Jun 2011 17:24:46 +0200
changeset 190 213ef4b97855
parent 188 3be9e0538438
child 193 a7a4a01a6c7d
permissions -rwxr-xr-x
add iri to hashtags

<?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';


/**
 * 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	= "#fens #iri";
$C_link 	= "http://www.iri.centrepompidou.fr/futur-en-seine-2011/espace-piazza/";
$C_title 	= "Futur en Seine : Conférences FabLab & Design Metadatas";
$C_abstract = "Futur en Seine : Conférences FabLab & Design Metadatas
Lundi 20 et Mardi 21  Juin de 17h à 20h à la Salle Piazza 
au Centre Pompidou
Metro Rambuteau";
$C_REP   = "fens_FabLab_Design_Metadata/";
$C_description  = "
	- <a href='http://www.iri.centrepompidou.fr/futur-en-seine-2011/conference-fablab/' target='_blank'>
	CONFERENCE FABLAB : Lundi 20 juin :: 17h-20h</a>
	Quels instruments pour les amateurs dans le contexte des fablabs ?
	- <a href='http://www.iri.centrepompidou.fr/futur-en-seine-2011/design-metadata-2/' target='_blank'>
	DESIGN METADATA  2 : Mardi 21 juin :: 17h-20h</a>
	Présentation des prototypes par les concepteurs aux professionnels et amateurs";

$C_partenaires  = "
		 <a href='http://www.iri.centrepompidou.fr/' class='footerLink' target='_blank'> IRI </a>
		 |  <a href='http://www.ensci.com/' class='footerLink' target='_blank' > ENSCI  </a>
		 |  <a href='http://www.esilv.fr/' class='footerLink' target='_blank' > ESILV </a>
		 |  <a href='http://www.stratecollege.fr/' class='footerLink' target='_blank' > Strate Collège Designer </a>
		 |  <a href='http://www.capdigital.com/' class='footerLink' target='_blank'> Cap Digital </a>";