Beispiel #1
0
     }
     break;
 case "getExperimentTags":
     if (isset($_REQUEST['experiment'])) {
         $id = safeString($_REQUEST['experiment']);
         $dataset = getTagsForExperiment($id);
         if ($dataset) {
             $data = $dataset;
             $status = 200;
         }
     }
     break;
 case "getExperimentVideos":
     if (isset($_REQUEST['experiment'])) {
         $id = safeString($_REQUEST['experiment']);
         $dataset = getVideosForExperiment($id);
         if ($dataset) {
             $data = $dataset;
             $status = 200;
         }
     }
     break;
 case "getExperimentImages":
     if (isset($_REQUEST['experiment'])) {
         $id = safeString($_REQUEST['experiment']);
         $dataset = getImagesForExperiment($id);
         if ($dataset) {
             $data = $dataset;
             $status = 200;
         }
     }
Beispiel #2
0
 $vises = array();
 $tags = array();
 $videos = array();
 $images = array();
 $sessions = array();
 $collabs = array();
 if ($is_activity) {
     $fields = getFields($meta['activity_for']);
     $tags = getTagsForExperiment($meta['activity_for']);
     $sessions = getSessionsForExperiment($id);
     $vises = getResponsesForActivity($id);
 } else {
     $fields = getFields($id);
     $vises = getVisByExperiment($id);
     $tags = getTagsForExperiment($id);
     $videos = getVideosForExperiment($id);
     $images = getImagesForExperiment($id);
     $collabs = getExperimentCollaborators($ownerid, $id);
     $sessions = getSessionsForExperiment($id);
 }
 // Process the images for display
 $image_urls = array();
 if ($images) {
     foreach ($images as $img) {
         array_push($image_urls, array('source' => $img['provider_url'], 'set_url' => $img['provider_url']));
     }
 }
 // Push data to smarty template
 $smarty->assign('meta', $meta);
 $smarty->assign('tags', $tags);
 $smarty->assign('vises', $vises);