From 320a5ecc2e1105261889bd7f677e39ca8713fc97 Mon Sep 17 00:00:00 2001 From: Lab 8916100448256 Date: Thu, 12 Nov 2020 18:48:45 +0100 Subject: [PATCH] Fix #9 --- add_inscription.php | 15 +++++++++------ create_tables.sql | 20 +++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/add_inscription.php b/add_inscription.php index fb4c1ca..24c15e6 100644 --- a/add_inscription.php +++ b/add_inscription.php @@ -41,17 +41,20 @@ $letype = mysqli_insert_id($connect); else $letype = $_POST['type']; */ + $queradd = "INSERT INTO planning SET jour='".$_POST['jour']."', heure='".$_POST['heure']."', heurefin='".$_POST['heurefin']."', - theme='3', intervenant='".$lacle."', titre='".securitsearch($_POST['titre'])."', description='".securitsearch($_POST['description'])."', - valid='1', - type='1', - online='1'"; +-- theme='3', -- default null +-- valid='1', -- default 1 +-- type='1', -- default null +-- onoff='0', -- default 0 + online='1' +"; $resultadd = mysqli_query($connect,$queradd); $fiche = mysqli_insert_id($connect); @@ -65,7 +68,7 @@ else $letype = $_POST['type']; $resultad1 = mysqli_query($connect,$querad1); } -envoiunmail("brunomv@hotmail.fr","TdC inscription en ligne","".$_POST['titre'].", intervention de : ".$_POST['prenom']." ".$_POST['nom'].""); +envoiunmail("person-to-notify@domain.tld","[Prog] Inscription en ligne","".$_POST['titre']."\nIntervention de : ".$_POST['prenom']." ".$_POST['nom'].""); header("location: inscription.php?m=1"); -?> \ No newline at end of file +?> diff --git a/create_tables.sql b/create_tables.sql index 2ce184f..60bf21e 100644 --- a/create_tables.sql +++ b/create_tables.sql @@ -52,21 +52,23 @@ CREATE TABLE `planning` ( `jour` tinyint(5) NOT NULL, `heure` varchar(5) NOT NULL, `heurefin` varchar(5) NOT NULL, - `lieu` int(5) NOT NULL, - `theme` int(5) NOT NULL, + `lieu` int(5), + `theme` int(5), `intervenant` int(11) NOT NULL, `titre` varchar(255) NOT NULL, `description` text NOT NULL, - `valid` tinyint(3) NOT NULL, - `onoff` tinyint(3) NOT NULL, - `type` int(5) NOT NULL, - `referent` int(5) NOT NULL, - `secretaire` int(5) NOT NULL, - `rapporteur` int(5) NOT NULL, - `online` int(5) NOT NULL + `valid` tinyint(3) NOT NULL DEFAULT 1, + `onoff` tinyint(3) NOT NULL DEFAULT 0, + `type` int(5), + `referent` int(5), + `secretaire` int(5), + `rapporteur` int(5), + `online` int(5) NOT NULL DEFAULT 1 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + -- -- Structure de la table `rapporteur` --