Beispiel #1
0
<table class="table table-striped">
              <thead>
                <tr>
                  <th>Id</th>
                  <th>Nom</th>
                  <th>Prénom</th>
                  <th>Email</th>
                  <th>Login</th>
                  <th>Modifier</th>
                  <th>Supprimer</th>
                </tr>
              </thead>
              <tbody>
                <?php 
$u = new utilisateurs();
$req = "SELECT * FROM utilisateurs\n                      \t\t  WHERE nom LIKE '%" . $rech . "%' \n                      \t\t  OR pnom LIKE '%" . $rech . "%'\n                      \t\t  OR login LIKE '%" . $rech . "%'";
$tab = $u->Liste($req);
foreach ($tab as $key => $ligne) {
    ?>
                       <tr>
                         <td><?php 
    echo $ligne["id"];
    ?>
</td>
                         <td><?php 
    echo $ligne["nom"];
    ?>
</td>
                         <td><?php 
    echo $ligne["pnom"];
Beispiel #2
0
<?php

include "../../0-config/config.php";
if ($_GET["action"] == 1) {
    $mode = 1;
}
if ($_GET["action"] == 2) {
    $mode = 2;
}
if ($mode == 2) {
    $u = new utilisateurs();
    $u->id = $_GET["id"];
    $u->Charger();
    //var_dump($u);
}
?>
<!DOCTYPE html>
<html lang="fr">
    
  <body>
<?php 
Entete();
?>
    <?php 
Menu(2);
?>

    <h1>GESTION <small>Utilisateurs</small>
     <?php 
if ($mode == 1) {
    echo '<span class="label label-info">Ajout</span>';
Beispiel #3
0
<?php

include "0-config/config.php";
if (count($_POST) > 0) {
    $u = new utilisateurs();
    $u->login = $_POST["login"];
    $u->mdp = $_POST["mdp"];
    $u->Valider();
    header("Location: index.php");
}
if (isset($_GET["action"]) && $_GET["action"] == "deco") {
    unset($_SESSION["valid"]);
}
?>
<!DOCTYPE html>
<html lang="fr">
  <?php 
Entete();
?>
  <body>
    

    <div class="container">
    	<div class="row">
    		<div class="col-md-12">
    			<h1>Page de Connexion</h1>
 				<form method="POST" action="connexion.php">
 					<label>Login</label>
 					<input type="text" name="login" class="form-control">

 					<label>Mot de passe</label>
Beispiel #4
0
<?php

include "../../0-config/config.php";
$action = $_GET["action"];
//Verification mode ajout
if ($action == 1) {
    $u = new utilisateurs();
    $u->nom = $_POST["nom"];
    $u->pnom = $_POST["pnom"];
    $u->email = $_POST["email"];
    $u->login = $_POST["login"];
    $u->mdp = $_POST["mdp"];
    $u->Ajouter();
    echo $u->nom . " " . $u->pnom;
    unset($u);
}
if ($action == 2) {
    $u = new utilisateurs();
    $u->id = $_POST["id"];
    $u->Changer();
    $u->nom = $_POST["nom"];
    $u->pnom = $_POST["pnom"];
    $u->email = $_POST["email"];
    $u->login = $_POST["login"];
    $u->mdp = $_POST["mdp"];
    $u->Modifier();
    unset($u);
}