Merge branch 'master' of https://github.com/matthieupenchenat81/ModuleWeb
This commit is contained in:
commit
8db3ab513c
@ -68,3 +68,15 @@ git pull
|
|||||||
exit
|
exit
|
||||||
git pull
|
git pull
|
||||||
exit
|
exit
|
||||||
|
git pull
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "admin view & navbar_signed"
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
exit
|
||||||
|
git pull
|
||||||
|
exit
|
||||||
|
cd ..
|
||||||
|
ls
|
||||||
|
nano loadCSVAugustin2014.py
|
||||||
|
@ -35,7 +35,7 @@ class RedirectIfNotAdmin {
|
|||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if (!$this->auth->check() OR Auth::user()->admin == 0)
|
if (!$this->auth->check() OR Auth::user()->droits == 0)
|
||||||
{
|
{
|
||||||
return new RedirectResponse(url('/login'));
|
return new RedirectResponse(url('/login'));
|
||||||
}
|
}
|
||||||
|
@ -39,43 +39,48 @@ CREATE TABLE niveau (
|
|||||||
CREATE TABLE users (
|
CREATE TABLE users (
|
||||||
id INT NOT NULL AUTO_INCREMENT,
|
id INT NOT NULL AUTO_INCREMENT,
|
||||||
firstname VARCHAR(50),
|
firstname VARCHAR(50),
|
||||||
lastnanme VARCHAR(50),
|
lastname VARCHAR(50),
|
||||||
city VARCHAR(50),
|
city VARCHAR(50),
|
||||||
password VARCHAR(255),
|
password VARCHAR(255),
|
||||||
email VARCHAR(50),
|
email VARCHAR(50),
|
||||||
image VARCHAR(255),
|
image VARCHAR(255),
|
||||||
remember_token VARCHAR(100),
|
remember_token VARCHAR(100),
|
||||||
admin INT(1) DEFAULT 0,
|
droits INT DEFAULT 0,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE designation (
|
CREATE TABLE designation (
|
||||||
|
iddesignation INT NOT NULL AUTO_INCREMENT,
|
||||||
nom VARCHAR(255) NOT NULL,
|
nom VARCHAR(255) NOT NULL,
|
||||||
urldesignation VARCHAR(255),
|
urldesignation VARCHAR(255),
|
||||||
PRIMARY KEY (nom)
|
PRIMARY KEY (iddesignation)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE auteur (
|
CREATE TABLE auteur (
|
||||||
|
idauteur INT NOT NULL AUTO_INCREMENT,
|
||||||
nom VARCHAR(50) NOT NULL,
|
nom VARCHAR(50) NOT NULL,
|
||||||
anecdote VARCHAR(255),
|
anecdote VARCHAR(255),
|
||||||
PRIMARY KEY (nom)
|
PRIMARY KEY (idauteur)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE technique (
|
CREATE TABLE technique (
|
||||||
|
idtechnique INT NOT NULL AUTO_INCREMENT,
|
||||||
nom VARCHAR(50) NOT NULL,
|
nom VARCHAR(50) NOT NULL,
|
||||||
urltechnique VARCHAR(255),
|
urltechnique VARCHAR(255),
|
||||||
PRIMARY KEY (nom)
|
PRIMARY KEY (idtechnique)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE domaine (
|
CREATE TABLE domaine (
|
||||||
|
iddomaine INT NOT NULL AUTO_INCREMENT,
|
||||||
nom VARCHAR(50) NOT NULL,
|
nom VARCHAR(50) NOT NULL,
|
||||||
PRIMARY KEY (nom)
|
PRIMARY KEY (iddomaine)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE matiere (
|
CREATE TABLE matiere (
|
||||||
|
idmatiere INT NOT NULL AUTO_INCREMENT,
|
||||||
nom VARCHAR(50) NOT NULL,
|
nom VARCHAR(50) NOT NULL,
|
||||||
PRIMARY KEY (nom)
|
PRIMARY KEY (idmatiere)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE datation (
|
CREATE TABLE datation (
|
||||||
@ -88,32 +93,32 @@ CREATE TABLE datation (
|
|||||||
|
|
||||||
CREATE TABLE oeuvre (
|
CREATE TABLE oeuvre (
|
||||||
idoeuvre INT NOT NULL AUTO_INCREMENT,
|
idoeuvre INT NOT NULL AUTO_INCREMENT,
|
||||||
iddate INT NOT NULL,
|
iddate INT,
|
||||||
idtechnique VARCHAR(50),
|
idtechnique INT,
|
||||||
iddomaine VARCHAR(50),
|
iddomaine INT,
|
||||||
idmatiere VARCHAR(50),
|
idmatiere INT,
|
||||||
titre VARCHAR(50),
|
titre INT,
|
||||||
urlPhoto VARCHAR(255),
|
urlPhoto INT,
|
||||||
PRIMARY KEY (idoeuvre),
|
PRIMARY KEY (idoeuvre),
|
||||||
FOREIGN KEY (idtechnique) REFERENCES technique(nom),
|
FOREIGN KEY (idtechnique) REFERENCES technique(idtechnique),
|
||||||
FOREIGN KEY (iddomaine) REFERENCES domaine(nom),
|
FOREIGN KEY (iddomaine) REFERENCES domaine(iddomaine),
|
||||||
FOREIGN KEY (idmatiere) REFERENCES matiere(nom),
|
FOREIGN KEY (idmatiere) REFERENCES matiere(idmatiere),
|
||||||
FOREIGN KEY (iddate) REFERENCES datation(iddate)
|
FOREIGN KEY (iddate) REFERENCES datation(iddate)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE assodesignationaoeuvre (
|
CREATE TABLE assodesignationaoeuvre (
|
||||||
idoeuvre INT NOT NULL,
|
idoeuvre INT NOT NULL,
|
||||||
idesignation VARCHAR(255),
|
iddesignation INT NOT NULL,
|
||||||
PRIMARY KEY (idesignation,idoeuvre),
|
PRIMARY KEY (iddesignation,idoeuvre),
|
||||||
FOREIGN KEY (idesignation) REFERENCES designation(nom),
|
FOREIGN KEY (iddesignation) REFERENCES designation(iddesignation),
|
||||||
FOREIGN KEY (idoeuvre) REFERENCES oeuvre(idoeuvre)
|
FOREIGN KEY (idoeuvre) REFERENCES oeuvre(idoeuvre)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE assoauteuraoeuvre (
|
CREATE TABLE assoauteuraoeuvre (
|
||||||
idoeuvre INT NOT NULL,
|
idoeuvre INT NOT NULL,
|
||||||
idauteur VARCHAR(50),
|
idauteur INT NOT NULL,
|
||||||
PRIMARY KEY (idauteur,idoeuvre),
|
PRIMARY KEY (idauteur,idoeuvre),
|
||||||
FOREIGN KEY (idauteur) REFERENCES auteur(nom),
|
FOREIGN KEY (idauteur) REFERENCES auteur(idauteur),
|
||||||
FOREIGN KEY (idoeuvre) REFERENCES oeuvre(idoeuvre)
|
FOREIGN KEY (idoeuvre) REFERENCES oeuvre(idoeuvre)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user