web/cineconf/widget.php
author Raphael Velt <raph.velt@gmail.com>
Mon, 23 Sep 2013 12:23:31 +0200
changeset 948 c670e8888357
parent 944 56ab9478ee64
child 950 8320167038ca
permissions -rw-r--r--
Title fix
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
944
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     1
<?php
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     2
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     3
$config = array("rep" => basename(__DIR__));
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     4
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     5
include_once '../common.php';
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     6
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     7
/**
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     8
 * Do we already have a valid Access Token or need to go get one?
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
     9
 */
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    10
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    11
if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) ) {
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    12
	
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    13
	$_SESSION['TWITTER_REDIRECT_URL'] = URL_ROOT . basename(__DIR__) . '/' . basename(__FILE__);
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    14
	// Permanent redirection
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    15
	header("HTTP/1.1 301 Moved Permanently");
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    16
	header("Location: client.php?CONNECT=true&rep=".basename(__DIR__));
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    17
	exit();
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    18
	
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    19
}
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    20
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    21
?>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    22
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    23
   "http://www.w3.org/TR/html4/strict.dtd">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    24
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    25
<html lang="fr">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    26
  <head>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    27
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
948
c670e8888357 Title fix
Raphael Velt <raph.velt@gmail.com>
parents: 944
diff changeset
    28
    <title>Avant-Première Ne m'oublie pas : Tweet Wall</title>
944
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    29
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    30
    
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    31
    <!-- CSS -->
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    32
    <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>" type="text/css" media="screen, projection"/>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    33
    <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection"/>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    34
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    35
    <!-- JAVASCRIPT -->
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    36
    <script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    37
    <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    38
    <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    39
    <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    40
    <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    41
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    42
    <script type="text/javascript">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    43
	var favUser='<?php
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    44
            if (isset($_GET['favuser'])) {
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    45
                echo $_GET['favuser'];
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    46
            } else {
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    47
                echo 'AVPKaspar';
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    48
            }
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    49
            ?>';
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    50
    </script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    51
    
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    52
    <script type="text/javascript" src="script.js"></script>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    53
    
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    54
    <style type="text/css">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    55
        #standalone-tweetviz {
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    56
            border: 1px solid #cccccc; margin: 20px;
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    57
            width: 492px; height: 590px;
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    58
        }
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    59
    </style>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    60
    
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    61
  </head>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    62
  <body>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    63
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    64
    	<div id="standalone-tweetviz">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    65
    		<ul id="tweetlist"></ul>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    66
    		<div id="timeline"></div>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    67
    		<div id="scrollcont">
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    68
    			<div id="scrollin"></div>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    69
    		</div>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    70
    	</div>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    71
  	</body>
56ab9478ee64 Standalone widget for Cineconf
Raphael Velt <raph.velt@gmail.com>
parents:
diff changeset
    72
</html>