$submit = false; } */ $list = $_GET['list']; if ($list == 'afi') { $list = 'afi'; $tabvalue = 8; $total = '100'; $list_movies = $ad->getAFIMovies(); } else { $list = 'imdb'; $total = '250'; $tabvalue = 9; $list_movies = $ad->getIMDBMovies(); } $user_info = $ad->getUser($user); $user_movies = $ad->getUserMovies($user); $user_count = $user_info['count']; $total_count = 274; $percent = $user_info['percent']; //Determine what message to show //Create the pageData object $pageData = (object) array(); // Save Information $pageData->css = $cssurl; $pageData->tabs = $tabvalue; $pageData->appurl = $appurl; $pageData->msg = $msg; $pageData->userid = (int) $user; $pageData->percent = $percent; $pageData->movielist = $list;
$user = $facebook->require_login(); // Retrieve array of friends who've already added the app. $fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=' . $user . ') AND is_app_user = 1'; $_friends = $facebook->api_client->fql_query($fql); // Extract the user ID's returned in the FQL request into a new array. $friends = array(); if (is_array($_friends) && count($_friends)) { foreach ($_friends as $friend) { $friends[] = $friend['uid']; } } unset($_friends); $ad = new AddictDatabase(); $filmfriends = array(); foreach ($friends as $friend) { $user = $ad->getUser($friend); if ($user) { $filmfriends[] = $user; } } unset($friends); //Create the pageData object $pageData = (object) array(); // Save Information $pageData->css = $cssurl; $pageData->appurl = $appurl; $pageData->tabs = 2; $pageData->userid = $user; $pageData->friends = $filmfriends; // Display the Page ob_start();