tadd check for uncertainty and production rate - 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 4d74e4c0e87b378a2c9c4d7f8e2a8cfed51e2d5f
(DIR) parent 57aad56c378f4ef69cf3f7fcea729bcfc1cd12c5
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 18 Aug 2015 14:57:27 +0200
add check for uncertainty and production rate
Diffstat:
M uploadhistory.php | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/uploadhistory.php b/uploadhistory.php
t@@ -34,7 +34,31 @@ if ((!isset($_POST['conc_10Be']) || $_POST['conc_10Be'] == '') &&
// For each isotope concentration there should be uncertainty and production
// rate
-//if (isset($
+if ((isset($_POST['conc_10Be']) && $_POST['conc_10Be'] != '') &&
+ (!isset($_POST['prod_10Be']) || $_POST['prod_10Be'] == '' ||
+ !isset($_POST['uncer_10Be']) || $_POST['uncer_10Be'] == '')) {
+ array_push($missing_fields, 'production rate and uncertainty for ' .
+ '<sup>10</sup>Be');
+}
+if ((isset($_POST['conc_26Al']) && $_POST['conc_26Al'] != '') &&
+ (!isset($_POST['prod_26Al']) || $_POST['prod_26Al'] == '' ||
+ !isset($_POST['uncer_26Al']) || $_POST['uncer_26Al'] == '')) {
+ array_push($missing_fields, 'production rate and uncertainty for ' .
+ '<sup>26</sup>Al');
+}
+if ((isset($_POST['conc_14C']) && $_POST['conc_14C'] != '') &&
+ (!isset($_POST['prod_14C']) || $_POST['prod_14C'] == '' ||
+ !isset($_POST['uncer_14C']) || $_POST['uncer_14C'] == '')) {
+ array_push($missing_fields, 'production rate and uncertainty for ' .
+ '<sup>14</sup>C');
+}
+if ((isset($_POST['conc_21Ne']) && $_POST['conc_21Ne'] != '') &&
+ (!isset($_POST['prod_21Ne']) || $_POST['prod_21Ne'] == '' ||
+ !isset($_POST['uncer_21Ne']) || $_POST['uncer_21Ne'] == '')) {
+ array_push($missing_fields, 'production rate and uncertainty for ' .
+ '<sup>21</sup>Ne');
+}
+
// If something is missing, send error to user and make him/her go back
if (count($missing_fields) > 0) {