<?php require 'include/init.php'; if (!global_check_login()) { global_redirect('index.php'); } $topics = array("contacts_photos" => "Contacts' Photos", "contacts_faves" => "Contacts' Faves", "photos_of_contacts" => "Photos of my Contacts", "photos_of_me" => "Photos of Me", "my_photos" => "My Photos", "my_faves" => "My Faves", "geo" => "Geo", "commons" => "Commons", "tags" => "Tags"); $user_nsid = $cfg['account']['auth']['user']['nsid']; $token = $cfg['account']['auth']['token']['_content']; $flickr = new Flickr($cfg['flickr_key'], $cfg['flickr_secret']); // What does Flickr say we are subscribed to? $subscriptions = $flickr->call_method('flickr.push.getSubscriptions', array('auth_token' => $token), 1); $live_subscriptions = array(); $active_subscriptions = array(); // Figure out what we are currently subscribed to so we'll know what we need to add from the passed-in form data if (isset($subscriptions['subscriptions']['subscription'])) { foreach ($subscriptions['subscriptions']['subscription'] as $sub) { if (strpos($sub['callback'], $cfg['base_push_url']) === 0) { $pieces = explode('&', parse_url($sub['callback'], PHP_URL_QUERY)); foreach ($pieces as $piece) { list($k, $v) = explode('=', $piece, 2); if ($k == 'sub') { $live_subscriptions[$v] = 1; } } } } } $titles = array(); foreach ($_POST['streams'] as $topic) { switch ($topic) {
<?php require 'include/init.php'; $_SESSION = array(); ini_set('display_errors', true); error_reporting(E_ALL); # We don't know who they are. Make them log back in! $flickr = new Flickr($GLOBALS['cfg']['flickr_key'], $GLOBALS['cfg']['flickr_secret']); $args = array('api_key' => $GLOBALS['cfg']['flickr_key'], 'perms' => 'write'); $request_url = $flickr->_request_url('http://www.flickr.com/services/auth/?', $args, true); global_redirect($request_url);
<?php require 'include/init.php'; $_SESSION = array(); global_redirect($GLOBALS['cfg']['base_url']);