Exemplo n.º 1
0
			 <td style="width: 100%">
				<table style="width: 100%">
					<tr><td style="padding: 4px; border-bottom: 0px solid lightgrey" colspan="4">
							<h2><fb:name uid="<?php 
echo $user;
?>
" useyou="false"/></h2>
						 </td>
					</tr>
					<tr><td style="vertical-align: top; padding: 3px; background-color: #DDDDDD" colspan="4">
							<h4>Things you are willing to share with friends:</h4>
						 </td>
					</tr>
<?php 
// iterate through shared items
$shared_items = get_shared_items($user);
foreach ($shared_items as $item) {
    $item_id = $item['item_id'];
    $what = $item['what'];
    $description = $item['description'];
    $value = $item['value'];
    if ($item['available']) {
        $available = "Available";
    } else {
        $available = "Unavailable";
    }
    ?>
					<tr><td colspan="9"><hr size="1" noborder/></td></tr>
					<tr valign="top">
						<td style="width: 20%"><?php 
    echo $what;
Exemplo n.º 2
0
function render_menu($select, $user, $friends)
{
    global $canvas_url;
    $menu = array("index" => "My Friends' Shared Things", "my_listings" => "My Shared Things", "invite" => "Invite", "about" => "About");
    // get shared items for this user
    $shared_items = get_shared_items($user);
    // add number items shared and emphasis to menu
    $menu["index"] .= ' (' . get_num_shared_items($friends, $user) . ')';
    $menu["my_listings"] .= ' (' . count($shared_items) . ')';
    $menu[$select] = "<b>" . $menu[$select] . "</b>";
    return '<fb:dashboard>' . '<fb:action href="' . $canvas_url . '/index.php">' . $menu["index"] . '</fb:action>' . '<fb:action href="' . $canvas_url . '/my_listings.php">' . $menu["my_listings"] . '</fb:action>' . '<fb:action href="' . $canvas_url . '/invite.php">' . $menu["invite"] . '</fb:action>' . '<fb:action href="http://www.facebook.com/apps/application.php?id=2395910624">' . $menu["about"] . '</fb:action>' . '</fb:dashboard>';
}
Exemplo n.º 3
0
$appUsers = $fb->api_client->friends_getAppUsers();
?>

<div style="background-color: white; padding: 0 40px 0 10px">
	<h1 style="margin-bottom: 5px"><a href="invite.php">Invite your friends</a> to share their things</h1>
	This page is for sharing things with your friends, but only <?php 
echo count($appUsers);
?>
 of your friends have installed the "Share Things" 
	app. Go to the <a href="invite.php">invite page</a> to invite your friends to share things.
</div>

<?php 
// iterate through each friend of users's
foreach ($friends as $friend) {
    $shared_items = get_shared_items($friend, $user);
    if (count($shared_items) > 0) {
        ?>
		<div style="background-color: white; border: 1px solid black; margin: 10px">
			<table style="width: 100%">
				<tr>
					<td style="vertical-align: top; width: 0%" rowspan="5">
						<fb:profile-pic uid="<?php 
        echo $friend;
        ?>
" linked="yes" />
					</td>
					<td style="width: 100%">
						<table style="width: 100%">
							<tr>
								<td style="padding: 4px; border-bottom: 0px solid lightgrey" colspan="4">