mirror of
https://github.com/Oxbian/SIDPS.git
synced 2025-07-06 11:55:40 +02:00
filtres fonctionnels
This commit is contained in:
212
web/class/Alerts.class.php
Normal file
212
web/class/Alerts.class.php
Normal file
@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
class Alerts
|
||||
{
|
||||
// Attributs privés
|
||||
private $id;
|
||||
private $cef_version;
|
||||
private $date_alerte;
|
||||
private $event_gravite;
|
||||
private $device_product;
|
||||
private $device_vendor;
|
||||
private $device_version;
|
||||
private $alerte_name;
|
||||
private $destinationAddress;
|
||||
private $sourceAddress;
|
||||
private $destinationPort;
|
||||
private $sourcePort;
|
||||
private $protocol;
|
||||
private $applicationProtocol;
|
||||
private $reason;
|
||||
private $action;
|
||||
private $commentaire;
|
||||
|
||||
// Getter et Setter pour id
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
// Getter et Setter pour cef_version
|
||||
public function getCefVersion()
|
||||
{
|
||||
return $this->cef_version;
|
||||
}
|
||||
|
||||
public function setCefVersion($cef_version)
|
||||
{
|
||||
$this->cef_version = $cef_version;
|
||||
}
|
||||
|
||||
// Getter et Setter pour date_alerte
|
||||
public function getDateAlerte()
|
||||
{
|
||||
return $this->date_alerte;
|
||||
}
|
||||
|
||||
public function setDateAlerte($date_alerte)
|
||||
{
|
||||
$this->date_alerte = $date_alerte;
|
||||
}
|
||||
|
||||
// Getter et Setter pour event_gravite
|
||||
public function getEventGravite()
|
||||
{
|
||||
return $this->event_gravite;
|
||||
}
|
||||
|
||||
public function setEventGravite($event_gravite)
|
||||
{
|
||||
$this->event_gravite = $event_gravite;
|
||||
}
|
||||
|
||||
// Getter et Setter pour device_product
|
||||
public function getDeviceProduct()
|
||||
{
|
||||
return $this->device_product;
|
||||
}
|
||||
|
||||
public function setDeviceProduct($device_product)
|
||||
{
|
||||
$this->device_product = $device_product;
|
||||
}
|
||||
|
||||
// Getter et Setter pour device_vendor
|
||||
public function getDeviceVendor()
|
||||
{
|
||||
return $this->device_vendor;
|
||||
}
|
||||
|
||||
public function setDeviceVendor($device_vendor)
|
||||
{
|
||||
$this->device_vendor = $device_vendor;
|
||||
}
|
||||
|
||||
// Getter et Setter pour device_version
|
||||
public function getDeviceVersion()
|
||||
{
|
||||
return $this->device_version;
|
||||
}
|
||||
|
||||
public function setDeviceVersion($device_version)
|
||||
{
|
||||
$this->device_version = $device_version;
|
||||
}
|
||||
|
||||
// Getter et Setter pour alerte_name
|
||||
public function getAlerteName()
|
||||
{
|
||||
return $this->alerte_name;
|
||||
}
|
||||
|
||||
public function setAlerteName($alerte_name)
|
||||
{
|
||||
$this->alerte_name = $alerte_name;
|
||||
}
|
||||
|
||||
// Getter et Setter pour destinationAddress
|
||||
public function getDestinationAddress()
|
||||
{
|
||||
return $this->destinationAddress;
|
||||
}
|
||||
|
||||
public function setDestinationAddress($destinationAddress)
|
||||
{
|
||||
$this->destinationAddress = $destinationAddress;
|
||||
}
|
||||
|
||||
// Getter et Setter pour sourceAddress
|
||||
public function getSourceAddress()
|
||||
{
|
||||
return $this->sourceAddress;
|
||||
}
|
||||
|
||||
public function setSourceAddress($sourceAddress)
|
||||
{
|
||||
$this->sourceAddress = $sourceAddress;
|
||||
}
|
||||
|
||||
// Getter et Setter pour destinationPort
|
||||
public function getDestinationPort()
|
||||
{
|
||||
return $this->destinationPort;
|
||||
}
|
||||
|
||||
public function setDestinationPort($destinationPort)
|
||||
{
|
||||
$this->destinationPort = $destinationPort;
|
||||
}
|
||||
|
||||
// Getter et Setter pour sourcePort
|
||||
public function getSourcePort()
|
||||
{
|
||||
return $this->sourcePort;
|
||||
}
|
||||
|
||||
public function setSourcePort($sourcePort)
|
||||
{
|
||||
$this->sourcePort = $sourcePort;
|
||||
}
|
||||
|
||||
// Getter et Setter pour protocol
|
||||
public function getProtocol()
|
||||
{
|
||||
return $this->protocol;
|
||||
}
|
||||
|
||||
public function setProtocol($protocol)
|
||||
{
|
||||
$this->protocol = $protocol;
|
||||
}
|
||||
|
||||
// Getter et Setter pour applicationProtocol
|
||||
public function getApplicationProtocol()
|
||||
{
|
||||
return $this->applicationProtocol;
|
||||
}
|
||||
|
||||
public function setApplicationProtocol($applicationProtocol)
|
||||
{
|
||||
$this->applicationProtocol = $applicationProtocol;
|
||||
}
|
||||
|
||||
// Getter et Setter pour reason
|
||||
public function getReason()
|
||||
{
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
public function setReason($reason)
|
||||
{
|
||||
$this->reason = $reason;
|
||||
}
|
||||
|
||||
// Getter et Setter pour action
|
||||
public function getAction()
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
|
||||
public function setAction($action)
|
||||
{
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
// Getter et Setter pour commentaire
|
||||
public function getCommentaire()
|
||||
{
|
||||
return $this->commentaire;
|
||||
}
|
||||
|
||||
public function setCommentaire($commentaire)
|
||||
{
|
||||
$this->commentaire = $commentaire;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -8,7 +8,7 @@ class Database
|
||||
private $db_host;
|
||||
private $pdo;
|
||||
|
||||
public function __construct($db_name = "", $db_user = '', $db_pass = '', $db_host = 'localhost')
|
||||
public function __construct($db_name = "sidps", $db_user = 'sidps', $db_pass = 'sidps', $db_host = 'localhost')
|
||||
{
|
||||
$this->db_name = $db_name;
|
||||
$this->db_user = $db_user;
|
||||
@ -36,7 +36,7 @@ class Database
|
||||
// TOCHANGE
|
||||
public function getnbAlerts()
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS nb_alerts FROM alerts';
|
||||
$sql = 'SELECT COUNT(*) AS nb_alerts FROM alertes';
|
||||
|
||||
$sth = $this->getPDO()->prepare($sql);
|
||||
$sth->execute();
|
||||
@ -60,7 +60,7 @@ class Database
|
||||
$decalage = ($page - 1) * $limit;
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM alerts ';
|
||||
FROM alertes ';
|
||||
|
||||
if ($filters != null) {
|
||||
foreach ($filters as $key => $value) {
|
||||
@ -74,9 +74,9 @@ class Database
|
||||
|
||||
// TODO : edit filters
|
||||
if ($filters != null) {
|
||||
if ($filters['date'] != '') $sth->bindParam('date', $filters['date']);
|
||||
if ($filters['espece'] != '') $sth->bindParam('espece', $filters['espece']);
|
||||
if ($filters['zone'] != '') $sth->bindParam('zone', $filters['zone']);
|
||||
if ($filters['event_gravite'] != '') $sth->bindParam('event_gravite', $filters['event_gravite']);
|
||||
if ($filters['device_product'] != '') $sth->bindParam('device_product', $filters['device_product']);
|
||||
// if ($filters['zone'] != '') $sth->bindParam('zone', $filters['zone']);
|
||||
}
|
||||
$sth->bindParam(':limit', $limit, PDO::PARAM_INT);
|
||||
$sth->bindParam(':offset', $decalage, PDO::PARAM_INT);
|
||||
@ -89,7 +89,7 @@ class Database
|
||||
{
|
||||
$whereArgs = [];
|
||||
$sql = 'SELECT *
|
||||
FROM alerts ';
|
||||
FROM alertes ';
|
||||
|
||||
if ($filters != null) {
|
||||
foreach ($filters as $key => $value) {
|
||||
@ -108,11 +108,11 @@ class Database
|
||||
return $sth->fetchAll(PDO::FETCH_CLASS, 'Alerts');
|
||||
}
|
||||
|
||||
public function getAlertsByGravite()
|
||||
public function getDevices()
|
||||
{
|
||||
$sql = 'SELECT gravite
|
||||
FROM alerts
|
||||
GROUP BY gravite';
|
||||
$sql = 'SELECT device_product
|
||||
FROM alertes
|
||||
GROUP BY device_product';
|
||||
|
||||
$sth = $this->getPDO()->prepare($sql, [PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY]);
|
||||
$sth->execute();
|
||||
@ -130,9 +130,9 @@ class Database
|
||||
foreach ($filters as $key) {
|
||||
$whereArgs[] = $key;
|
||||
}
|
||||
$sql = 'SELECT gravite, COUNT(*) as nbbygravite FROM Alerts where date>='. implode(' AND ', $whereArgs).' GROUP BY gravite';
|
||||
$sql = 'SELECT gravite, COUNT(*) as nbbygravite FROM alertes where date>='. implode(' AND ', $whereArgs).' GROUP BY gravite';
|
||||
}else {
|
||||
$sql = 'SELECT gravite, COUNT(*) as nbbygravite FROM Alerts GROUP BY gravite';
|
||||
$sql = 'SELECT gravite, COUNT(*) as nbbygravite FROM alertes GROUP BY gravite';
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
class Alerts
|
||||
{
|
||||
//attributs TDO change names
|
||||
private $id;
|
||||
private $date;
|
||||
public $espece;
|
||||
public $zone;
|
||||
private $nombre;
|
||||
|
||||
//methodes TODO : changes names
|
||||
public function Getid()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
public function Getdate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
public function Getespece()
|
||||
{
|
||||
return $this->espece;
|
||||
}
|
||||
public function Getzone()
|
||||
{
|
||||
return $this->zone;
|
||||
}
|
||||
public function Getnombre()
|
||||
{
|
||||
return $this->nombre;
|
||||
}
|
||||
|
||||
public function Setid($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
public function Setdate($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
public function Setespece($espece)
|
||||
{
|
||||
$this->espece = $espece;
|
||||
}
|
||||
public function Setzone($zone)
|
||||
{
|
||||
$this->zone = $zone;
|
||||
}
|
||||
public function Setnombre($nombre)
|
||||
{
|
||||
$this->nombre = $nombre;
|
||||
}
|
||||
|
||||
// function __construct($id, $date, $espece, $zone, $nombre)
|
||||
// {
|
||||
// $this->$id = $id;
|
||||
// $this->$date = $date;
|
||||
// $this->$espece = $espece;
|
||||
// $this->$zone = $zone;
|
||||
// $this->$nombre = $nombre;
|
||||
// }
|
||||
}
|
@ -7,7 +7,7 @@ spl_autoload_register(function ($class) {
|
||||
include 'class/' . $class . '.class.php';
|
||||
});
|
||||
|
||||
$db = new Database();
|
||||
$db = new Database();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@ -51,42 +51,32 @@ $db = new Database();
|
||||
<div class="container px-4">
|
||||
<div class="row gx-4 justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<h2>Liste des échouages</h2>
|
||||
<h2>Liste des Attaques</h2>
|
||||
<p class="lead">veuillez selectionner les filtres de recherche ou parcourez la liste ci-dessous</p>
|
||||
|
||||
<!-- ici les filtres -->
|
||||
<form class="row g-3" method="POST">
|
||||
|
||||
<div class="col-auto">
|
||||
<select class="form-select" aria-label="Choisir une date" name="date">
|
||||
<option selected value="">Année</option>
|
||||
<?php for ($i = 1990; $i < 2020; $i++) : ?>
|
||||
<select class="form-select" aria-label="Choisir un niveau d'alerte" name="event_gravite">
|
||||
<option selected value="">niveau d'alerte</option>
|
||||
<?php for ($i = 1; $i <= 10; $i++) : ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<select class="form-select" aria-label="Chosisir une gravité" name="gravité">
|
||||
<option selected value="">Gravité</option>
|
||||
<select class="form-select" aria-label="Chosisir une device" name="device_product">
|
||||
<option selected value="">Appareil de détection</option>
|
||||
<?php
|
||||
$especesByType = $db->getAlertsByGravite();
|
||||
foreach ($especesByType as $espece) : ?>
|
||||
<option value="<?php echo $espece->Getespece(); ?>"><?php echo $espece->Getespece(); ?></option>
|
||||
$devices = $db->getDevices();
|
||||
foreach ($devices as $device) : ?>
|
||||
<option value="<?php echo $device->getDeviceProduct(); ?>"><?php echo $device->getDeviceProduct(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-auto">
|
||||
<select class="form-select" aria-label="Chosisir une zone" name="zone">
|
||||
<option selected value="">Zone</option>
|
||||
|
||||
<?php
|
||||
// $zonesEchouage = $db->getZonesEchouage();
|
||||
// foreach ($zonesEchouage as $zone) : ?>
|
||||
<option value="<?php //echo $zone->Getzone(); ?>"><?php// echo $zone->Getzone(); ?></option>
|
||||
<?php //endforeach; ?>
|
||||
</select>
|
||||
</div> -->
|
||||
|
||||
<div class="col-auto ms-auto me-0">
|
||||
<button type="submit" class="btn btn-primary mb-3">Filtrer</button>
|
||||
@ -98,9 +88,10 @@ $db = new Database();
|
||||
<tr>
|
||||
<th scope="col" class="id">N°</th>
|
||||
<th scope="col" class="Date">Date</th>
|
||||
<th scope="col" class="label">Espece</th>
|
||||
<th scope="col" class="label">Zone</th>
|
||||
<th scope="col" class="label">Nombre</th>
|
||||
<th scope="col" class="label">Nom alerte</th>
|
||||
<th scope="col" class="label">Appareil de détection</th>
|
||||
<th scope="col" class="label">Adresse source</th>
|
||||
<th scope="col" class="label">Niveau d'alerte</th>
|
||||
<th scope="col" class="label"></th>
|
||||
<th scope="col" class="label"></th>
|
||||
</tr>
|
||||
@ -108,24 +99,26 @@ $db = new Database();
|
||||
<tbody style="border: 1px solid black;">
|
||||
|
||||
<?php
|
||||
$echouages = $db->getAlerts($_POST, 20);
|
||||
foreach ($echouages as $echouage) : ?>
|
||||
$alerts = $db->getAlerts($_POST, 20);
|
||||
foreach ($alerts as $alert) : ?>
|
||||
<tr style="border: 1px solid black;">
|
||||
<td class="id"><?php echo $echouage->Getid(); ?></td>
|
||||
<td class="id"><?php echo $echouage->Getdate(); ?></td>
|
||||
<td class="label"><a href="info-echouage.php/?id=<?php echo $echouage->Getid(); ?>"><?php echo $echouage->Getespece(); ?></a></td>
|
||||
<td class="label"><?php echo $echouage->Getzone(); ?></td>
|
||||
<td class="label"><?php echo $echouage->Getnombre(); ?></td>
|
||||
<td class="label"><a href="delete.php/?id=<?php echo $echouage->Getid(); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
|
||||
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
|
||||
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
|
||||
</svg></a>
|
||||
<!-- TODO change destination -->
|
||||
<td class="id"><a href="info-echouage.php/?id=<?php echo $alert->getId(); ?>"><?php echo $alert->getId(); ?></a></td>
|
||||
<td class="id"><?php echo $alert->getDateAlerte(); ?></td>
|
||||
<td class="label"><?php echo $alert->getAlerteName(); ?></td>
|
||||
<td class="label"><?php echo $alert->getDeviceProduct(); ?></td>
|
||||
<td class="label"><?php echo $alert->getSourceAddress(); ?></td>
|
||||
<td class="label"><?php echo $alert->getEventGravite(); ?></td>
|
||||
<td class="label"><a href="delete.php/?id=<?php echo $alert->Getid(); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
|
||||
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" />
|
||||
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
|
||||
</svg></a>
|
||||
</td>
|
||||
<td class="label"><a href="edit.php/?id=<?php echo $echouage->Getid(); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
|
||||
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
|
||||
</svg></a>
|
||||
<td class="label"><a href="edit.php/?id=<?php echo $alert->getId(); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
|
||||
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z" />
|
||||
</svg></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@ -134,7 +127,7 @@ $db = new Database();
|
||||
</table>
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
|
||||
|
||||
<?php
|
||||
$nb_echouage = $db->getnbAlerts();
|
||||
$nb_page = ceil($nb_echouage / 20);
|
||||
@ -143,7 +136,10 @@ $db = new Database();
|
||||
} else {
|
||||
$page = 1;
|
||||
}
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=1'>premiere page</a></li>";
|
||||
|
||||
if ($nb_page > 1) {
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=1'>première page</a></li>";
|
||||
}
|
||||
|
||||
if ($page > 1) {
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=" . strval($page - 1) . "'>" . strval($page - 1) . "</a></li>";
|
||||
@ -154,16 +150,18 @@ $db = new Database();
|
||||
if (($page) < $nb_page) {
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=" . strval($page + 1) . "'>" . strval($page + 1) . "</a></li>";
|
||||
}
|
||||
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=" . strval($nb_page) . "'>derniere page</a></li>";
|
||||
if ($nb_page > 1) {
|
||||
echo "<li class='page-item col-auto'><a class='page-link' href=index.php?page=" . strval($nb_page) . "'>dernière page</a></li>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@ -176,7 +174,7 @@ $db = new Database();
|
||||
|
||||
<footer class="py-5 bg-dark">
|
||||
<div class="container px-4">
|
||||
<p class="m-0 text-center text-white">Copyright © CIR2 2023/<a class ="text-white" href="https://www.observatoire-pelagis.cnrs.fr/">Pelagis</a></p>
|
||||
<p class="m-0 text-center text-white">Copyright © CIR2 2023/<a class="text-white" href="https://www.observatoire-pelagis.cnrs.fr/">Pelagis</a></p>
|
||||
</div>
|
||||
</footer><!-- Bootstrap core JS-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script><!-- Core theme JS-->
|
||||
|
39
web/tmp.html
Normal file
39
web/tmp.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!-- filtres -->
|
||||
<form class="row g-3" method="POST">
|
||||
|
||||
<div class="col-auto">
|
||||
<select class="form-select" aria-label="Choisir une date" name="date">
|
||||
<option selected value="">Année</option>
|
||||
<?php for ($i = 1990; $i < 2020; $i++) : ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<select class="form-select" aria-label="Chosisir une gravité" name="gravité">
|
||||
<option selected value="">Gravité</option>
|
||||
<?php
|
||||
$especesByType = $db->getAlertsByGravite();
|
||||
foreach ($especesByType as $espece) : ?>
|
||||
<option value="<?php echo $espece->Getespece(); ?>"><?php echo $espece->Getespece(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-auto">
|
||||
<select class="form-select" aria-label="Chosisir une zone" name="zone">
|
||||
<option selected value="">Zone</option>
|
||||
|
||||
<?php
|
||||
// $zonesEchouage = $db->getZonesEchouage();
|
||||
// foreach ($zonesEchouage as $zone) : ?>
|
||||
<option value="<?php //echo $zone->Getzone(); ?>"><?php// echo $zone->Getzone(); ?></option>
|
||||
<?php //endforeach; ?>
|
||||
</select>
|
||||
</div> -->
|
||||
|
||||
<div class="col-auto ms-auto me-0">
|
||||
<button type="submit" class="btn btn-primary mb-3">Filtrer</button>
|
||||
</div>
|
||||
</form>
|
Reference in New Issue
Block a user