37 lines
771 B
PHP
37 lines
771 B
PHP
<?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';
|
|
|
|
$table=array("message", "expeMail", "expeKnown", "expeLang", "destLang", "startLat", "startLon", "startName", "startTime", "startTZ", "destMail", "destLat", "destLon", "destName", "public", "color", "deliveryTime", "deliveryTZ", "deliveryTimeServer");
|
|
|
|
$db = new db();
|
|
$db->open();
|
|
|
|
foreach ($table as $var)
|
|
{
|
|
if ( !empty(getpost( $var )))
|
|
{
|
|
$r = getpost( $var );
|
|
/*if ( $r == "true")
|
|
{
|
|
$r = 1;
|
|
}elseif( $r ="false")*/
|
|
$db->$var = $r;
|
|
}else
|
|
{
|
|
$erreur[] = $var;
|
|
}
|
|
}
|
|
if (!empty ($erreur))
|
|
{
|
|
echo json_encode($erreur);
|
|
}else
|
|
{
|
|
$db->newPlane();
|
|
}
|
|
$db->close();
|
|
?>
|