Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b95bd0a919
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 62 lines (41 sloc) 1.206 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<?php

include("include/init.php");

loadlib("instagram_users");
loadlib("instagram_likes");

login_ensure_loggedin();

$id = get_int32("instagram_id");

if (! $id){
error_404();
}

$instagram_user = instagram_users_get_by_id($id);

if (! $instagram_user){
error_404();
}

$owner = users_get_by_id($instagram_user['user_id']);

# for now...

if ($owner['id'] != $GLOBALS['cfg']['user']['id']){
error_403();
}

$more = array(
'per_page' => 3
);

if ($page = get_int32("page")){
$more['page'] = $page;
}

if ($photo_owner_id = get_int32("photo_owner_id")){

if ($instagram_user = instagram_users_get_by_id($photo_owner_id)){
$more['owner_id'] = $instagram_user['user_id'];

$photo_owner = users_get_by_id($instagram_user['user_id']);
$GLOBALS['smarty']->assign_by_ref("photo_owner", $photo_owner);
}
}

else if ($filter = get_str("filter")){

$more['filter'] = $filter;
$GLOBALS['smarty']->assign("filter", $filter);
}

$rsp = instagram_likes_for_user($owner, $more);

$GLOBALS['smarty']->assign_by_ref("photos", $rsp['rows']);
$GLOBALS['smarty']->assign_by_ref("owner", $owner);

$GLOBALS['smarty']->display("page_instagram_likes_user.txt");
exit();
?>
Something went wrong with that request. Please try again.