" . $accueil; header( 'Location: ' . $accueil ); }*/ require_once '../session_init.php'; require_once 'config.inc.php'; require_once 'db.class.php'; require_once 'envoi_courriel.inc.php'; require_once 'log.php'; print ' Administration '; verifPeripetieAvion(); function verifAvionpoeme() { $query = "SELECT * FROM avionpoeme"; $db->query($query); $avions = $db->result->fetch_all(MYSQLI_ASSOC); foreach($avions as $avion) { } return $fresult; } function verifPeripetieAvion() { print "Vérification des liens péripétie/avionpoème" . EOLH; $db = new db(); // requête Mysql $query = "SELECT * FROM avionPeripetie"; $db->query($query); $peripeties = $db->result->fetch_all(MYSQLI_ASSOC); $query = "SELECT * FROM avionpoeme"; $db->query($query); $avions = $db->result->fetch_all(MYSQLI_ASSOC); $avionsId = array_column($avions, 'expeMail', 'idAvion'); print_r($avionsId); foreach($peripeties as $peripetie) { print "Péripétie " . $peripetie["idAP"] . EOLH; $idAvion = $peripetie["idAvion"]; if ( empty($avionsId[$idAvion]) ) { print "Péripétie " . $peripetie["idAP"] . " n'a pas d'avion poème idAvion=>" . $idAvion . EOLH; } } $db->close(); } print ""; ?>