Browse Source

Merge remote-tracking branch 'origin/master'

master
n0m1s 10 years ago
parent
commit
8e12fe9de4
4 changed files with 95 additions and 7 deletions
  1. +87
    -0
      addEvent.php
  2. +2
    -2
      index.php
  3. +1
    -5
      makedatabase.sql
  4. +5
    -0
      populateDatabase.sql

+ 87
- 0
addEvent.php View File

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<title>Kiwi Calendar : Ajouter un évènement</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./main.css" />
<link rel="stylesheet" href="./event.css" />
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen"
href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css">
<link rel="icon" type="image/png" href="favicon.png" />
<!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /><![endif]-->
</head>
<body>
<header id="title">
<img alt="logo ESIR" src="./images/esir.png" />
<a href="./index.php"><img class="rightLogo" alt="logo Kiwi" src="./images/KiWiCalendar.png" /></a>
</header>
<div id="descEvent">
<h1>Ajouter un Évènement</h1>
<form name="eventForm">
Titre de l'évènement :<br>
<input type="text" name="title">
<br>
Adresse du lieu :<br>
<input type="text" name="address">
<br>
Date de début :<br>
<div id="datetimepicker" class="input-append date">
<input type="text" name="dtstart"></input>
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
</span>
</div>
<br>
Date de fin :<br>
<div id="datetimepicker2" class="input-append date">
<input type="text" name="dtend"></input>
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
</span>
</div>
<br>
Description de l'évènement :<br>
<textarea name="description" rows="4" cols="50" form="eventForm">
</textarea>
<br>
Site de l'évènement :<br>
<input type="url" value="http://" name="site">
<br>
Image de l'évènement :<br>
<input type="url" value="http://" name="urlImage">
<br>
Contact :<br>
<input type="text" name="contact">
</form>
<button id="submit">Ajouter l'évènement !</button>
<script type="text/javascript"
src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script type="text/javascript"
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
</script>
<script type="text/javascript"
src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min.js">
</script>
<script type="text/javascript"
src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.pt-BR.js">
</script>
<script type="text/javascript">
$('#datetimepicker').datetimepicker({
format: 'dd/MM/yyyy hh:mm:ss',
language: 'pt-BR'
});
$('#datetimepicker2').datetimepicker({
format: 'dd/MM/yyyy hh:mm:ss',
language: 'pt-BR'
});
</script>
</div>
</body>
</html>

+ 2
- 2
index.php View File

@ -72,7 +72,7 @@ else
}
?>
</form>
<a id="ancherEvent" href="#addEvent" onclick="alert('Ajoute un evenement');">
<a id="ancherEvent" href="./addEvent.php">
<div class="Button" id="AddEvent">
+ Ajouter un Évènement
</div>
@ -119,7 +119,7 @@ else
<ul>');
foreach($events as $event)
echo('<li class="calendar-link"><a href="./event.php?id='.$event['event_id'].'">'.$event['event_titre']."</a></li>");
echo('<li class="calendar-link"><a href="./event.php?id='.$event['event_id'].'">'.$event['event_title']."</a></li>");
echo('
</ul>
</li>');


+ 1
- 5
makedatabase.sql View File

@ -1,11 +1,7 @@
-- categorie of the categorie
CREATE TABLE sous_categorie(sous_cat_id INTEGER PRIMARY KEY, sous_cat_tab INTEGER NOT NULL, sous_cat_titre VARCHAR(255) NOT NULL);
-- categorie of the event
CREATE TABLE categorie(cat_id INTEGER PRIMARY KEY, cat_titre VARCHAR(255) NOT NULL, sous_cat_id INTEGER NOT NULL, FOREIGN KEY(sous_cat_id) REFERENCES sous_categorie(sous_cat_id));
-- event
CREATE TABLE event(event_id INTEGER PRIMARY KEY, event_titre VARCHAR(255) NOT NULL, event_localisation VARCHAR(255) NOT NULL, event_dtstart DATETIME NOT NULL, event_dtend DATETIME NOT NULL, event_description TEXT NOT NULL, event_url VARCHAR(255) NULL);
CREATE TABLE event(event_id INTEGER PRIMARY KEY, event_title VARCHAR(255) NOT NULL, event_localisation VARCHAR(255) NOT NULL, event_dtstart DATETIME NOT NULL, event_dtend DATETIME NOT NULL, event_description TEXT NOT NULL, event_url VARCHAR(255), event_urlImage VARCHAR(255), event_contact VARCHAR(255));
-- table joining events to its categorie
CREATE TABLE eventCategorie(event_id INTEGER, cat_id INTEGER, FOREIGN KEY(event_id) REFERENCES event(event_id), FOREIGN KEY(cat_id) REFERENCES categorie(cat_id));

+ 5
- 0
populateDatabase.sql View File

@ -17,3 +17,8 @@ INSERT INTO categorie(sous_cat_id, cat_titre) VALUES(1, "Association de défence
INSERT INTO sous_categorie(sous_cat_id, sous_cat_tab, sous_cat_titre) VALUES(2,1, "Associations");
INSERT INTO categorie(sous_cat_id, cat_titre) VALUES(2, "Labfab");
INSERT INTO event VALUES (1, "Porte Ouverte Inria", "INRIA Rennes", "2015-12-10", "2015-12-10", "L'Inria ouvre ses portes aux étudiants !", "http://po.irisa.fr/", "http://www.lirmm.fr/DEMAR/images/inria_corpo_rvb.jpg", "contact@irisa.fr");
INSERT INTO event VALUES (2, "Inpol", "ESIR, Rennes", "2015-12-10 09:00:00", "2015-12-10 12:00:00", "Cours d'innovation et politique", NULL, "https://esir.univ-rennes1.fr/sites/esir.univ-rennes1.fr/themes/esir/logo.png", NULL);
INSERT INTO event VALUES (3, "Festival film animation", "Bruz, France", "2015-12-07 09:00:00", "2015-12-13 20:00:00", "Festival national du film d'animation", "http://festival-film-animation.fr/", "http://festival-film-animation.fr/cache/com_unitehcarousel/films_en_bretagne_logo_site_150x150_exact_images-2015.jpg", "communication@afca.asso.fr");

Loading…
Cancel
Save