<?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']) ) {
	$_SESSION['TWITTER_REDIRECT_URL'] = URL_ROOT . basename(__DIR__) . '/' . basename(__FILE__);
    /**
     * 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();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="fr">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Avant-Première Hanna Arendt : Tweet Wall</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    
    <!-- CSS -->
    <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>" type="text/css" media="screen, projection"/>

    <!-- JAVASCRIPT -->
    <script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
    <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script>
    <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script>
    <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script>
    <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script>

    <script type="text/javascript">
	<?php if (isset($_GET['favuser'])) {
			echo 'var favUser="'.$_GET['favuser'].'";';
		}
	?>
    </script>
    
    <script type="text/javascript" src="script.js"></script>
	<style type="text/css">
		#visionplayer_1101 {
			float: left; margin: 5px;
		}
		#container {
			float: left; width: 452px; margin: 5px 0; overflow: hidden;
		}
    </style>
    
  </head>
  <body>
	  	<div id="visionplayer_1101"></div>

	  	<script type="text/javascript" src="http://embeddedplayer.visionip.tv/embed/1101?w=836&h=440" ></script>
	  	
        <div id="container">

                    <div class="barre">
                        <form id="recherche">
                            <input autocomplete="off" class="greyed" id="inp_q" value="Rechercher" />
                            <input id="inp_submit" type="submit" />
                            <input id="inp_reset" type="reset" />
                            <div id="time_controls">
                                <div id="time_legende"></div>
                                <div id="time_scale"></div>
                                <a href="#" id="time_zoomout"></a>
                                <a href="#" id="time_zoomin"></a>
                            </div>
                            <div id="recherche_annot">
                                Rechercher par polémique : <span id="rech_list_annot"></span><br />
                            </div>
                        </form>
                    </div>
            
                <div id="tweetviz">
                    <ul id="tweetlist"></ul>
                    <div id="timeline"></div>
                    <div id="scrollcont">
                        <div id="scrollin"></div>
                    </div>
                </div>
            </div>
            
		</div>
  </body>
</html>