Line | |
---|
1 | <?php
|
---|
2 | define('DOING_AJAX',true);
|
---|
3 |
|
---|
4 | require('../../../wp-load.php');
|
---|
5 |
|
---|
6 | header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
---|
7 | header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
---|
8 |
|
---|
9 | $awesmapikey = get_option('sociable_awesmapikey');
|
---|
10 | if (!empty($awesmapikey)) {
|
---|
11 | $key = '&api_key=' . $awesmapikey;
|
---|
12 | } else {
|
---|
13 | $key = '';
|
---|
14 | }
|
---|
15 | $destination = str_replace('TARGET', 'AWESM_TARGET', urldecode( $_GET['d'] ) );
|
---|
16 | $channel = urldecode( $_GET['c'] );
|
---|
17 | $permalink = urldecode( $_GET['t'] );
|
---|
18 |
|
---|
19 | if ($_GET['dir']) {
|
---|
20 | $direct = '&direct=true';
|
---|
21 | } else {
|
---|
22 | $direct = '';
|
---|
23 | }
|
---|
24 |
|
---|
25 | if ($_GET['p']) {
|
---|
26 | // if the page was arrived at through an awe.sm URL, make that the parent
|
---|
27 | $parent = $_GET['p'];
|
---|
28 | $parentargument = '&parent_awesm=' . $parent;
|
---|
29 | } else {
|
---|
30 | // otherwise, there is no parent
|
---|
31 | $parentargument = '';
|
---|
32 | }
|
---|
33 |
|
---|
34 | $url = 'http://create.awe.sm/url/share?&version=1'.$key.'&share_type='.urlencode($channel).'&create_type=sociable-wordpress&target='.urlencode($permalink).'&destination='.urlencode($destination).$direct.$parentargument;
|
---|
35 |
|
---|
36 | $url = str_replace("+","%20",$url);
|
---|
37 | header("Location: ".$url);
|
---|
38 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.