Beispiel #1
0
$id = $session->userid;
$is_owner = true;
$errors = array();
if (isset($_GET['id'])) {
    if ($_GET['id'] != $id) {
        $id = (int) safeString($_GET['id']);
        $is_owner = false;
    }
}
$userdata = getUserDetails($id);
$data = array();
$output = array();
// Grab the users meta data
$data['vis'] = getVisByUser($id);
$data['session'] = browseMySessions($id);
$data['experiment'] = browseExperimentsByUser($id);
$data['image'] = getImagesByUser($id);
$data['video'] = getVideosByUser($id);
/*
$data['activity_responses'] = array();
if($is_owner) {
    $data['activity_responses'] = getFeedFromFollowers($id, -1);
}
else {
    
}
*/
$data['activity_responses'] = getResponsesFromUser($id);
// Compile the user's media
foreach ($data as $key => $value) {
    if (is_array($value)) {
Beispiel #2
0
             $dataset['sessions'] = $ses;
         }
         if (is_array($img)) {
             $dataset['images'] = $img;
         }
         if (is_array($vid)) {
             $dataset['video'] = $vid;
         }
         $data = $dataset;
         $status = 200;
     }
     break;
 case "getExperimentByUser":
     if (isset($_REQUEST['user'])) {
         $id = safeString($_REQUEST['user']);
         $dataset = browseExperimentsByUser($id);
         if ($dataset) {
             $data = $dataset;
             $status = 200;
         }
     }
     break;
 case "getVisByUser":
     if (isset($_REQUEST['user'])) {
         $id = safeString($_REQUEST['user']);
         $dataset = getVisByUser($id);
         if ($dataset) {
             $data = $dataset;
             $status = 200;
         }
     }