[Bio] / DrugTargets / SaveToTable.pl Repository:
ViewVC logotype

View of /DrugTargets/SaveToTable.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.3 - (download) (as text) (annotate)
Tue May 16 19:06:36 2006 UTC (14 years ago) by hwang
Branch: MAIN
Changes since 1.2: +6 -14 lines
Files were changed to separate the links from the text. Links need to be separated because links are out of date after awhile.
The saved text in drug_targets.pl is in a format recognized by ShowTable.pl

#/usr/bin/perl -w

use strict;
use warnings;

use FIG_Config;
use FIG;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use File::Temp qw/ :mktemp  /;

my $cgi = new CGI;

	$cgi->start_html(-title=>'Save to File'),

my @filenameParse = &getValue;


my $realFile = pop(@filenameParse);
my $usersName = pop(@filenameParse);

#copy the file to the appropriate place

my $masterFile="$FIG_Config::var/DrugTargets/NewFiles/master_tables.list";

if ($usersName ne "") {

    my $from = "$FIG_Config::temp/$realFile";
    my $to = "$FIG_Config::var/DrugTargets/NewFiles/$realFile";

    `cp $from  $to`;
    open(MASTER, ">>$masterFile") or die print "can not open master file at $masterFile";
    print MASTER "\n";
    print MASTER "Working Table: $usersName\t$realFile";


print "<p>Your file has been put in the masterlist";
print "<p>Please check <a href=http://rickettsia.uchicago.edu/khwang/FIG/ShowTable.cgi> Show Tables </a>";

sub getValue {
    my @value;
    foreach my $key (param) {
	push (@value,param($key));

    return @value;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3