Exemplo n.º 1
0
 function ns_capture_sample(ns_experiment &$experiment, ns_device &$device, $id = -1, &$sql = "")
 {
     $this->experiment_id_p = $experiment->id();
     $this->id_p = $id;
     $this->mask_id = 0;
     $this->device = $device;
     $this->turn_off_lamp_after_capture = FALSE;
     $this->censored = FALSE;
     if ($this->id_p != -1) {
         $this->load($this->id_p, $sql);
     }
 }
Exemplo n.º 2
0
     $sql->get_row($query, $regions);
     for ($i = 0; $i < sizeof($regions); $i++) {
         $query = "DELETE FROM processing_jobs WHERE region_id=" . $regions[$i][0];
         //echo $query . "<BR>";
         $sql->send_query($query);
     }
     header("Location:manage_samples.php?experiment_id={$experiment_id}\n\n");
     die("");
 }
 if ($delete_experiment_jobs) {
     $query = "DELETE FROM processing_jobs WHERE experiment_id = {$experiment_id} AND sample_id=0 AND region_id = 0";
     $sql->send_query($query);
     header("Location: manage_samples.php?experiment_id={$experiment_id}\n\n");
     die("");
 }
 $experiment = new ns_experiment($experiment_id, '', $sql, false);
 #if ($hide_censored)die("HIDE");
 # else die("NO HIDE");
 $experiment->get_sample_information($sql, !$hide_censored);
 /**************************
    Sort Samples, putting censored samples at back of list.
   *************************/
 $uncensored = array();
 $censored = array();
 for ($i = 0; $i < sizeof($experiment->samples); $i++) {
     if ($experiment->samples[$i]->censored) {
         array_push($censored, $experiment->samples[$i]);
     } else {
         array_push($uncensored, $experiment->samples[$i]);
     }
 }
Exemplo n.º 3
0
    $show_images = TRUE;
} else {
    $show_images = FALSE;
}
if ($start_position == '') {
    $start_position = 0;
}
$count = @$query_string['count'];
if ($count == '') {
    $count = 4;
}
try {
    if ($experiment_id == '' || $experiment_id == 0) {
        throw new ns_exception("Please specify an experiment number");
    }
    $experiment = new ns_experiment($experiment_id, '', $sql, false);
    if ($_POST["save"] != '') {
        $sample_data = array();
        $region_data = array();
        foreach ($_POST as $key => $value) {
            $is_sample = $key[0] == 's';
            $is_region = $key[0] == 'r';
            if (!$is_sample && !$is_region) {
                continue;
            }
            $is_description = $key[1] == 'd';
            $is_strain = $key[1] == 's';
            $is_censored = $key[1] == 'c';
            $is_censored_reason = $key[1] == 'r';
            $is_strain_condition_1 = $key[1] == '1';
            $is_strain_condition_2 = $key[1] == '2';