connexion presque finie
This commit is contained in:
32
application/views/create.php
Normal file
32
application/views/create.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?=validation_errors(); ?>
|
||||
<?=form_open('connect/create')?>
|
||||
<!-- Grid -->
|
||||
<div class="grid">
|
||||
|
||||
<label for="prenom">
|
||||
Prénom
|
||||
<input type="text" id="prenom" name="prenom" placeholder="Prénom" value="<?=set_value('prenom')?>" required>
|
||||
</label>
|
||||
|
||||
<label for="nom">
|
||||
Nom
|
||||
<input type="text" id="nom" name="nom" placeholder="Nom" value="<?=set_value('nom')?>" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label for="email">Adresse mail</label>
|
||||
<input type="email" id="email" name="email" placeholder="Email" value="<?=set_value('email')?>" required>
|
||||
|
||||
<div class="grid">
|
||||
<label for="password">Password
|
||||
<input type="password" id="password" name="password" placeholder="Password" value="<?=set_value('password')?>" required>
|
||||
</label>
|
||||
|
||||
<label for="cpassword">Confirmation password
|
||||
<input type="password" id="cpassword" name="cpassword" placeholder="Confirmation Password" value="<?=set_value('cpassword')?>" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Button -->
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
@@ -2,7 +2,7 @@
|
||||
<html lang="en" class="has-navbar-fixed-top">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>MUSIC APP</title>
|
||||
<title>Dix heures</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
|
||||
@@ -13,13 +13,19 @@
|
||||
</head>
|
||||
<body>
|
||||
<main class='container'>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><strong>Music APP</strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><?=anchor('albums','Albums');?></li>
|
||||
<li><?=anchor('artistes','Artistes');?></li>
|
||||
<li><?=anchor('playlist','Playlist');?></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><strong>Dix heures</strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><?=anchor('albums','Albums');?></li>
|
||||
<li><?=anchor('artistes','Artistes');?></li>
|
||||
<li><?=anchor('playlist','Playlist');?></li>
|
||||
<?php if ($this->session->userdata('user_id')): ?>
|
||||
<li><?=anchor('connect/logout','Déconnexion');?></li>
|
||||
<?php else: ?>
|
||||
<li><?=anchor('connect/login','Connexion');?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html lang="en" class="has-navbar-fixed-top">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>MUSIC APP</title>
|
||||
<title>Dix heures</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
|
||||
@@ -15,11 +15,12 @@
|
||||
<main class='container'>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><strong>Music APP</strong></li>
|
||||
<li><strong>Dix heures</strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><?=anchor('albums','Albums');?></li>
|
||||
<li><?=anchor('artistes','Artistes');?></li>
|
||||
<li><?=anchor('playlist','Playlist');?></li>
|
||||
<li><?=anchor('connect','Connexion');?></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
21
application/views/login.php
Normal file
21
application/views/login.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?=validation_errors(); ?>
|
||||
|
||||
<?php if (isset($error)): ?>
|
||||
<p style="color: red;"><?= $error ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?=form_open('connect/login')?>
|
||||
<!-- Grid -->
|
||||
<div class="grid">
|
||||
<label for="email">Adresse mail</label>
|
||||
<input type="email" id="email" name="email" placeholder="Email" value="<?=set_value('email')?>" required>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" placeholder="Password" value="<?=set_value('password')?>" required>
|
||||
</div>
|
||||
<!-- Button -->
|
||||
<button type="submit">Submit</button>
|
||||
|
||||
<?=anchor('connect/create', "Pas de compte ? Créez-en un !");?>
|
||||
|
||||
</form>
|
29
application/views/logout.php
Normal file
29
application/views/logout.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en" class="has-navbar-fixed-top">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Dix heures</title>
|
||||
<link 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>
|
||||
<body>
|
||||
<main class='container'>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><strong>Dix heures</strong></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><?=anchor('albums','Albums');?></li>
|
||||
<li><?=anchor('artistes','Artistes');?></li>
|
||||
<li><?=anchor('playlist','Playlist');?></li>
|
||||
<li><?=anchor('connect/login','Connexion');?></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<p>Vous êtes déconnecté.</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user