<?php

if(!isset($_REQUEST['rep'])) {
    include_once dirname(__FILE__).'/common.php';
    header('Location: ' . URL_ROOT . "$C_default_rep/client.php" );
    exit();
}

$rep = $_REQUEST['rep'];
include_once dirname(__FILE__).'/'.$rep.'/config.php';

include_once 'common.php';

/**
 * Do we already have a valid Access Token or need to go get one?
 */
if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_GET['CONNECT']) ) {
    /**
     * Guess we need to go get one!
     */
    $token = $consumer->getRequestToken();
    $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token);

    /**
     * Now redirect user to Twitter site so they can log in and
     * approve our access
     */
    $consumer->redirect();
}


$big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) {
    $big_visual_url = URL_ROOT."$rep/".$translate->_('config__client_visual');
}

$head_logo = URL_ROOT."$rep/images/head_logo.gif";
if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) {
    $head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo');
}

include dirname(__FILE__). ( ( isset($config['use_tweetcast']) && $config['use_tweetcast'] ) ? '/client_new.php' : '/client_old.php' )

?>