예제 #1
0
 $include_censored = @(int) $query_string['include_censored'];
 $live_dangerously = @$query_string['live_dangerously'] === "1";
 $experiment_list = @$query_string['experiment_list'];
 $clear_region = @$_POST["clear_region"];
 $delete_sample_images = @$_POST["delete_sample_images"];
 $job_specified = false;
 if ($job_id != 0) {
     $job_specified = true;
     $specified_job = new ns_processing_job();
     $query = $specified_job->provide_query_stub();
     $query .= " FROM processing_jobs WHERE processing_jobs.id = " . $job_id;
     $sql->get_row($query, $result);
     if (sizeof($result) == 0) {
         throw new ns_exception("Could not load job id " . $job_id . " from database");
     }
     $specified_job->load_from_result($result[0]);
     $experiment_id = (int) $specified_job->experiment_id;
     $sample_id = $specified_job->sample_id;
     $region_id = $specified_job->region_id;
     $image_id = $specified_job->image_id;
     $all_samples = FALSE;
     $all_regions = FALSE;
 } else {
     $experiment_id = $specified_experiment_id;
     $sample_id = $specified_sample_id;
     $region_id = $specified_region_id;
     $image_id = $specified_image_id;
 }
 $IS_EXPERIMENT = 0;
 $IS_SAMPLE = 1;
 $IS_REGION = 2;
</form>
</td></tr><?php 
if (sizeof($jobs) == 0) {
    echo "<tr><td  bgcolor=\"{$table_colors[0][0]}\">No Deletion Jobs are Ready for Processing.</td></tr>\n";
} else {
    for ($i = 0; $i < sizeof($jobs); $i++) {
        echo "<tr ><td bgcolor=\"{$table_colors[($i + 1) % 2][1]}\">\n";
        $job_id = $jobs[$i][0];
        echo "<a name=\"id" . $job_id . "\">";
        if ($i == 0) {
            try {
                $job = new ns_processing_job();
                $query = $job->provide_query_stub();
                $query .= " FROM processing_jobs WHERE id = " . $jobs[$i][2];
                $sql->get_row($query, $res);
                $job->load_from_result($res[0]);
                $job->get_names($sql);
                echo $job->get_job_description($sql, TRUE);
            } catch (ns_exception $e) {
                echo $e->text . "<BR>";
            }
        }
        $s = sizeof($job_specifications[$i]);
        $max = $s;
        if ($job_id != $show_details_id && $s > 10) {
            $max = 10;
        }
        for ($j = 0; $j < $max; $j++) {
            echo $job_specifications[$i][$j][0] . "\\" . $job_specifications[$i][$j][1] . "<BR>\n";
        }
        if ($s != $max) {