Browse Source

link addEvent page

master
AmarOk 10 years ago
parent
commit
6e79241319
3 changed files with 7 additions and 6 deletions
  1. +1
    -1
      index.php
  2. +1
    -5
      makedatabase.sql
  3. +5
    -0
      populateDatabase.sql

+ 1
- 1
index.php View File

@ -95,7 +95,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>


+ 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