Ejemplo n.º 1
0
    ?>
<html>
	<head>
		<title>Draugiem API test</title>
<?php 
    echo $draugiem->getJavascript('body', 'http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . '/callback.html');
    //Set up JS API + iframe Resize
    ?>
	</head>
	<body>
		<div id="body">
<?php 
    //Print greeting for user
    echo '<h2>Hello, ' . $user['name'] . ' ' . $user['surname'] . '</h2>';
    if ($user['img']) {
        echo '<img src="' . $draugiem->imageForSize($user['img'], 'medium') . '" alt="" />';
    }
    echo '<hr />';
    //Show 10 users of this app with small image
    if ($users = $draugiem->getAppUsers(1, 10)) {
        echo '<h3>Some users of this application</h3>';
        foreach ($users as $friend) {
            if ($friend['img']) {
                echo '<img src="' . $draugiem->imageForSize($friend['img'], 'icon') . '" alt="" align="left"  />';
            }
            echo '<a target="_top" href="http://' . $draugiem->getSessionDomain() . '/friend/?' . $friend['uid'] . '">';
            echo $friend['name'] . ' ' . $friend['surname'] . '</a><br />';
            if ($friend['nick']) {
                echo '(' . $friend['nick'] . ') ';
            }
            echo $friend['place'] . '<br style="clear:both" />';