Beispiel #1
0
	name="view" value="search" /> <input type="search" id="query"
	name="query" value="" /></form>
</div>
<BR>
<BR>
<div><fb:tabs>
	<fb:tab-item href='friends.php' title='Everyone' selected='true' />
	<fb:tab-item href='friends.php?view=add_friend' title='Add Friend' />
	<fb:tab-item href='friends.php?view=view_invites' title='View Invites' />
</fb:tabs></div>
<?php 
require_once 'ringside/api/clients/RingsideApiClients.php';
$client = new RingsideApiClients(RingsideSocialConfig::$apiKey, RingsideSocialConfig::$secretKey);
$uid = $client->require_login();
//$user_name = $client->api_client->users_getInfo($uid, "first_name");
$url = $client->get_openfb_url();
$view = null;
isset($_REQUEST['view']) ? $view = $_REQUEST['view'] : ($view = null);
if ($view == null || $view == 'everyone') {
    // If it's not a view, check the action
    if (isset($_REQUEST['action'])) {
        $error = '';
        $message = '';
        $action = $_REQUEST['action'];
        if ($action == 'add_friend') {
            if (isset($_REQUEST['email']) && !empty($_REQUEST['email'])) {
                $next = isset($_REQUEST['next']) ? $_REQUEST['next'] : '/friends.php?view=view_invites';
                $domain_info = $client->api_client->admin_getDomainProperties(array('url'), null, $_REQUEST['fb_sig_nid']);
                $domain_url = $domain_info['url'];
                if (strpos($next, $domain_url) !== false) {
                    $rsvp_url = $next;