tupdate favicon, add header to output file - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
(HTM) git clone git://src.adamsgaard.dk/cosmo
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6a4ca0b9792ff24b57239db0fefdd9ea49901e1b
(DIR) parent 1ee8dc646e48228b7caf388c5a13781a9c106630
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 20 Aug 2015 11:58:08 +0200
update favicon, add header to output file
Diffstat:
R img/favicon.ico -> img/favicon.png | 0
M index.php | 2 +-
M uploadhistory.php | 15 ++++++++++++---
3 files changed, 13 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/img/favicon.ico b/img/favicon.png
Binary files differ.
(DIR) diff --git a/index.php b/index.php
t@@ -9,7 +9,7 @@
<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 -->
(DIR) diff --git a/uploadhistory.php b/uploadhistory.php
t@@ -147,12 +147,21 @@ if (is_writable($outputfile)) {
die("The php server could not open $outputfile.");
}
- // write to file
+ // write header to file
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.");
}
}
+ 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 {
die("The php server output file $outputfile is not writable");
t@@ -177,6 +186,6 @@ if (!chmod($outputfile, 0777)) {
// Finally redirect user after processing uploaded data. This header function
// call must be before any output!
-header("Location: /~adc/cosmo");
+header("Location: /~ad/cosmo");
?>