michael@0: #!/usr/bin/perl michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: michael@0: #______________________________________________________________________________________ michael@0: # these variables will need to be changed to fit the host machine configuration/directories. michael@0: # michael@0: # this is where the linux.dat files live; currently /home/usr/ftp/pub/data/memtests michael@0: $directory_root = "/u/curt/reflow/results/"; michael@0: # michael@0: $host_server = "smoketest1"; michael@0: # michael@0: # note: the /plots_tmp directory under $results_dir will need to be cleaned out periodically michael@0: # because this is where the .png files will be put on creation (it could become a memory hog) michael@0: $results_dir = "/usr/local/apache/htdocs"; michael@0: michael@0: # this is where gnuplot app lives michael@0: $gnuplot = "/usr/bin/gnuplot"; michael@0: # michael@0: #-------------------------------------------------------------------------------------- michael@0: michael@0: # take in form info and convert it to usable variables -------------------------------- michael@0: michael@0: $query_string = $ENV{'QUERY_STRING'}; michael@0: #$query_string = "first_date=04%2F17%2F01&compare_date=04%2F12%2F01"; michael@0: michael@0: @key_value_pairs = split (/&/, $query_string); michael@0: michael@0: foreach $key_value (@key_value_pairs) michael@0: { michael@0: ($key, $value) = split (/=/, $key_value); michael@0: $value =~ tr/+/ /; michael@0: $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg; michael@0: $form_data{$key} = $value; michael@0: @list_keys = keys(%form_data); michael@0: @values_keys = values(%form_data); michael@0: } michael@0: michael@0: # error check for user selecting both fields ------------------------------------ michael@0: michael@0: $number_of_values = @key_value_pairs; michael@0: michael@0: if ($number_of_values != 2) { michael@0: print "Content-type: text/html", "\n\n"; michael@0: michael@0: print "", "\n"; michael@0: print "