diff --git a/databaseOperations.php b/databaseOperations.php index 8cf6d00..861ea2d 100755 --- a/databaseOperations.php +++ b/databaseOperations.php @@ -166,7 +166,7 @@ function getCategoriesForOneEvent($db, $eventId) { try { - $request = $db->prepare('SELECT * FROM eventCategorie NATURAL JOIN categorie NATURAL JOIN sous_categorie ORDER BY sous_cat_tab ASC, sous_cat_id ASC WHERE event_id = ?'); + $request = $db->prepare('SELECT * FROM eventCategorie NATURAL JOIN categorie NATURAL JOIN sous_categorie WHERE event_id=?'); $request->execute(array($id)); $result = $request->fetch(); $request->closeCursor(); diff --git a/editEvent.php b/editEvent.php new file mode 100644 index 0000000..dadad09 --- /dev/null +++ b/editEvent.php @@ -0,0 +1,129 @@ + + + + + + Kiwi Calendar : Ajouter un évènement + + + + + + + + + + + + +
+

Modifier un Évènement

+ +
+
Titre :
+ " required> +
+
Catégories :
+
+ ".$cats[$i][1]." "; + } + ?> +
+
+
Adresse :
+ " required> +
+
Date de début :
+
+ " required> + + + +
+
+
Date de fin :
+
+ " required> + + + +
+
+
Description de l'évènement :
+ +
+
Site de l'évènement :
+ " name="site"> +
+
Image de l'évènement :
+ " name="urlImage"> +
+
Contact :
+ " name="contact"> +
+
+
+ + + + + + + + +
+ + diff --git a/event.css b/event.css index ade036c..a8e331a 100755 --- a/event.css +++ b/event.css @@ -3,6 +3,12 @@ body padding:0px; } +h1 img +{ + width:18px; + height:18px; +} + #descEvent { margin-top: 150px; diff --git a/event.php b/event.php index d3a698a..eaeefa8 100755 --- a/event.php +++ b/event.php @@ -4,7 +4,7 @@ include('datetimeOperations.php'); $db = connect(); if(!isset($_GET['id']) || !is_numeric($_GET['id'])) - header('Location:./'); +header('Location:./'); $id = htmlspecialchars($_GET['id']); @@ -15,52 +15,54 @@ $dtend = strtotime($event['event_dtend']); - - KiWi calendar : <?php echo $event["event_title"]; ?> - - - - - - - - -
-

+ + KiWi calendar : <?php echo $event["event_title"]; ?> + + + + + + + + +
+

+

-

Date et lieu

-
- -
- '.$event["event_localisation"].'
'; - $url = 'https://nominatim.openstreetmap.org/search?format=json&q='.urlencode($event["event_localisation"]); - $obj = json_decode(file_get_contents($url), true); - $lat = $obj[0]["lat"]; - $lng = $obj[0]["lon"]; - $urlFrame = 'http://www.openstreetmap.org/export/embed.html?bbox='.$lng.','.$lat.','.$lng.','.$lat.'&layer=mapnik&floor'; - echo ''; - if(isset($event["event_urlImage"]) || isset($event["event_description"])) - echo '

Description

'; - if(isset($event["event_urlImage"])) - echo '
'; - if(isset($event["event_description"])) - echo '
'.$event["event_description"].'
'; +

Date et lieu

+
+ +
+ '.$event["event_localisation"].'
'; + $url = 'https://nominatim.openstreetmap.org/search?format=json&q='.urlencode($event["event_localisation"]); + $obj = json_decode(file_get_contents($url), true); + $lat = $obj[0]["lat"]; + $lng = $obj[0]["lon"]; + $urlFrame = 'http://www.openstreetmap.org/export/embed.html?bbox='.$lng.','.$lat.','.$lng.','.$lat.'&layer=mapnik&floor'; + echo ''; - if(isset($event["event_site"]) || isset($event["event_contact"])) - echo '

Informations

'; - if(isset($event["event_site"])) - echo '
URL : '.$event["event_site"].'
'; - if(isset($event["event_contact"])) - echo '
Contact : '.$event["event_contact"].'
'; - ?> - + if(isset($event["event_urlImage"]) || isset($event["event_description"])) + echo '

Description

'; + if(isset($event["event_urlImage"])) + echo '
'; + if(isset($event["event_description"])) + echo '
'.$event["event_description"].'
'; - - + if(isset($event["event_site"]) || isset($event["event_contact"])) + echo '

Informations

'; + if(isset($event["event_site"])) + echo '
URL : '.$event["event_site"].'
'; + if(isset($event["event_contact"])) + echo '
Contact : '.$event["event_contact"].'
'; + ?> + - - + + + + + diff --git a/images/edit.png b/images/edit.png new file mode 100644 index 0000000..9efbaae Binary files /dev/null and b/images/edit.png differ