| author | Samuel Huron <samuel.huron@centrepompidou.fr> |
| Tue, 20 Dec 2011 01:04:43 +0100 | |
| changeset 456 | 53572585324d |
| parent 420 | eb7c2cff1816 |
| child 458 | a12229c45a6f |
| permissions | -rwxr-xr-x |
|
133
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
1 |
<?php |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
2 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
3 |
if(!isset($_REQUEST['rep'])) { |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
276
diff
changeset
|
4 |
include_once dirname(__FILE__).'/common.php'; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
276
diff
changeset
|
5 |
header('Location: ' . URL_ROOT . "$C_default_rep/client.php" ); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
276
diff
changeset
|
6 |
exit(); |
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
7 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
8 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
9 |
$rep = $_REQUEST['rep']; |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
10 |
include_once dirname(__FILE__).'/'.$rep.'/config.php'; |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
11 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
12 |
include_once 'common.php'; |
|
133
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
13 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
14 |
/** |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
15 |
* Do we already have a valid Access Token or need to go get one? |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
16 |
*/ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
17 |
if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_GET['CONNECT']) ) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
18 |
/** |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
19 |
* Guess we need to go get one! |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
20 |
*/ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
21 |
$token = $consumer->getRequestToken(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
22 |
$_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
23 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
24 |
/** |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
25 |
* Now redirect user to Twitter site so they can log in and |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
26 |
* approve our access |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
27 |
*/ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
28 |
$consumer->redirect(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
29 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
30 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
122
diff
changeset
|
31 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
32 |
$big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg"; |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
276
diff
changeset
|
33 |
if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) { |
|
406
86b62b98fea7
Polemic Tweet client now uses rv's live system
Raphael Velt <raph.velt@gmail.com>
parents:
357
diff
changeset
|
34 |
$big_visual_url = URL_ROOT."$rep/".$translate->_('config__client_visual'); |
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
35 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
36 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
37 |
$head_logo = URL_ROOT."$rep/images/head_logo.gif"; |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
276
diff
changeset
|
38 |
if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) { |
|
406
86b62b98fea7
Polemic Tweet client now uses rv's live system
Raphael Velt <raph.velt@gmail.com>
parents:
357
diff
changeset
|
39 |
$head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo'); |
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
200
diff
changeset
|
40 |
} |
|
456
53572585324d
ENMI correction partenaires
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
420
diff
changeset
|
41 |
if(!isset($_REQUEST["embed"])){ |
|
53572585324d
ENMI correction partenaires
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
420
diff
changeset
|
42 |
include dirname(__FILE__). ( ( isset($config['use_tweetcast']) && $config['use_tweetcast'] ) ? '/client_new.php' : '/client_old.php' ) |
|
53572585324d
ENMI correction partenaires
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
420
diff
changeset
|
43 |
}else{ |
|
53572585324d
ENMI correction partenaires
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
420
diff
changeset
|
44 |
include dirname(__FILE__). ('/client_new_embed.php') |
|
53572585324d
ENMI correction partenaires
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
420
diff
changeset
|
45 |
} |
| 420 | 46 |
?> |