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

Diff of /FigWebServices/cv.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Thu Oct 20 00:57:14 2005 UTC revision 1.6, Fri Oct 21 22:27:40 2005 UTC
# Line 10  Line 10 
10  use CGI;  use CGI;
11  use Tracer;  use Tracer;
12    
13    print STDERR "NEW LOAD of PAGE\n";
14    
15  my $cgi = new CGI;  my $cgi = new CGI;
16    
17  use HTML;  use HTML;
# Line 20  Line 22 
22    
23    
24  my $peg;  my $peg;
25  if ($cgi->param('prot') ) {  if ($cgi->param('prot') )
26    {
27      $peg = $cgi->param('prot');      $peg = $cgi->param('prot');
28  } else {  }
29    else
30    {
31      $peg = $cgi->param('prot');      $peg = $cgi->param('prot');
32      my(@html);      my(@html);
33      push(@html, $cgi->p("Parameter error- prot is required."));      push(@html, $cgi->p("Parameter error- prot is required."));
# Line 71  Line 76 
76  my $ids;  my $ids;
77  my $tag_to_id;  my $tag_to_id;
78  my $inputs;  my $inputs;
79    print STDERR "REQ: ", $cgi->param('request'), "\n";
80    
81  if ($cgi->param('request') eq "Delete Checked Terms")  if ($cgi->param('request') eq "Delete Checked Terms")
82  {  {
83        print STDERR "HERE Delete Clicked\n";
84      my %id_term_to_source;      my %id_term_to_source;
85      my @checked;      my @checked;
86      my @param_list = $cgi->param();      my @param_list = $cgi->param();
# Line 86  Line 93 
93               if($cgi->param($p))               if($cgi->param($p))
94               {               {
95                   $value = $cgi->param($p);                   $value = $cgi->param($p);
96                     print STDERR "delete_checked_value:$value\n";
97                   push(@checked,$value)                   push(@checked,$value)
98               }               }
99            }            }
# Line 93  Line 101 
101    
102          for my $c (@checked)          for my $c (@checked)
103          {          {
104             @temp = split('\t',$c);             print STDERR "checked_for_deletion:$c\n";
105               @temp = split('split_here',$c);
106             $id_term_to_source{$temp[1]} = $temp[0];             $id_term_to_source{$temp[1]} = $temp[0];
107          }          }
108      }      }
# Line 169  Line 178 
178  {  {
179     my ($fig,$cgi,$html,$peg,$id_term_to_source) = @_;     my ($fig,$cgi,$html,$peg,$id_term_to_source) = @_;
180     my @id_term = keys(%{$id_term_to_source});     my @id_term = keys(%{$id_term_to_source});
181     foreach my $it (@id_term){$fig->delete_attribute($peg,$id_term_to_source->{$it},$it)}     foreach my $it (@id_term)
182       {
183             print STDERR "key:$it\n";
184             print STDERR "value:$id_term_to_source->{$it}\n";
185             $fig->delete_attribute($peg,$id_term_to_source->{$it},$it)
186        }
187  }  }
188    
189  sub search  sub search
# Line 227  Line 241 
241          $term = $temp[2];          $term = $temp[2];
242          print STDERR "term:$term\n";          print STDERR "term:$term\n";
243          $id_and_term = $id.": ".$term;          $id_and_term = $id.": ".$term;
244          $cb_value = $cv."split_here".$id.": ".$term;          $cb_value = $cv."split_here".$id."; ".$term;
245          print STDERR "iandt:$id_and_term\n";          print STDERR "iandt:$id_and_term\n";
246          $cb ="<input type=checkbox name=add_checked_$counter value='$cb_value'>" ;          $cb ="<input type=checkbox name=add_checked_$counter value='$cb_value'>" ;
247          push(@$row,$cb);          push(@$row,$cb);
# Line 254  Line 268 
268      {      {
269          $row = [];          $row = [];
270          $source = $r->[1];          $source = $r->[1];
271          print STDERR "source:$source\n";          print STDERR "deleted_checked_source:$source\n";
272          $id_and_term = $r->[2];          $id_and_term = $r->[2];
273          $cb ="<input type=checkbox name=delete_checked_$counter value=$source\t$id_and_term>" ;          print STDERR "deleted_id_and_term:$id_and_term\n";
274            $value = $source."split_here".$id_and_term;
275            $cb ="<input type=checkbox name='delete_checked_$counter' value='$value'>" ;
276          push(@$row,$cb);          push(@$row,$cb);
277          push(@$row,$source);          push(@$row,$source);
278          push(@$row,$id_and_term);          push(@$row,$id_and_term);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3