Bouton déconnexion
This commit is contained in:
parent
ac167feda5
commit
775bc341df
application
@ -15,7 +15,7 @@ class Albums extends CI_Controller {
|
||||
'albums' => $albums,
|
||||
'is_logged_in' => $is_logged_in
|
||||
);
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/header',$data);
|
||||
$this->load->view('albums_list', $data);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
<h5>Albums list</h5>
|
||||
<section class="list">
|
||||
|
||||
<?php if ($is_logged_in): ?>
|
||||
<?php if (isset($is_logged_in) && $is_logged_in): ?>
|
||||
<h1>Connecté</h1>
|
||||
<a href="<?= site_url('connect/logout') ?>">Déconnexion</a>
|
||||
<?php else: ?>
|
||||
<h1>Non connecté</h1>
|
||||
<a href="<?= site_url('connect/login') ?>">Connexion</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
@ -7,7 +7,6 @@
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
|
||||
/>
|
||||
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<?= link_tag('assets/style.css') ?>
|
||||
</head>
|
||||
@ -28,4 +27,6 @@
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user