|
|
|
@ -1,7 +1,10 @@ |
|
|
|
<?php |
|
|
|
session_start(); |
|
|
|
include_once('databaseOperations.php'); |
|
|
|
include('datetimeOperations.php'); |
|
|
|
$db = connect(); |
|
|
|
if(isset($_POST['id'])) |
|
|
|
$id = intval($_POST['id']); |
|
|
|
$titre = htmlentities($_POST['title']); |
|
|
|
$localisation = htmlentities($_POST['address']); |
|
|
|
$dtstart = strtotime($_POST['dtstart']); |
|
|
|
@ -11,10 +14,10 @@ $url = $_POST['site']; |
|
|
|
$urlImage = $_POST['urlImage']; |
|
|
|
$contact = $_POST['contact']; |
|
|
|
$catArray = $_POST['chk_group']; |
|
|
|
if(!isset($_POST['id']) |
|
|
|
addEvent($db, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); |
|
|
|
if(!isset($_POST['id'])) |
|
|
|
addEvent($db, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); |
|
|
|
else |
|
|
|
updateEvent($db, $id, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); |
|
|
|
updateEvent($db, $id, $titre, $catArray, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); |
|
|
|
header('Location:./'); |
|
|
|
exit; |
|
|
|
?>
|