3 require_once('include/socgraph.php');
5 function allfriends_content(&$a) {
9 notice( t('Permission denied.') . EOL);
14 $cid = intval($a->argv[1]);
19 $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
24 $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
25 '$name' => htmlentities($c[0]['name']),
26 '$photo' => $c[0]['photo'],
27 'url' => z_root() . '/contacts/' . $cid
30 if(! x($a->page,'aside'))
31 $a->page['aside'] = '';
32 $a->page['aside'] .= $vcard_widget;
38 $r = all_friends(local_user(),$cid);
41 $o .= t('No friends to display.');
51 'itemurl' => $rr['url'],
52 'name' => htmlentities($rr['name']),
53 'thumb' => $rr['photo'],
54 'img_hover' => htmlentities($rr['name']),
61 $tpl = get_markup_template('viewcontact_template.tpl');
63 $o .= replace_macros($tpl,array(
64 '$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])),
65 '$contacts' => $entries,
68 // $o .= paginate($a);