commit
4516560c70
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
class Validation {
|
||||
|
||||
static function val_form_texte(&$texte, &$TMessage) {
|
||||
if (!isset($texte)||$texte=="") {
|
||||
$TMessage[] ="Empty fields";
|
||||
$texte="";
|
||||
}
|
||||
|
||||
if ($texte != filter_var($texte, FILTER_SANITIZE_STRING))
|
||||
{
|
||||
$TMessage[]="Attempt to inject code (security attack)";
|
||||
$texte="";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static function val_form_mdp(&$mdp, &$TMessage) {
|
||||
if (!isset($mdp)||$mdp=="") {
|
||||
$TMessage[] ="Password not specified";
|
||||
$mdp="";
|
||||
}
|
||||
|
||||
if ($mdp != filter_var($mdp, FILTER_SANITIZE_SPECIAL_CHARS))
|
||||
{
|
||||
$TMessage[] ="Password must not contain special characters";
|
||||
$mdp="";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
require_once("config/config.php");
|
||||
require("config/config.php");
|
||||
require('config/Validation.php');
|
||||
require("view/erreur.php");
|
||||
require_once("controller/FrontCtrl.php");
|
||||
//var_dump($_GET);
|
||||
$fc = new FrontCtrl($con);
|
||||
|
||||
$fc = new FrontCtrl($con, $TabVues);
|
||||
?>
|
||||
|
||||
|
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="../view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenu de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<center>
|
||||
<div class="col-lg-4 mb-5 mb-lg-0 text-center">
|
||||
<div>
|
||||
<div class="rounded-5 shadow-3-soft p-4" style="background-color: #fff9f2">
|
||||
<div class="border-top border-dark mx-auto" style="width: 100px"></div>
|
||||
<p class="text-muted mt-4 mb-2">2Do</p>
|
||||
<p class="h5 mb-4" style="color: #344e41">A PHP project</p>
|
||||
<p class="pb-4 mb-4">
|
||||
A little PHP project realised by two french students studying Computer Science at the IUT of
|
||||
Clermont Auvergne in France. The main goal of this project was to create a little To Do List
|
||||
using the PHP language. We hope that you will find it useful.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="../view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
||||
crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
foreach($TMessage as $err) {
|
||||
echo '<div class="alert alert-danger alert-dismissible d-flex align-items-center fade show">
|
||||
<i class="bi-exclamation-octagon-fill"></i>
|
||||
<strong class="mx-2">Error!</strong>' . $err . "</div>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="../view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<h4 class="text-center my-3 pb-3">New Task</h4>
|
||||
<form>
|
||||
<div class="form-outline mb-4 align-items-center">
|
||||
<input type="title" id="form2title" class="form-control" required minlength="0" maxlength="250"/>
|
||||
<label class="form-label" for="form2title">Title</label>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<input type="text" id="form2description" class="form-control" minlength="0" maxlength="250">
|
||||
<label class="form-label" for="form2description">Description</label>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<input type="date" id="form2dateDeb" class="form-control">
|
||||
<label class="form-label" for="form2dateDeb">Starting date</label>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<input type="date" id="form2dateFin" class="form-control">
|
||||
<label class="form-label" for="form2dateFin">Ending date</label>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<input type="text" id="form2importance" class="form-control" />
|
||||
<label class="form-label" for="form2importance">Importance</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
<button type="button" class="btn btn-primary btn-block mb-4" action="connecter">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="../view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue