 ORDER BY statut;
 
 ------la liste des articles de du statut choisi
-SELECT id, title, honor, aDate, statut
-FROM ARTICLE
-WHERE statut = '$statutVoulu'
-ORDER BY aDate;
-
---ACCEDER AUX ARTICLES ET LES CORRIGER
---visualiser l'article
-----l'information de l'article(title, author, date, statut)
-SELECT A.title, U.firstName, U.lastname, A.aDate, A.statut, A.honor
+SELECT A.id, A.title, U.firstName, U.lastname, A.aDate, A.honor, A.statut
+FROM ARTICLE A, TUSER U
+WHERE A.statut = '$statutVoulu' AND A.author=U.login
+ORDER BY A.aDate;
+
+--VOIR LES ARTICLES EN COURS DE REDACTION DE L'AUTEUR
+SELECT A.id, A.title, U.firstName, U.lastname, A.aDate, A.honor, A.statut
+FROM ARTICLE A, TUSER U
+WHERE A.author='$currentLogin' AND (A.statut='en_redaction' OR A.statut='supprime') AND A.author=U.login
+ORDER BY A.aDate; --L'author peut seulement modifier ses articles en rédaction
+
+
+
+-----------------LIER DEUX ARTICLES (POUR UN EDIREUR)----------------------
+INSERT INTO TIE_ARTICLE (firstArticle, secondArticle) VALUES ('$art1','$art2');
+
+
+
+
+-----------------CREATION D'UN ARTICLE (POUR UN AUTEUR)--------------------------------
+INSERT INTO ARTICLE (id, title, nbBloc, honor, aDate, author, statut) VALUES (nextval('idauto_art'), '$newTitle', 0, 0, current_date, '$currentLogin', 'en_redaction');
+
+
+
+
+
+----------------------------------PAGE D'INSCRIPTION-------------------------------------------------------------------------------
+--CREATION D'UN COMPTE
+INSERT INTO TUSER (login, firstname, lastname, aPassword, droit) VALUES ('$newLogin','$newFirstName','$newLastName','$newPassword', 'lecteur');
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-------------------------PAGE POUR DONNER LE DROIT (ADMINISTRATEUR)-----------------------------------------------------------------
+UPDATE TUSER SET droit = 'lecteur' WHERE login = '$currentLogin';
+UPDATE TUSER SET droit = 'editeur' WHERE login = '$currentLogin';
+UPDATE TUSER SET droit = 'auteur' WHERE login = '$currentLogin';
+UPDATE TUSER SET droit = 'moderateur' WHERE login = '$currentLogin';
+UPDATE TUSER SET droit = 'administrateur' WHERE login = '$currentLogin';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+------------------------------------------------------PAGE D'ARTICLE-----------------------------------------------------------------
+
+--VISUALISER LES ARTICLES
+SELECT A.title, U.firstName, U.lastname, A.aDate, A.honor, A.statut
 FROM ARTICLE A, TUSER U
 WHERE A.id='$currentArt' AND A.author=U.login;
 

SELECT art, aOrder, title, texte, image_uml
FROM BLOC
WHERE art='$currentArt' 
ORDER BY oOrder;

----afficher la justification si rejete
SELECT justification

ORDER BY aDate;

------la liste des articles de le la date choisi
SELECT A.id, A.title, U.firstName, U.lastname, A.aDate, A.honor, A.statut
FROM ARTICLE A, TUSER U
WHERE A.aDate = '$dateVoulu' AND A.author=U.login
ORDER BY aDate;




----PAR STATUT (Pour un author ou un éditeur)
------ la liste des statuts
SELECT statut, COUNT(*) AS nbArticles
FROM ARTICLE
