error message return if image processing fails
[sgn.git] / cgi-bin / insitu / index.pl
blob8524c50fa01164d25a70598c7a55c92bafa664cc
1 #!/usr/bin/perl -w
3 # This script will print a form so that users may upload a gzipped file of
4 # insitu images from an experiment and metadata about that experiment.
6 # The data will be loaded into the database, and thumbnail images will be
7 # created for each uploaded image.
9 # The data will be displayed later on with the insitu_view script.
11 use strict;
12 use warnings;
13 use CXGN::Page;
14 use CXGN::Insitu::DB;
15 use Data::Dumper;
16 use CXGN::Insitu::Toolbar;
18 use CatalystX::GlobalContext '$c';
20 our $debug = 2; # higher for more verbosity
22 # directory this script will move renamed fullsize images to
23 my $fullsize_dir = $c->config->{insitu_fullsize_dir};
24 # directory this script will move shrunken images to
25 my $display_dir = $c->config->{insitu_display_dir};
27 # suffix / resolution for thumbnail images
28 my $thumb_suffix = "_thumb";
29 my $thumb_size = "200";
31 # suffix / resolution for large (but not fullsize) images
32 my $large_suffix = "_mid";
33 my $large_size = "600";
35 my $dbh = CXGN::DB::Connection->new();
37 my $insitu_db = CXGN::Insitu::DB->new($dbh);
39 our $page = CXGN::Page->new( "Insitu DB", "Teri");
40 $page->header("Insitu DB", "Insitu Database");
42 my ($experiment_count, $image_count, $tag_count) = $insitu_db->stats();
44 CXGN::Insitu::Toolbar::display_toolbar("Insitu home");
46 print qq {
47 <br /><br /><table summary=""><tr><td><img src="/documents/insitu/insitu_logo.jpg" border="0" alt="" /></td><td width="20">&nbsp;</td><td>
48 The insitu database currently contains:<br />
51 $experiment_count experiments<br />
52 $image_count images and <br />
53 $tag_count tags.<br />
54 <a href="/insitu/search.pl?experiment_name=">[Browse]</a><br />
55 <br />
56 <br />
57 <b>This database is supported by the <a href="http://floralgenome.org">Floral Genome Project</a> funded by the <a href="http://www.nsf.gov/">NSF</a>. <br /></b>
59 <br /><br /><br />
61 </td></tr></table>
65 $page->footer();