Example #1
0
    } else {
        $error = true;
    }
}
// Infos sur un logement en fonction d'un site
if (!empty($_GET['num']) and is_numeric($_GET['num']) and !empty($_GET['site']) and is_numeric($_GET['site'])) {
    $info = new info_sl($_GET['site'], $_GET['num']);
    $info->req_data();
    $sl = $info->get_data();
}
// Obtenir les infos d'un logement en fonction de son id
if (!empty($_GET['num']) and is_numeric($_GET['num'])) {
    include_once 'class/info_logement.php';
    $info = new info_logement($_GET['num']);
    $info->req_data();
    $log = $info->get_data();
}
// Liste de tous les logements
include_once 'class/liste_log.php';
$liste = new liste_log();
$liste->req_data();
$logs = $liste->get_data();
// Liste de tous les sites
include_once 'class/liste_site.php';
$liste = new liste_site();
$liste->req_data();
$sites = $liste->get_data();
include_once 'header.php';
if (isset($error)) {
    echo '<p>Veillez à emplir correctement le nom du logement.</p>';
}