Commit 43de9a60 authored by Hadrien Willemot's avatar Hadrien Willemot

page.redirect dans la page accueil

parent 1afa2189
{"tables":{"Promo":{"columns":[{"columnid":"promo_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"annee","dbtypeid":"STRING"},{"columnid":"specialite","dbtypeid":"STRING"}]},"Role":{"columns":[{"columnid":"role_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"}],"dirty":true},"Utilisateur":{"columns":[{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"identifiant","dbtypeid":"STRING","notnull":true},{"columnid":"mot_de_passe","dbtypeid":"STRING","notnull":true},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"prenom","dbtypeid":"STRING"},{"columnid":"email","dbtypeid":"STRING"},{"columnid":"role_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}],"dirty":true},"Matiere":{"columns":[{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"promo_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Sujet":{"columns":[{"columnid":"sujet_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"pdf_sujet","dbtypeid":"STRING"},{"columnid":"pdf_correction","dbtypeid":"STRING"},{"columnid":"verif","dbtypeid":"BOOLEAN"},{"columnid":"date_depot","dbtypeid":"DATE"},{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Commentaire":{"columns":[{"columnid":"com_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"position","dbtypeid":"NUMBER UNSIGNED"},{"columnid":"message","dbtypeid":"STRING"},{"columnid":"typesujet","dbtypeid":"STRING"},{"columnid":"sujet_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Notification":{"columns":[{"columnid":"notif_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Suivre":{"columns":[{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]}},"Promo":[],"Role":[{"nom":"Etudiant"},{"nom":"Admin"},{"nom":"Etudiant"},{"nom":"Admin"}],"Utilisateur":[{"username":"ihu","password":"$2b$10$PNhFNzA3KuuV.2fKY1CcwuU/7iGgjZeuF1LfoFl.Kjfo9emcYY7aq","email":""},{"username":"ihu","password":"$2b$10$ZUUkLlBmX50KXjoAfKxXXOJZsu..rvnab6F187R1LNhLNqrFvwg2S","firstname":"","lastname":"","email":""},{"username":"romain","password":"$2b$10$BsEwI.UI0dxqQgaNCTP8/u9IGtpPipW1kTK3j/fVFNkcaqfvU9odm","firstname":"","lastname":"","email":""}],"Matiere":[],"Sujet":[],"Commentaire":[],"Notification":[],"Suivre":[]}
\ No newline at end of file
{"tables":{"Promo":{"columns":[{"columnid":"promo_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"annee","dbtypeid":"STRING"},{"columnid":"specialite","dbtypeid":"STRING"}]},"Role":{"columns":[{"columnid":"role_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"}],"dirty":true},"Utilisateur":{"columns":[{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"identifiant","dbtypeid":"STRING","notnull":true},{"columnid":"mot_de_passe","dbtypeid":"STRING","notnull":true},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"prenom","dbtypeid":"STRING"},{"columnid":"email","dbtypeid":"STRING"},{"columnid":"role_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}],"dirty":true},"Matiere":{"columns":[{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"promo_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Sujet":{"columns":[{"columnid":"sujet_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"nom","dbtypeid":"STRING"},{"columnid":"pdf_sujet","dbtypeid":"STRING"},{"columnid":"pdf_correction","dbtypeid":"STRING"},{"columnid":"verif","dbtypeid":"BOOLEAN"},{"columnid":"date_depot","dbtypeid":"DATE"},{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Commentaire":{"columns":[{"columnid":"com_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"position","dbtypeid":"NUMBER UNSIGNED"},{"columnid":"message","dbtypeid":"STRING"},{"columnid":"typesujet","dbtypeid":"STRING"},{"columnid":"sujet_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Notification":{"columns":[{"columnid":"notif_id","dbtypeid":"NUMBER UNSIGNED","notnull":true,"identity":{"value":1,"step":1}},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]},"Suivre":{"columns":[{"columnid":"matiere_id","dbtypeid":"NUMBER UNSIGNED","notnull":true},{"columnid":"user_id","dbtypeid":"NUMBER UNSIGNED","notnull":true}]}},"Promo":[],"Role":[{"nom":"Etudiant"},{"nom":"Admin"},{"nom":"Etudiant"},{"nom":"Admin"},{"nom":"Etudiant"},{"nom":"Admin"},{"nom":"Etudiant"},{"nom":"Admin"}],"Utilisateur":[{"username":"ihu","password":"$2b$10$PNhFNzA3KuuV.2fKY1CcwuU/7iGgjZeuF1LfoFl.Kjfo9emcYY7aq","email":""},{"username":"ihu","password":"$2b$10$ZUUkLlBmX50KXjoAfKxXXOJZsu..rvnab6F187R1LNhLNqrFvwg2S","firstname":"","lastname":"","email":""},{"username":"romain","password":"$2b$10$BsEwI.UI0dxqQgaNCTP8/u9IGtpPipW1kTK3j/fVFNkcaqfvU9odm","firstname":"","lastname":"","email":""}],"Matiere":[],"Sujet":[],"Commentaire":[],"Notification":[],"Suivre":[]}
\ No newline at end of file
......@@ -63,16 +63,17 @@ page('/signup', async function () {
page('/accueil', async function () {
await renderTemplate(templates('public/templates/accueil.mustache'), context);
/*let valide = document.querySelector('form');
valide.addEventListener('submit', function () {
let valide = document.querySelector('form');
valide.addEventListener('submit', function (evt) {
evt.preventDefault();
let specialite = getElementByName("specialite");
let annee = getElementByName("annee");
//Faire une requête du style SELECT name FROM promo WHERE promo = <specialite> AND year = <annee>
let promo = 'Informatique'; //Ce que doit renvoyer la requête
window.location = `http://localhost:8080/selection_annale`;
})*/
page.redirect(`http://localhost:8080/selection_annale`);
})
});
/*window.onload = function(){
document.getElementById("form").onsubmit = function(){
window.location.replace(`http://localhost:8080/selection_annale`);
......@@ -80,10 +81,9 @@ page('/accueil', async function () {
}
}*/
function matiere() {
/*function matiere() {
}
});
}*/
page('/selection_annale', async function () {
await renderTemplate(templates('public/templates/selection_annale.mustache'), context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment