// set vars $image =""; $instrument=""; $plot=""; $baseURL = "http://atoc.colorado.edu/~friedrik/Experiments/SCOOP-MRS/"; $baseFilePath = "/home/atoc/friedrik/public_html/Experiments/SCOOP-MRS/"; // grab data from form $month = $_GET["month"]; $day = $_GET["day"]; $instrument = $_GET["instrument"]; // Convert months to numbers if ($month == "January" ){ $monthDigit= "01"; } if ($month == "February" ){ $monthDigit= "02"; } if ($month == "March" ){ $monthDigit= "03"; } if ($month == "April" ){ $monthDigit= "04"; } if ($month == "May" ){ $monthDigit= "05"; } if ($month == "June" ){ $monthDigit= "06"; } if ($month == "July" ){ $monthDigit= "07"; } if ($month == "August" ){ $monthDigit= "08"; } if ($month == "September" ){ $monthDigit= "09"; } if ($month == "October" ){ $monthDigit= "10"; } if ($month == "November" ){ $monthDigit= "11"; } if ($month == "December" ){ $monthDigit= "12"; } // Display the instrument type and the Month and Day. print "
Displaying data for $instrument on $month,$day
“;
// ==========================================
//
// This function test to see if the file exists
// If the file exists then spit out the URL
// If not then spit out an error message
//
// ==========================================
function checkFileExists($plot1){
$baseFilePath = “/home/atoc/friedrik/public_html/Experiments/SCOOP-MRS/”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/SCOOP-MRS/”;
// Plot exists
if (file_exists($baseFilePath.$plot1)) {
// Plot exists
//echo “
The file $baseFilePath$plot1 exists
“;
print “
“;
print “Plot file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO PLOT FOUND” );
//echo “The PLOT file: $baseFilePath$plot1 does not exist
“;
}
// return ($n * $n);
}
// ==========================================
//
// MRR !!!
//
// ==========================================
if ($instrument == “MRR@CU1” ) {
//print “
Instrument= “.$instrument.”
“;
$plot = “MRR/10″.$monthDigit.$day.”_Z_MRR2.gif”;
// call file exists function and print out result
checkFileExists($plot);
}
?>
// set vars
$image ="";
$instrument="";
$plot="";
$baseURL = "http://atoc.colorado.edu/~friedrik/Experiments/SCOOP-MRS/";
$baseFilePath = "/home/atoc/friedrik/public_html/Experiments/SCOOP-MRS/";
// grab data from form
$month = $_GET["month"];
$day = $_GET["day"];
$instrument = $_GET["instrument"];
// Convert months to numbers
if ($month == "January" ){
$monthDigit= "01";
}
if ($month == "February" ){
$monthDigit= "02";
}
if ($month == "March" ){
$monthDigit= "03";
}
if ($month == "April" ){
$monthDigit= "04";
}
if ($month == "May" ){
$monthDigit= "05";
}
if ($month == "June" ){
$monthDigit= "06";
}
if ($month == "July" ){
$monthDigit= "07";
}
if ($month == "August" ){
$monthDigit= "08";
}
if ($month == "September" ){
$monthDigit= "09";
}
if ($month == "October" ){
$monthDigit= "10";
}
if ($month == "November" ){
$monthDigit= "11";
}
if ($month == "December" ){
$monthDigit= "12";
}
// Display the instrument type and the Month and Day.
print "
Displaying data for $instrument on $month,$day
“;
// ==========================================
//
// This function test to see if the file exists
// If the file exists then spit out the URL
// If not then spit out an error message
//
// ==========================================
function checkFileExists($plot1){
$baseFilePath = “/home/atoc/friedrik/public_html/Experiments/SCOOP-MRS/”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/SCOOP-MRS/”;
// Plot exists
if (file_exists($baseFilePath.$plot1)) {
// Plot exists
//echo “
The file $baseFilePath$plot1 exists
“;
print “
“;
print “Plot file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO PLOT FOUND” );
//echo “The PLOT file: $baseFilePath$plot1 does not exist
“;
}
// return ($n * $n);
}
// ==========================================
//
// MRR !!!
//
// ==========================================
if ($instrument == “MRR@CU1” ) {
//print “
Instrument= “.$instrument.”
“;
$plot = “MRR/10″.$monthDigit.$day.”_Z_MRR2.gif”;
// call file exists function and print out result
checkFileExists($plot);
}
?>