[Bio] / FigWebServices / reset_curator.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/reset_curator.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (view) (download)

1 : overbeek 1.1 # -*- perl -*-
2 : olson 1.2 #
3 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
4 :     # for Interpretations of Genomes. All Rights Reserved.
5 :     #
6 :     # This file is part of the SEED Toolkit.
7 :     #
8 :     # The SEED Toolkit is free software. You can redistribute
9 :     # it and/or modify it under the terms of the SEED Toolkit
10 :     # Public License.
11 :     #
12 :     # You should have received a copy of the SEED Toolkit Public License
13 :     # along with this program; if not write to the University of Chicago
14 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
15 :     # Genomes at veronika@thefig.info or download a copy from
16 :     # http://www.theseed.org/LICENSE.TXT.
17 :     #
18 :    
19 : overbeek 1.1
20 :     use FIG;
21 :     my $fig = new FIG;
22 :    
23 :     use HTML;
24 :    
25 :     use CGI;
26 : overbeek 1.3 use CGI::Carp qw(fatalsToBrowser);
27 : overbeek 1.1 my $cgi = new CGI;
28 :    
29 :    
30 :     my $html = [];
31 :     my $subsys = $cgi->param('subsystem');
32 :     my $who = $cgi->param('to');
33 :    
34 : overbeek 1.4 my @all=sort {uc($a) cmp uc($b)} $fig->all_subsystems;
35 : overbeek 1.3 map {s/_/ /g} @all;
36 :    
37 :     push @$html, $cgi->start_form(),
38 :     $cgi->p("Change owner of: ", $cgi->popup_menu(-name=>"subsystem", -values=>\@all)),
39 :     $cgi->p("To: ", $cgi->textfield(-name=>"to", -size=>20)),
40 :     $cgi->p($all),
41 :     $cgi->end_form;
42 :    
43 :     if ($subsys && $who)
44 : overbeek 1.1 {
45 : overbeek 1.3 $subsys =~ s/ /_/g;
46 :     if ($subsys && $who && (-d "$FIG_Config::data/Subsystems/$subsys") && ($fig->subsystem_curator ne $who) &&
47 :     $fig->reset_subsystem_curator($subsys,$who))
48 :     {
49 :     push(@$html,$cgi->h1("Reset curator of $subsys to $who"));
50 :     }
51 :     else
52 :     {
53 :     push(@$html,$cgi->h1("Failed to reset curator of $subsys to $who"));
54 :     }
55 : overbeek 1.1 }
56 :     &HTML::show_page($cgi,$html);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3