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

38 lines
896 B
PHP
Raw Normal View History

2021-03-23 20:26:52 +01:00
<?php
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-29 21:50:41 +02: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
$db = new db();
2021-04-29 10:32:58 +02:00
//$db->open();
2021-03-23 20:26:52 +01:00
foreach ($table as $var)
{
2021-04-07 21:08:08 +02:00
if ( getpost( $var ) != null )
2021-03-23 20:26:52 +01:00
{
$r = getpost( $var );
/*if ( $r == "true")
{
$r = 1;
}elseif( $r ="false")*/
2021-04-07 21:08:08 +02:00
$db->$var = trim($r, ' \"');
2021-03-23 20:26:52 +01:00
}else
{
$erreur[] = $var;
}
}
if (!empty ($erreur))
{
echo json_encode($erreur);
2021-05-31 12:27:51 +02:00
log_error("erreur lors de l'acquisition des données:" . EOLH . print_r($erreur, true));
2021-03-23 20:26:52 +01:00
}else
{
$db->newPlane();
}
$db->close();
?>