From e3454e807bf340fdd38e2ea8291c12f2de17cb80 Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 10 Mar 2016 10:30:46 +0100 Subject: [PATCH 1/4] =?UTF-8?q?transfert=20vers=20la=20homepage=20apr?= =?UTF-8?q?=C3=A8s=20l'ajout=20d'un=20=C3=A9v=C3=A8nement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eventAdded.php | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/eventAdded.php b/eventAdded.php index ba2b60a..3875122 100644 --- a/eventAdded.php +++ b/eventAdded.php @@ -12,29 +12,6 @@ $urlImage = $_POST['urlImage']; $contact = $_POST['contact']; $catArray = $_POST['chk_group']; addEvent($db, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); +header('Location:./'); +exit; ?> - - - - Kiwi Calendar : Ajouter un évènement - - - - - - - - - - -
- logo ESIR - -
- -
- Ok ! -
- - From f6e6a2df25aac4d38d9a453fb96b3dd922c44088 Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 10 Mar 2016 10:46:35 +0100 Subject: [PATCH 2/4] doxygen comment --- databaseOperations.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/databaseOperations.php b/databaseOperations.php index b99dc8d..8cf6d00 100755 --- a/databaseOperations.php +++ b/databaseOperations.php @@ -265,6 +265,19 @@ function getEventsSince($db,$date) } } +/** + * @brief add an event into the database + * @param $db: the PDO connection to the database + * @param $titre: title of the event + * @param $catArray: an array containing the categories related to this event + * @param $localisation: localisation of the event + * @param $dtstart: datetime of the beginning of the event + * @param $dtend: datetime of the end of the event + * @param $description: description of the event + * @param $url: url of the event + * @param $urlImage: url of the image of the event + * @param $contact: name of the contact + */ function addEvent($db, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact) { try From 1ce1077e992ca2d12d6fb49905b0c60c00a2e74b Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 10 Mar 2016 10:48:18 +0100 Subject: [PATCH 3/4] htmlentities --- eventAdded.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eventAdded.php b/eventAdded.php index 3875122..a7026c6 100644 --- a/eventAdded.php +++ b/eventAdded.php @@ -2,11 +2,11 @@ include_once('databaseOperations.php'); include('datetimeOperations.php'); $db = connect(); -$titre = $_POST['title']; -$localisation = $_POST['address']; +$titre = htmlentities($_POST['title']); +$localisation = htmlentities($_POST['address']); $dtstart = strtotime($_POST['dtstart']); $dtend = strtotime($_POST['dtend']); -$description = $_POST['description']; +$description = htmlentities($_POST['description']); $url = $_POST['site']; $urlImage = $_POST['urlImage']; $contact = $_POST['contact']; From 7026434c16344a48bfb47a2ca7a02ea3ea0c0f8b Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 10 Mar 2016 10:49:55 +0100 Subject: [PATCH 4/4] updated gitignore to remove test files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 177b1d6..5368a1a 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.*~ *.db +test*