104 |
sub update_problem { |
sub update_problem { |
105 |
my($fig,$cgi,$html,$problem) = @_; |
my($fig,$cgi,$html,$problem) = @_; |
106 |
|
|
107 |
|
push(@$html,"<br><br><a href=HOPSS.cgi>Back to Summary</a>\n<br><br><br><hr>"); |
108 |
&write_problem($cgi,$problem); |
&write_problem($cgi,$problem); |
109 |
&update_form($fig,$cgi,$html,$problem); |
&update_form($fig,$cgi,$html,$problem); |
110 |
push(@$html,"<br><br><a href=HOPSS.cgi>Back to Summary</a>\n<br><br><br><hr>"); |
push(@$html,"<br><br><a href=HOPSS.cgi>Back to Summary</a>\n<br><br><br><hr>"); |
123 |
'Unresolved paralogs', |
'Unresolved paralogs', |
124 |
'other'); |
'other'); |
125 |
|
|
126 |
|
my $time_of_creation = ¶meter($cgi,"time_of_creation"); |
127 |
my $type = ¶meter($cgi,"type"); |
my $type = ¶meter($cgi,"type"); |
128 |
my $title = ¶meter($cgi,'title'); |
my $title = ¶meter($cgi,'title'); |
129 |
my $subsystem = ¶meter($cgi,'subsystem'); |
my $subsystem = ¶meter($cgi,'subsystem'); |
137 |
$cgi->hidden(-name => 'request', -value => 'update_problem', -override => 1), |
$cgi->hidden(-name => 'request', -value => 'update_problem', -override => 1), |
138 |
$cgi->hidden(-name => 'subsystem', -value => $subsystem, -override => 1), |
$cgi->hidden(-name => 'subsystem', -value => $subsystem, -override => 1), |
139 |
$cgi->hidden(-name => 'problem', -value => $problem, -override => 1), |
$cgi->hidden(-name => 'problem', -value => $problem, -override => 1), |
140 |
|
$cgi->hidden(-name => 'time_of_creation', -value => $time_of_creation, -override => 1), |
141 |
$cgi->br, |
$cgi->br, |
142 |
$cgi->br, |
$cgi->br, |
143 |
$cgi->br, |
$cgi->br, |
304 |
|
|
305 |
my @existing = &problems; |
my @existing = &problems; |
306 |
my $new_prob = &next_id(\@existing); |
my $new_prob = &next_id(\@existing); |
307 |
|
my $timestamp = time; |
308 |
|
$cgi->param(-name => 'time_of_creation', -value => $timestamp); |
309 |
&write_problem($cgi,$new_prob); |
&write_problem($cgi,$new_prob); |
310 |
} |
} |
311 |
|
|
323 |
open(NEW,">$FIG_Config::data/HOPSS/$new_prob/problem") |
open(NEW,">$FIG_Config::data/HOPSS/$new_prob/problem") |
324 |
|| die "could not open $FIG_Config::data/HOPSS/$new_prob/problem"; |
|| die "could not open $FIG_Config::data/HOPSS/$new_prob/problem"; |
325 |
|
|
326 |
|
my $time_of_creation = ¶meter($cgi,"time_of_creation"); |
327 |
my $type = ¶meter($cgi,'type'); |
my $type = ¶meter($cgi,'type'); |
328 |
my $title = ¶meter($cgi,'title'); |
my $title = ¶meter($cgi,'title'); |
329 |
my $subsystem = ¶meter($cgi,'subsystem'); |
my $subsystem = ¶meter($cgi,'subsystem'); |
335 |
|
|
336 |
print NEW "ID\n$new_prob\n//\n"; |
print NEW "ID\n$new_prob\n//\n"; |
337 |
|
|
338 |
print NEW "time_of_creation\n",time,"\n//\n"; |
print NEW "time_of_creation\n",$time_of_creation,"\n//\n"; |
339 |
print NEW "type\n$type\n//\n"; |
print NEW "type\n$type\n//\n"; |
340 |
print NEW "title\n$title\n//\n"; |
print NEW "title\n$title\n//\n"; |
341 |
print NEW "subsystem\n$subsystem\n//\n"; |
print NEW "subsystem\n$subsystem\n//\n"; |