1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__avion-poeme/avionpoeme.php

32 lines
859 B
PHP
Raw Permalink Normal View History

2021-03-23 20:26:52 +01:00
<?php
2021-11-01 13:48:35 +01:00
require_once 'session_init.php';
require_once 'config.inc.php';
require_once 'db.class.php';
require_once 'log.php';
require_once 'fonctions.inc.php';
2021-03-23 20:26:52 +01:00
2021-11-01 13:48:35 +01:00
$table = array("message", "expeMail", "expeKnown", "expeLang", "destLang", "startLat", "startLon", "startName", "startTime", "startTZ", "destMail", "destLat", "destLon", "destName", "public", "color", "deliveryTime", "deliveryTZ", "deliveryTimeServer", "deliveryMethod");
2021-03-23 20:26:52 +01:00
2021-11-01 13:48:35 +01:00
$db = new db();
//$db->open();
2021-03-23 20:26:52 +01:00
2021-11-01 13:48:35 +01:00
foreach ($table as $var) {
if (getpost($var) != null) {
$r = getpost($var);
/*if ( $r == "true")
2021-03-23 20:26:52 +01:00
{
$r = 1;
}elseif( $r ="false")*/
2021-11-01 13:48:35 +01:00
$db->$var = trim($r, ' \"');
} else {
$erreur[] = $var;
2021-03-23 20:26:52 +01:00
}
2021-11-01 13:48:35 +01:00
}
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();