From de54555d7704fe06983088bef372c285a09d7fed Mon Sep 17 00:00:00 2001 From: mberard Date: Mon, 1 Nov 2021 13:48:35 +0100 Subject: [PATCH] add-attachment-in-form --- avionpoeme.php | 52 +++++++--------- cron.php | 1 - index.php | 7 +++ src/app.css | 4 ++ src/formValidation.js | 6 ++ src/newPlane.js | 136 +++++++++++++++++++++--------------------- src/translation.js | 1 - 7 files changed, 109 insertions(+), 98 deletions(-) diff --git a/avionpoeme.php b/avionpoeme.php index 1308ab8..880d693 100644 --- a/avionpoeme.php +++ b/avionpoeme.php @@ -1,37 +1,31 @@ open(); +$db = new db(); +//$db->open(); - foreach ($table as $var) - { - if ( getpost( $var ) != null ) - { - $r = getpost( $var ); - /*if ( $r == "true") +foreach ($table as $var) { + if (getpost($var) != null) { + $r = getpost($var); + /*if ( $r == "true") { $r = 1; }elseif( $r ="false")*/ - $db->$var = trim($r, ' \"'); - }else - { - $erreur[] = $var; - } + $db->$var = trim($r, ' \"'); + } else { + $erreur[] = $var; } - if (!empty ($erreur)) - { - echo json_encode($erreur); - log_error("erreur lors de l'acquisition des données:" . EOLH . print_r($erreur, true)); - }else - { - $db->newPlane(); - } - $db->close(); -?> +} +if (!empty($erreur)) { + echo json_encode($erreur); + log_error("erreur lors de l'acquisition des données:" . EOLH . print_r($erreur, true)); +} else { + $db->newPlane(); +} +$db->close(); diff --git a/cron.php b/cron.php index 16c1cef..893f095 100644 --- a/cron.php +++ b/cron.php @@ -197,4 +197,3 @@ } } $db->close(); -?> diff --git a/index.php b/index.php index f3063b9..7f0bb1f 100644 --- a/index.php +++ b/index.php @@ -54,6 +54,13 @@
+
+ +
+ + +
+