<?php

$config = array("rep" => basename(__DIR__));

include_once '../common.php';

/**
 * Do we already have a valid Access Token or need to go get one?
 */

if (!isset($_SESSION['SOCIAL_ACCESS_TOKEN']) ) {
	
	$_SESSION['TWITTER_REDIRECT_URL'] = URL_ROOT . basename(__DIR__) . '/' . basename(__FILE__);
	// Permanent redirection
	header("HTTP/1.1 301 Moved Permanently");
	header("Location: client.php?CONNECT=true&rep=".basename(__DIR__));
	exit();
	
}

include 'favuser.php';

?>
<!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 Ne m'oublie pas : 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"/>
    <link rel="stylesheet" href="style.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">
	var favUser='<?php
            if (isset($_GET['favuser'])) {
                echo $_GET['favuser'];
            } else {
                echo $favuser;
            }
            ?>';
    </script>
    
    <script type="text/javascript" src="script.js"></script>
    
    <style type="text/css">
        #standalone-tweetviz {
            border: 1px solid #cccccc; margin: 20px;
            width: 492px; height: 590px;
        }
    </style>
    
  </head>
  <body>

    	<div id="standalone-tweetviz">
    		<ul id="tweetlist"></ul>
    		<div id="timeline"></div>
    		<div id="scrollcont">
    			<div id="scrollin"></div>
    		</div>
    	</div>
  	</body>
</html>