Commit 6a4ca0b9 authored by Anders Damsgaard's avatar Anders Damsgaard

update favicon, add header to output file

parent 1ee8dc64
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<title>MCMC Cosmo Calculator</title> <title>MCMC Cosmo Calculator</title>
<link href="img/favicon.ico" rel="icon" type="image/x-icon" /> <link rel="icon" type="image/png" href="img/favicon.png" />
<!-- CSS --> <!-- CSS -->
......
...@@ -147,12 +147,21 @@ if (is_writable($outputfile)) { ...@@ -147,12 +147,21 @@ if (is_writable($outputfile)) {
die("The php server could not open $outputfile."); die("The php server could not open $outputfile.");
} }
// write to file // write header to file
foreach ($fieldnames as $fieldname) { foreach ($fieldnames as $fieldname) {
if (fwrite($handle, addslashes($_POST[$fieldname]) . '\t') === false) { if (fwrite($handle, addslashes($fieldname) . "\t") === false) {
die("The php server could not write $fieldname to $outputfile."); die("The php server could not write $fieldname to $outputfile.");
} }
} }
fwrite($handle, "\n");
// write values to file
foreach ($fieldnames as $fieldname) {
if (fwrite($handle, addslashes($_POST[$fieldname]) . "\t") === false) {
die("The php server could not write $fieldname to $outputfile.");
}
}
fwrite($handle, "\n");
} else { } else {
die("The php server output file $outputfile is not writable"); die("The php server output file $outputfile is not writable");
...@@ -177,6 +186,6 @@ if (!chmod($outputfile, 0777)) { ...@@ -177,6 +186,6 @@ if (!chmod($outputfile, 0777)) {
// Finally redirect user after processing uploaded data. This header function // Finally redirect user after processing uploaded data. This header function
// call must be before any output! // call must be before any output!
header("Location: /~adc/cosmo"); header("Location: /~ad/cosmo");
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment