diff --git a/controllers/auth_ctrl2.php b/controllers/auth_ctrl2.php index 8d7d65b..92ac25c 100644 --- a/controllers/auth_ctrl2.php +++ b/controllers/auth_ctrl2.php @@ -32,6 +32,7 @@ function verify_login_ctrl(?string $route) if ($user && password_verify($passwd, $user['passwd'])) { session_regenerate_id(true); + $_SESSION['id'] = $user['ID']; $_SESSION['login'] = $user['login']; $_SESSION['role'] = $user['type']; diff --git a/controllers/operation_ctrl.php b/controllers/operation_ctrl.php index 71fe957..62473f5 100644 --- a/controllers/operation_ctrl.php +++ b/controllers/operation_ctrl.php @@ -1,15 +1,24 @@ query($sql)->fetchAll(PDO::FETCH_ASSOC); +} + function get_sauveteurs(PDO $pdo): array { $sql = "SELECT ID, nom, prenom, specialite diff --git a/models/user_crud.php b/models/user_crud.php index 9e3e3ad..5f1d5e2 100644 --- a/models/user_crud.php +++ b/models/user_crud.php @@ -4,7 +4,7 @@ function recuperation_auth(PDO $connex, string $login):?array { require_once('config/config.php'); - $req = "SELECT login, passwd, type FROM Utilisateur WHERE login = :login"; + $req = "SELECT ID, login, passwd, type FROM Utilisateur WHERE login = :login"; $prep = $connex->prepare($req); $prep->bindValue(':login', $login); diff --git a/views/contact_views.php b/views/contact_views.php index 521eab2..8778c19 100644 --- a/views/contact_views.php +++ b/views/contact_views.php @@ -1,6 +1,11 @@ -

Ajout de personnes

+ + +

Ajout d'un sauveteur

diff --git a/views/header.php b/views/header.php index 752cd12..022ac11 100644 --- a/views/header.php +++ b/views/header.php @@ -8,7 +8,7 @@ if (is_logged()) { $nav .= '

  • Accueil
  • '; if (has_any_role(['gestionnaire', 'administration'])) { - $nav .= '
  • Opérations
  • '; + $nav .= '
  • Missions
  • '; } if (has_role('administration')) { diff --git a/views/operations_view.php b/views/operations_view.php index 9ac8fc5..72b6cff 100644 --- a/views/operations_view.php +++ b/views/operations_view.php @@ -1,14 +1,41 @@ -

    Création d'une opération

    +

    Assigner une mission

    - + +

    + + +

    + +

    + + +

    + +

    + + +

    +

    @@ -16,18 +43,31 @@

    - +

    - - +

    - + +

    + +

    +

    - \ No newline at end of file +