intcast($_SESSION['uid']);
} else {
header("Location: ../");
exit;
}
if(!isset($_SESSION['token']) || empty($_SESSION['token']) ) {
$csrf = $db->getToken();
$_SESSION['token'] = $csrf;
} else {
$csrf = $db->clean($_SESSION['token'],'encode');
}
?>
Friends
query("SELECT * FROM friends WHERE uid = '".$db->intcast($uid)."' ORDER BY RAND() LIMIT 10");
$countfriends = count($selectfriends);
if($countfriends >=1) {
for($j=0; $j<$countfriends; $j++) {
$userprofiles = $db->query("SELECT id,username,photo FROM profile WHERE active = '1' AND id = '".$db->intcast($selectfriends[$j]['fid'])."' ORDER BY RAND() LIMIT 10");
$count = count($userprofiles);
if($count >=1) {
for($i=0;$i<$count;$i++) {
echo "
";
echo "
".ucfirst($db->clean($userprofiles[$i]['username'],'encode'))."";
echo "
";
echo "
";
}
}
}
} else {
echo "
No friends yet, start making new friends.
";
}
?>