J ai mis un navbar sur la page Home

pull/11/head
Emre KARTAL 2 years ago
parent fdc0578914
commit 2f754ae7a8

@ -1,6 +1,6 @@
<?php
namespace controleur;
namespace Controller;
class Controleur {
@ -16,7 +16,10 @@ session_start();
$dVueEreur = array ();
try{
$action=$_REQUEST['action'];
$action=NULL;
if(isset($_REQUEST['action'])){
$action = $_REQUEST["action"];
}
switch($action) {
@ -30,10 +33,22 @@ case "validationFormulaire":
$this->ValidationFormulaire($dVueEreur);
break;
case "redirectionLogin":
$this->redirectionLogin($dVueEreur);
break;
case "redirectionInscription":
$this->redirectionInscription($dVueEreur);
break;
case "seConnecter":
$this->seConnecter($dVueEreur);
break;
//mauvaise action
default:
$dVueEreur[] = "Erreur d'appel php";
require ($rep.$vues['vuephp1']);
require ($rep.$vues['home']);
break;
}
@ -63,7 +78,7 @@ $dVue = array (
'nom' => "",
'age' => 0,
);
require ($rep.$vues['vuephp1']);
require ($rep.$vues['Home']);
}
function ValidationFormulaire(array $dVueEreur) {
@ -83,9 +98,32 @@ $dVue = array (
'age' => $age,
'data' => $data,
);
require ($rep.$vues['vuephp1']);
require ($rep.$vues['inscription']);
}
function redirectionLogin(array $dVueEreur) {
global $rep,$vues;
require ($rep.$vues['login']);
}
function redirectionInscription(array $dVueEreur) {
global $rep,$vues;
require ($rep.$vues['inscription']);
}
function seConnecter(array $dVueEreur) {
global $rep,$vues;
//si exception, ca remonte !!!
$mail=$_POST['mail']; // txtNom = nom du champ texte dans le formulaire
$password=$_POST['password'];
\config\Validation::val_connection($nom,$age,$dVueEreur);
require ($rep.$vues['login']);
}
}//fin class
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@ -1,89 +0,0 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* HEADER */
.main-head{
background: #9AF7FF;
color: #ffffff;
}
a{
font-family: JetBrains Mono,Menlo,Droid Sans Mono,monospace;
}
nav{
min-height: 10vh;
display: flex;
}
nav ul{
display: flex;
flex: 1 1 40rem;
justify-content: space-around;
}
.main-logo img{
flex: 1 1 40rem;
}
/*Réseau sociaux*/
.social {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.social a {
display: inline-block;
width: 20%;
height: 30%;
padding: 35%;
border-radius: 40%;
align-items: center;
justify-content: center;
color: white;
position: relative;
flex-shrink: 0;
transition: all .2s;
}
@media screen and (min-width: 768px) {
.social a:hover {
transform: scale(1.2) translateY(-5px);
}
}
.social a.facebook {
padding-top: 2%;
padding-left: 4%;
background: linear-gradient(45deg, #3b5998,#0078d7);
box-shadow: 0 4px 30px rgba(45, 98, 169, 1);
}
.social a.twitter {
padding-top: 2%;
padding-left: 4%;
background: linear-gradient(45deg, #1da1f2,#0e71c8);
box-shadow: 0 4px 30px rgba(19, 127, 212, 1);
}
.social a.instagram {
padding-top: 2%;
padding-left: 4%;
background: linear-gradient(45deg, #405de6,#5851db,#833ab4,#c13584,#e1306c,#fd1d1d);
box-shadow: 0 4px 30px rgba(120, 64, 190, 0.8);
}
.social a.gitlab {
padding-top: 2%;
padding-left: 4%;
background: linear-gradient(45deg, #FF9467,#DB4100);
box-shadow: 0 4px 30px rgba(255,148,103, 0.6);
}

@ -12,6 +12,10 @@ body::before {
z-index: -1;
}
.form-redirection{
margin-top: -25px;
}
.main-logo{
display: flex;
flex-direction: column;
@ -20,66 +24,6 @@ body::before {
align-items: center;
}
.text-box {
display: flex;
align-items: flex-start;
justify-content: flex-end;
}
.btn:link,
.btn:visited {
text-transform: uppercase;
text-decoration: none;
padding: 10px 15px;
display: inline-block;
border-radius: 100px;
font-size: 60%;
transition: all .2s;
position: absolute;
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btn:active {
transform: translateY(-1px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.btn-white {
background-color: #fff;
color: #777;
}
.btn::after {
content: "";
display: inline-block;
height: 100%;
width: 100%;
border-radius: 100px;
position: absolute;
top: 0;
left: 0;
z-index: -1;
transition: all .4s;
}
.btn-white::after {
background-color: #fff;
}
.btn:hover::after {
transform: scaleX(1.5) scaleY(1.7);
opacity: 0;
}
.btn-animated {
animation: moveInBottom 5s ease-out;
animation-fill-mode: backwards;
}
.main-logo img{
width: 50%;
}

@ -1,4 +1,4 @@
@import url("reset.css");
@import url("./Vue/css/reset.css");
@import url('https://fonts.googleapis.com/css2?family-Poppins:wght@400;600&display-swap');
@ -23,69 +23,6 @@ body::before {
z-index: -1;
}
/*Bouton*/
.btn{
display: flex;
flex-direction: column;
margin-left: 19rem;
margin-top: -25rem;
}
.btn:link,
.btn:visited {
text-decoration: none;
padding: 5px 10px;
display: inline-block;
border-radius: 11px;
font-size: 70%;
transition: all .2s;
position: absolute;
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btn:active {
transform: translateY(-1px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.btn-white {
background-color: #fff;
color: #777;
}
.btn::after {
content: "";
display: inline-block;
height: 100%;
width: 100%;
border-radius: 50px;
position: absolute;
top: 0;
left: 0;
z-index: -1;
transition: all .4s;
}
.btn-white::after {
background-color: #fff;
}
.btn:hover::after {
transform: scaleX(1.5) scaleY(1.7);
opacity: 0;
}
.btn-animated {
animation: moveInBottom 5s ease-out;
animation-fill-mode: backwards;
}
/* Model */
.model {

@ -1,18 +0,0 @@
<html>
<head><title>Erreur</title>
</head>
<body>
<h1>ERREUR !!!!!</h1>
<?php
if (isset($dVueEreur)) {
foreach ($dVueEreur as $value){
echo $value;
}
}
?>
</body> </html>

@ -1,58 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<link rel="shortcut icon" href="./Vue/Images/gif.gif" type="../Images/gif">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Page</title>
<link rel="stylesheet" href="../css/home.css">
<link rel="stylesheet" href="../css/reset.css" />
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>
<body>
<header class="main-head">
<nav>
<div class="main-logo">
<img src="../Images/Logo.png" alt="logo">
</div>
<ul>
<li>
<a href="login.html">Se connecter</a>
</li>
<li>
<a>Profil</a>
</li>
</ul>
<div class="social">
<a href="#" class="facebook">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-facebook" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3"></path>
</svg>
</a>
<a href="#" class="twitter">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-twitter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"></path>
</svg>
</a>
<a href="#" class="instagram">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-instagram" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="4" y="4" width="16" height="16" rx="4"></rect>
<circle cx="12" cy="12" r="3"></circle>
<line x1="16.5" y1="7.5" x2="16.5" y2="7.501"></line>
</svg>
</a>
<a href="#" class="gitlab">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-gitlab" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M21 14l-9 7l-9 -7l3 -11l3 7h6l3 -7z"></path>
</svg>
</a>
</div>
</nav>
</header>
<nav class="navbar navbar-expand-lg bg-info justify-content-between">
<img src="./Vue/Images/LogoForHome.png" width="200">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<form method="post">
<button type="submit" class="btn btn-outline-primary">Profil</Button>
<input type="hidden" name="action" value="redirectionLogin">
</form>
<form method="post">
<button type="submit" class="btn btn-outline-primary">Mes tâches</Button>
<input type="hidden" name="action" value="">
</form>
<form method="post">
<button type="submit" class="btn btn-outline-primary">Les tâches publics</Button>
<input type="hidden" name="action" value="">
</form>
</div>
</div>
</nav>
</body>
</html>

@ -2,42 +2,42 @@
<html>
<head>
<title>Page d'inscription</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../css/inscription.css">
<script type="text/javascript" src="../javaScript/inscription.js" defer></script>
<link rel="stylesheet" href="./Vue/css/inscription.css">
<script type="text/javascript" src="./Vue/javaScript/inscription.js" defer></script>
</head>
<body>
<div class="text-box">
<a href="login.html" class="btn btn-white btn-animate">Revenir</a>
</div>
<div class="main-logo">
<img src="../Images/Logo.png" alt="logo">
<form method="post" class="form-redirection">
<Button type="submit">Revenir</Button>
<input type="hidden" name="action" value="redirectionLogin">
</form>
<img src="./Vue/Images/Logo.png" alt="logo">
<h1>Inscription</h1>
</div>
<form>
<ul class="items"></ul>
<fieldset class="username enable">
<div class="icon left"><i class="user"></i></div>
<input type="text" name="username" placeholder="Username"/>
<input type="text" name="usernameForm" placeholder="Username"/>
<div class="icon right button"><i class="arrow"></i></div>
</fieldset>
<fieldset class="email">
<div class="icon left"><i class="letter"></i></div>
<input type="mail" name="email" placeholder="Email"/>
<input type="mail" name="mailForm" placeholder="Email"/>
<div class="icon right button"><i class="arrow"></i></div>
</fieldset>
<fieldset class="password">
<div class="icon left"><i class="lock"></i></div>
<input type="password" name="password" placeholder="Password"/>
<input type="password" name="passwordForm" placeholder="Password"/>
<div class="icon right button"><i class="arrow"></i></div>
</fieldset>

@ -3,23 +3,24 @@
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="../Images/gif.gif" type="../Images/gif">
<link rel="shortcut icon" href="./Vue/Images/gif.gif" type="../Images/gif">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="./Vue/css/style.css">
<link rel="stylesheet" href="./Vue/css/reset.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,300,0,0" />
</head>
<body>
<div class="text-box">
<a href="index.html" class="btn btn-white btn-animate">Rentrer quand même</a>
</div>
<div class="main">
<form method="post" >
<Button type="submit">Entrer quand même</Button>
<input type="hidden" name="action" value="redirectionInscription">
</form>
<div class="model">
<div class="main-logo">
<img src="../Images/Logo.png" alt="logo">
<img src="./Vue/Images/Logo.png" alt="logo">
</div>
<div class="login-card-header">
<h1>Se Connecter</h1>
@ -27,11 +28,11 @@
<form class="login-card-form">
<div class="form-item">
<span class="form-item-icon material-symbols-rounded">mail</span>
<input type="text" placeholder="Enter Mail" required autofocus>
<input type="text" name="mail" placeholder="Enter Mail" required autofocus>
</div>
<div class="form-item">
<span class="form-item-icon material-symbols-rounded">lock</span>
<input type="password" placeholder="Enter Password" required >
<input type="password" name="password" placeholder="Enter Password" required >
</div>
<div class="form-item-other">
<div class="checkbox">
@ -47,6 +48,8 @@
<a href="#">Oublie de mot de passe</a>
</div>
<button type="submit">Se connecter</button>
<!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="seConnecter">
</form>
<div class="login-card-footer">
Pas de compte? <a href="inscription.html">Creer un compte</a>

@ -1,96 +0,0 @@
<html>
<head><title>Personne - formulaire</title>
<script type="text/javascript">
function clearForm(oForm) {
var elements = oForm.elements;
oForm.reset();
for(i=0; i<elements.length; i++) {
field_type = elements[i].type.toLowerCase();
switch(field_type) {
case "text":
case "password":
case "textarea":
case "hidden":
elements[i].value = "";
break;
case "radio":
case "checkbox":
if (elements[i].checked) {
elements[i].checked = false;
}
break;
case "select-one":
case "select-multi":
elements[i].selectedIndex = -1;
break;
default:
break;
}
}
}
</script>
</head>
<body>
<?php
// on v<>rifie les donn<6E>es provenant du mod<6F>le
if (isset($dVue))
{?>
<div align="center">
<?php
if (isset($dVueEreur) && count($dVueEreur)>0) {
echo "<h2>ERREUR !!!!!</h2>";
foreach ($dVueEreur as $value){
echo $value;
}}
?>
<h2>Personne - formulaire</h2>
<hr>
<!-- affichage de donn<6E>es provenant du mod<6F>le -->
<?= $dVue['data'] ?>
<form method="post" name="myform" id"myform">
<table> <tr>
<td>Nom</td>
<td><input name="txtNom" value="<?= $dVue['nom'] ?>" type="text" size="20"></td>
</tr>
<tr><td>Age</td>
<td><input name="txtAge" value="<?= $dVue['age'] ?>" type="text" size="3" required></td>
</tr>
<tr>
</table>
<table> <tr>
<td><input type="submit" value="Envoyer"></td>
<td><input type="reset" value="Rétablir"></td>
<td><input type="button" value="Effacer" onclick="clearForm(this.form);">
</td> </tr> </table>
<!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="validationFormulaire">
</form></div>
<?php }
else {
print ("erreur !!<br>");
print ("utilisation anormale de la vuephp");
} ?>
<p>Essayez de mettre du code html dans nom -> Correspond à une attaque de type injection</p>
</body> </html>

@ -1,6 +1,5 @@
<?php
//prs0 compliant
class Autoload
{
private static $_instance = null;
@ -31,22 +30,19 @@ class Autoload
}
}
private static function _autoload($className)
private static function _autoload($class)
{
echo $className;
$folder = "./";
$className = ltrim($className, '\\');
$fileName = '';
$namespace = '';
if ($lastNsPos = strripos($className, '\\')) {
$namespace = substr($className, 0, $lastNsPos);
$className = substr($className, $lastNsPos + 1);
$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
}
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
include $folder . $fileName;
global $rep;
$filename = $class.'.php';
$dir =array('modeles/','./','config/','controleur/');
foreach ($dir as $d){
$file=$rep.$d.$filename;
//echo $file;
if (file_exists($file))
{
include $file;
}
}
}
}

@ -17,10 +17,9 @@ $mdp="achanger";
//Vues
$vues['erreur']='vues/erreur.php';
$vues['vuephp1']='vues/vuephp1.php';
$vues['inscription']='html/inscription.html';
$vues['login']='html/login.html';
$vues['profil']='html/profil.html';
$vues['inscription']='Vue/html/inscription.html';
$vues['Home']='Vue/html/index.html';
$vues['login']='Vue/html/login.html';
$vues['profil']='Vue/html/profil.html';
?>

Loading…
Cancel
Save