} echo "</select>"; } if ($edit || strlen($experiment->samples[$i]->description) > 0) { echo "<br>Description:"; } if ($edit) { echo "<BR>"; } output_editable_field('sample_description', ns_slash($experiment->samples[$i]->description), $edit, 30, TRUE); echo "\n</td><td bgcolor=\"{$clrs['1']}\" valign=\"top\"><font size=\"-1\">"; echo "On device " . $experiment->samples[$i]->device_name(); if ($edit) { echo "<BR>"; } output_editable_field('sample_capture_parameters', ns_slash($experiment->samples[$i]->capture_parameters), $edit, 50, TRUE); echo "\n</font></td><td bgcolor=\"{$clrs['1']}\" valign=\"top\" align=\"right\" nowrap>\n"; echo "<a href=\"manage_samples.php?experiment_id={$experiment_id}&sample_id=" . $experiment->samples[$i]->id() . "&sample_action=clear_problem&{$region_job_query_string}#{$experiment->samples[$i]->id()}\"><font size=\"-1\">[Problem]</font></a>\\"; echo "<a href=\"manage_samples.php?experiment_id={$experiment_id}&sample_id=" . $experiment->samples[$i]->id() . "&sample_action=clear_busy&{$region_job_query_string}#{$experiment->samples[$i]->id()}\"><font size=\"-1\">[Busy]</font></a><br>"; if (!$edit) { //echo "<a href=\"$new_url&sample_id=$cur_id\">[Edit]</a>"; echo "<a href=\"{$new_url}&sample_id={$cur_id}&edit=1&{$region_job_query_string}#{$experiment->samples[$i]->id()}\">[Edit]</a><br>"; if ($show_sample_jobs) { echo "<a href=\"view_processing_job.php?job_id=0&experiment_id={$experiment_id}&all_new=1&sample_id=" . $experiment->samples[$i]->id() . "\"><font size=\"-1\">[Create]</font></a>"; echo "<a href=\"view_processing_job.php?job_id=0&experiment_id={$experiment_id}&sample_id=" . $experiment->samples[$i]->id() . "\"><font size=\"-1\">[Edit]</font></a> <font size=\"-1\">a Sample Job</font></a><br>"; } echo "<a href=\"view_processing_job.php?job_id=0&experiment_id={$experiment_id}&sample_id=" . $experiment->samples[$i]->id() . "®ion_id=all&all_new=1\"><font size=\"-1\">[Create]</font>"; echo "<a href=\"view_processing_job.php?job_id=0&experiment_id={$experiment_id}&sample_id=" . $experiment->samples[$i]->id() . "®ion_id=all\"><font size=\"-1\">[Edit]</font></a><font size=\"-1\"> a Job for all Sample Regions</font><br>"; // echo "<a href=\"view_processing_job.php?job_id=0&experiment_id=$experiment_id&sample_id=".$experiment->samples[$i]->id()."®ion_id=all&all_new=1&include_censored=1\"><font size=\"-1\">[Create]</font></a><font size=\"-1\"> a job for all Sample Regions including censored"; } else { echo "<table width=\"100%\" cellspacing=\"10\" cellpadding=\"0\"><tr><td valign=\"top\">";
echo "</td></tr><tr><td>Experiment T:</td><td>"; output_editable_field('5_' . $column_name . '_' . $row, ns_slash($experiment_temperature_positions[$column_name][$row]), TRUE, 20, FALSE); echo "</td></tr><tr><td>Food Source:</td><td>"; output_editable_field('6_' . $column_name . '_' . $row, ns_slash($food_source_positions[$column_name][$row]), TRUE, 20, FALSE); } if (!$only_strain) { echo "</td></tr><tr><td>Environment:</td><td>"; output_editable_field('7_' . $column_name . '_' . $row, ns_slash($environment_condition_positions[$column_name][$row]), TRUE, 20, FALSE); } if (!$only_strain && !$only_experiment_conditions) { echo "</td></tr><tr><td>Condition 1:</td><td>"; output_editable_field('1_' . $column_name . '_' . $row, ns_slash($strain_condition_1_positions[$column_name][$row]), TRUE, 20, FALSE); echo "</td></tr><tr><td>Condition 2:</td><td>"; output_editable_field('2_' . $column_name . '_' . $row, ns_slash($strain_condition_2_positions[$column_name][$row]), TRUE, 20, FALSE); echo "</td></tr><tr><td>Condition 3:</td><td>"; output_editable_field('3_' . $column_name . '_' . $row, ns_slash($strain_condition_3_positions[$column_name][$row]), TRUE, 20, FALSE); } echo "</td></tr></table>"; echo "</td></tr>"; if ($row_color) { $row_color = 0; } else { $row_color = 1; } } echo "</table></td>"; } ?> </tr> </table>
for ($i = 0; $i < sizeof($sample_ids); $i++) { $query = "SELECT sample_region_image_info.id, sample_region_image_info.name, sample_region_image_info.details, image_mask_regions.id, " . "image_mask_regions.mask_value, image_mask_regions.x_average, image_mask_regions.y_average FROM image_mask_regions, sample_region_image_info " . "WHERE sample_region_image_info.mask_id = {$mask_id} AND sample_region_image_info.sample_id = {$sample_ids[$i][0]} " . "AND image_mask_regions.id = sample_region_image_info.mask_region_id"; $sql->get_row($query, $capture_sample_regions[$sample_ids[$i][0]]); } // var_dump($capture_sample_regions); } //get information about unclaimed masks $query = "SELECT image_masks.id, images.id, images.filename FROM image_masks, images WHERE image_masks.processed = 0 AND image_masks.image_id = images.id"; $sql->get_row($query, $unclaimed_masks); if ($_POST['save'] != '') { foreach ($capture_sample_names as $j => $k) { //echo $j; for ($i = 0; $i < sizeof($capture_sample_regions[$j]); $i++) { $region_id = $capture_sample_regions[$j][$i][0]; $name = ns_slash($_POST["region_{$region_id}_name"]); $details = ns_slash($_POST["region_{$region_id}_details"]); $query = "UPDATE sample_region_image_info SET name='{$name}', details='{$details}' WHERE id={$region_id}"; $sql->send_query($query); } } header("Location: manage_masks.php?mask_id={$mask_id}\n\n"); die(""); } display_worm_page_header("Manage Masks"); } catch (ns_exception $ex) { die("Error: " . $ex->text); } ?> <?php if ($mask_id != 0) {
echo "<input type=\"checkbox\" name=\"rc" . $regs[$j][0] . "\""; if ($regs[$j][3]) { echo " checked"; } echo " value = \"1\">"; echo "\n</td><td bgcolor=\"{$clrs['0']}\" valign=\"top\" width=\"200\"><font size=\"-1\">"; echo "<table border=0 cellpadding = 1 cellspacing = 0><tr><td>"; echo "Strain:</td><td>"; output_editable_field('rs' . $regs[$j][0], ns_slash($regs[$j][5]), TRUE, 20, FALSE); echo "</td></tr><tr><td>Condition 1:</td><td>"; output_editable_field('r1' . $regs[$j][0], ns_slash($regs[$j][9]), TRUE, 20, FALSE); echo "</td></tr><tr><td>Condition 2:</td><td>"; output_editable_field('r2' . $regs[$j][0], ns_slash($regs[$j][10]), TRUE, 20, FALSE); echo "</td></tr></table>"; echo "Details: "; output_editable_field('rd' . $regs[$j][0], ns_slash($regs[$j][2]), TRUE, 30, TRUE, $det_height); // echo $regs[$j][11]; echo "\n</font>"; echo "Reason Censored: "; echo "<select name=\"rr" . $regs[$j][0] . "\" size=1>\n"; echo "<option value = \"none\" " . ($regs[$j][3] == 0 ? 'selected="selected"' : '') . ">None</option>\n"; echo "<option value=\"condensation\" " . ($regs[$j][4] == 'condensation' ? 'selected="selected"' : '') . ">Fogging</option>\n"; echo "<option value= \"contamination\" " . ($regs[$j][4] == 'contamination' ? 'selected="selected"' : '') . ">Contamination</option>\n"; echo "<option value=\"desiccation\" " . ($regs[$j][4] == 'desiccation' ? 'selected=1' : '') . ">Desiccation</option>\n"; echo "<option value=\"starved\" " . ($regs[$j][4] == 'starved' ? 'selected=1' : '') . ">Starved</option>\n"; echo "<option value=\"larvae\" " . ($regs[$j][4] == 'larvae' ? 'selected=1' : '') . ">Larvae</option>\n"; echo "<option value=\"empty\" " . ($regs[$j][4] == 'empty' ? 'selected=1' : '') . ">Empty</option>\n"; echo "<option value=\"other\" " . ($regs[$j][3] != 0 && $regs[$j][4] != 'condensation' && $regs[$j][4] != 'contamination' && $regs[$j][4] != 'desiccation' && $regs[$j][4] != 'empty' && $regs[$j][4] != 'larvae' && $regs[$j][4] != 'starved' ? 'selected="selected"' : '') . ">Other</option>\n"; echo "</select>\n"; echo "<br><br></td><td bgcolor=\"{$clrs['1']}\" valign=\"top\" align=\"right\">\n"; echo "<input name=\"save\" type=\"submit\" value=\"Save\"><br>\n";