Browse Source

bugfix

master
n0m1s 10 years ago
parent
commit
c5d6f07525
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      eventAdded.php

+ 6
- 3
eventAdded.php View File

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

Loading…
Cancel
Save