Merged feature/user_management into dev
This commit is contained in:
commit
3c99881544
|
@ -80,5 +80,4 @@
|
|||
|
||||
// var_dump($response);
|
||||
|
||||
|
||||
?>
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
|
||||
"users": {
|
||||
"user": {
|
||||
"login": {
|
||||
"description": "Connexion avec un login (identifiant ou adresse mail) et un mot de passe.",
|
||||
"permissions": [],
|
||||
"parameters": {
|
||||
"login": { "description": "Identifiant ou adresse mail", "type": "varchar(255)" },
|
||||
"password": { "description": "Mot de passe", "type":"text" }
|
||||
"login": { "description": "Identifiant ou adresse mail", "type": "varchar(255)" },
|
||||
"password": { "description": "Mot de passe", "type":"text" }
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -14,6 +14,44 @@
|
|||
"description": "Deconnexion",
|
||||
"permissions": [],
|
||||
"parameters": {}
|
||||
},
|
||||
|
||||
|
||||
"getById": {
|
||||
"description": "Retourne les informations d'un utilisateur.",
|
||||
"permissions": ["admin"],
|
||||
"parameters": {
|
||||
"id_user": { "description": "UID de l'utilisateur recherche.", "type": "id" }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"getAll": {
|
||||
"description": "Retourne les informations de tous les utilisateurs.",
|
||||
"permissions": ["admin"],
|
||||
"parameters": {}
|
||||
},
|
||||
|
||||
|
||||
"create": {
|
||||
"description": "Creation d'un nouvel utilisateur.",
|
||||
"permissions": ["admin"],
|
||||
"parameters": {
|
||||
"login" : { "description": "Login de l'utilisateur, 30 caracteres maximum.", "type": "varchar(30)" },
|
||||
"password" : { "description": "Mot de passe de l'utilisateur.", "type": "text" },
|
||||
"mail" : { "description": "Adresse mail de l'utilisateur.", "type": "mail" },
|
||||
"reference" : { "description": "UID d'une personne d'un sondage, peut etre vide.", "type": "text" },
|
||||
"permissions": { "description": "Liste des permissions de l'utilisateur.", "type": "text" }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"remove": {
|
||||
"description": "Suppression d'un utilisateur.",
|
||||
"permissions": ["admin"],
|
||||
"parameters": {
|
||||
"id_user": { "description": "UID de l'utilisateur", "type": "id" }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
{
|
||||
|
||||
"users": [
|
||||
"login"
|
||||
"user": [
|
||||
"login",
|
||||
"getById",
|
||||
"getAll",
|
||||
"checkUnique",
|
||||
"create",
|
||||
"remove"
|
||||
],
|
||||
|
||||
"Personnes": [
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#WRAPPER>#CONTAINER>section{display:none;position:relative;flex-grow:1;padding:1em;border-radius:3px;background-color:#fff;color:#000;font-size:1em;border:1px solid #ddd}#WRAPPER>#CONTAINER>section.active{display:block}#WRAPPER>#CONTAINER>section h6{color:#848484;font-size:1.2em;text-transform:uppercase;font-weight:300;letter-spacing:.2em;margin:0;padding:0}#WRAPPER>#CONTAINER>section h6:before{content:'- '}#WRAPPER>#CONTAINER>section h6:after{content:' -'}#WRAPPER>#CONTAINER>section h6.center{text-align:center}#WRAPPER>#CONTAINER>section input[type="radio"],#WRAPPER>#CONTAINER>section input[type="checkbox"]{display:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for],#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]{padding-left:.8em;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{content:'';display:inline-block;position:relative;top:.1em;left:-.8em;width:calc( 1em - 2*.15em );height:calc( 1em - 2*.15em );border-radius:50% / 50%;border:0.15em solid #399ced;background:#fff center center no-repeat;background-image:none;background-size:70% auto;transition:background .2s ease-in-out;cursor:pointer}#WRAPPER>#CONTAINER>section input[type="radio"]:checked+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]:checked+label[for]:before{background-color:#399ced;background-image:url("/f/svg/checked/st/container")}#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{border-radius:3px}#WRAPPER>#CONTAINER>section input[type="submit"],#WRAPPER>#CONTAINER>section input[type="button"]{margin:.5em 0;padding:.3em .5em;border-radius:3px;border:1px solid #515151;font-weight:bold;color:#515151;background-color:#fff;transition:background .1s ease-in-out, color .1s ease-in-out}#WRAPPER>#CONTAINER>section input[type="submit"]:hover,#WRAPPER>#CONTAINER>section input[type="button"]:hover{background-color:#515151;color:#fff}#WRAPPER>#CONTAINER>section input[type="submit"].primary,#WRAPPER>#CONTAINER>section input[type="button"].primary{border-color:#399ced;color:#399ced;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="submit"].primary:hover,#WRAPPER>#CONTAINER>section input[type="button"].primary:hover{background-color:#399ced;color:#fff}#WRAPPER>#CONTAINER>section img{margin:1em;height:3em}#WRAPPER>#CONTAINER>section .flag{margin:0 .8em;padding:.2em .8em;border-radius:5px;border:1px solid #b5b5b5;color:#555;font-family:'Inconsolata'}
|
||||
#WRAPPER>#CONTAINER>section{display:none;position:relative;flex-grow:1;padding:1em;border-radius:3px;background-color:#fff;color:#000;font-size:1em;border:1px solid #ddd}#WRAPPER>#CONTAINER>section.active{display:block}#WRAPPER>#CONTAINER>section h6{color:#848484;font-size:1.2em;text-transform:uppercase;font-weight:300;letter-spacing:.2em;margin:0;padding:0}#WRAPPER>#CONTAINER>section h6:before{content:'- '}#WRAPPER>#CONTAINER>section h6:after{content:' -'}#WRAPPER>#CONTAINER>section h6.center{text-align:center}#WRAPPER>#CONTAINER>section input[type="radio"],#WRAPPER>#CONTAINER>section input[type="checkbox"]{display:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for],#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]{padding-left:.8em;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{content:'';display:inline-block;position:relative;top:.1em;left:-.8em;width:calc( 1em - 2*.15em );height:calc( 1em - 2*.15em );border-radius:50% / 50%;border:0.15em solid #399ced;background:#fff center center no-repeat;background-image:none;background-size:70% auto;transition:background .2s ease-in-out;cursor:pointer}#WRAPPER>#CONTAINER>section input[type="radio"]:checked+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]:checked+label[for]:before{background-color:#399ced;background-image:url("/f/svg/checked/st/container")}#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{border-radius:3px}#WRAPPER>#CONTAINER>section input[type="submit"],#WRAPPER>#CONTAINER>section input[type="button"]{margin:.5em 0;padding:.3em .5em;border-radius:3px;border:1px solid #515151;color:#515151;background-color:#fff;transition:background .1s ease-in-out, color .1s ease-in-out}#WRAPPER>#CONTAINER>section input[type="submit"]:hover,#WRAPPER>#CONTAINER>section input[type="button"]:hover{background-color:#515151;color:#fff}#WRAPPER>#CONTAINER>section input[type="submit"].primary,#WRAPPER>#CONTAINER>section input[type="button"].primary{border-color:#399ced;color:#399ced;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="submit"].primary:hover,#WRAPPER>#CONTAINER>section input[type="button"].primary:hover{background-color:#399ced;color:#fff}#WRAPPER>#CONTAINER>section img{margin:1em;height:3em}#WRAPPER>#CONTAINER>section .flag{margin:0 .8em;padding:.2em .8em;border-radius:5px;border:1px solid #b5b5b5;color:#555;font-family:'Inconsolata'}
|
||||
/*# sourceMappingURL=container.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAMC,2BAAW,CACV,OAAO,CAAE,IAAI,CAKb,QAAQ,CAAE,QAAQ,CAClB,SAAS,CAAE,CAAC,CAEZ,OAAO,CAAE,GAAG,CAEZ,aAAa,CAAE,GAAG,CAElB,gBAAgB,CAAE,IAAI,CAEtB,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,GAAG,CAEd,MAAM,CAAE,cAAc,CAdt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||
"names": [],
|
||||
"file": "container.css"
|
||||
|
|
|
@ -122,7 +122,6 @@
|
|||
border-radius: 3px;
|
||||
border: 1px solid $theme-fg;
|
||||
|
||||
font-weight: bold;
|
||||
color: $theme-fg;
|
||||
|
||||
background-color: #fff;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
section[data-panel-list]{display:block;position:relative;border-radius:3px;border:1px solid #ccc;background-color:#fff;font-size:.8em;color:#000}section[data-panel-list]>div[data-header]{display:flex;position:relative;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding:.5em .7em;border-radius:3px 3px 0 0;border-bottom:1px solid #ccc;background-color:#f5f5f5;box-shadow:inset 0 0 5px #eee}section[data-panel-list]>div[data-header]>span,section[data-panel-list]>div[data-header]>button{color:#333;font-weight:bold;line-height:2em}section[data-panel-list]>div[data-header]>button{padding:.1em .7em;border-radius:3px;border:1px solid #555;background:#f5f5f5;transition:all .2s ease-in-out}section[data-panel-list]>div[data-header]>button:hover{background:#333;color:#fff}section[data-panel-list]>div[data-description]{display:block;position:relative;border-bottom:1px solid #ccc;padding:.7em .7em;color:#555}section[data-panel-list]>ul[data-list]{display:flex;position:relative;flex-direction:column;justify-content:flex-start;flex-wrap:nowrap;margin:0;padding:0;list-style:none}section[data-panel-list]>ul[data-list]>li[data-element]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;flex-wrap:nowrap;padding:1em}section[data-panel-list]>ul[data-list]>li[data-element]:not(:last-child){border-bottom:1px solid #ccc}section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1){display:flex;width:10em;height:6em;flex-direction:column;justify-content:flex-end;align-items:center;background:url("/f/svg/token/st/container/666666") center 1em no-repeat;background-size:auto 50%}section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1).active{background-image:url("/f/svg/token/st/container/399ced")}section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)>span{display:block;padding:0 .4em;border-radius:3px;border:1px solid #ddd;font-size:.8em;color:#555;text-transform:uppercase;font-weight:bold}section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(n+2){display:flex;position:relative;flex:10em;padding:1em;flex-direction:column;justify-content:flex-start;align-items:flex-start;font-size:1em;color:#000;font-weight:bold}section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(n+2)>span[data-prefix]:before{content:attr(data-prefix) ": ";font-weight:normal}section[data-panel-list]>ul[data-list]>li[data-element]>button{padding:.1em .7em;height:2em;border-radius:3px;border:1px solid #de2b08;background:#fff;color:#de2b08;font-weight:bold;transition:all .2s ease-in-out}section[data-panel-list]>ul[data-list]>li[data-element]>button:hover{background:#de2b08;color:#fff}section[data-panel-list]>div[data-add]{display:none;position:relative;padding:1em;border-bottom:1px solid #ccc;background-color:#f5f5f5;font-weight:bold}section[data-panel-list]>div[data-add].active{display:block}section[data-panel-list]>div[data-add]>input[type='text']{margin:1em 0;padding:.3em .5em;border-radius:3px;border:1px solid #999;background-color:#fff;color:#000;font-weight:normal}
|
||||
#WRAPPER>#CONTAINER section[data-panel-list]{display:block;position:relative;border-radius:3px;border:1px solid #ccc;background-color:#fff;font-size:.9em;color:#000}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-header]{display:flex;position:relative;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding:.5em .7em;border-radius:3px 3px 0 0;border-bottom:1px solid #ccc;background-color:#f5f5f5;box-shadow:inset 0 0 5px #eee}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-header]>span,#WRAPPER>#CONTAINER section[data-panel-list]>div[data-header]>button{color:#333;font-weight:bold;line-height:2em}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-header]>button{padding:.1em .7em;border-radius:3px;border:1px solid #777;background:#ecf0f1;transition:all .1s ease-in-out;color:#777}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-header]>button:hover{background:#399ced;border-color:#1484df;color:#fff}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-description]{display:block;position:relative;border-bottom:1px solid #ccc;padding:.7em .7em;color:#555}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]{display:flex;position:relative;flex-direction:column;justify-content:flex-start;flex-wrap:nowrap;margin:0;padding:0;list-style:none}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;flex-wrap:nowrap;padding:1em}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]:not(:last-child){border-bottom:1px solid #ccc}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1){display:flex;width:10em;height:6em;flex-direction:column;justify-content:flex-end;align-items:center;background-size:auto 50%}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)[data-token]{background:url("/f/svg/token/st/container/666666") center 1em no-repeat}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)[data-token].active{background-image:url("/f/svg/token/st/container/399ced")}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)[data-user]{background:url("/f/svg/user/st/container/666666") center 1em no-repeat}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)[data-user].active{background-image:url("/f/svg/user/st/container/399ced")}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(1)>span{display:block;padding:0 .4em;border-radius:3px;border:1px solid #ddd;font-size:.8em;color:#555;text-transform:uppercase;font-weight:bold}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(n+2){display:flex;position:relative;flex:10em;padding:1em;flex-direction:column;justify-content:flex-start;align-items:flex-start;font-size:1em;color:#000;font-weight:bold}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>div:nth-child(n+2)>span[data-prefix]:before{content:attr(data-prefix) ": ";font-weight:normal}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>button{padding:.1em .7em;height:2em;border-radius:3px;border:1px solid #de2b08;background:#fff;color:#de2b08;font-weight:bold;transition:all .2s ease-in-out}#WRAPPER>#CONTAINER section[data-panel-list]>ul[data-list]>li[data-element]>button:hover{background:#de2b08;color:#fff}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]{display:none;position:relative;padding:1em;border-bottom:1px solid #ccc;background-color:#ecf0f1}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add].active{display:block}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>.label{display:inline-block;width:18em;padding-right:2em;text-align:right;color:#3b494c}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='text'],#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='email'],#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='password']{margin:1em 0;padding:.5em .7em;border-radius:3px;border:1px solid #ddd;background-color:#fff;color:#000;font-weight:normal}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='text']:focus,#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='email']:focus,#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='password']:focus{border-color:#399ced;box-shadow:inset 0 0 2px #ddd}#WRAPPER>#CONTAINER section[data-panel-list]>div[data-add]>input[type='submit']:hover{background:#399ced;border-color:#1484df;color:#fff}
|
||||
/*# sourceMappingURL=global.css.map */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAEA,wBAAwB,CACvB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAElB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,cAAc,CAEtB,gBAAgB,CAAE,IAAI,CAEtB,SAAS,CAAE,IAAI,CACf,KAAK,CAAE,IAAI,CAIX,yCAAoB,CACnB,OAAO,CAAE,IAAI,CACb,QAAQ,CAAE,QAAQ,CAGlB,cAAc,CAAE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,CAEhB,KAAK,CAAE,OAAO,CACd,WAAW,CAAE,IAAI,CAEjB,UAAU,CAAE,mBAAmB,CAG/B,wFAAO,CACN,UAAU,CAAE,OAAO,CACnB,KAAK,CAAE,IAAI,CASf,0DAAiB,CAChB,OAAO,CAAE,IAAI,CAOb,QAAQ,CAAE,QAAQ,CAElB,OAAO,CAAE,GAAG,CAEZ,aAAa,CAAE,cAAc,CAE7B,gBAAgB,CAAE,OAAO,CAVzB,iEAAQ,CACP,OAAO,CAAE,KAAK,CAcf,iEAAU,CACT,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,IAAI,CACX,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,KAAK,CACjB,KAAK,CAAE,OAAO,CAKf,8OAE0B,CACzB,MAAM,CAAE,KAAK,CACb,OAAO,CAAE,SAAS,CAElB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,cAAc,CAEtB,gBAAgB,CAAE,IAAI,CAEtB,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,MAAM,CAGnB,gQAAO,CACN,YAAY,CClQG,OAAO,CDmQtB,UAAU,CAAE,kBAAkB,CAMhC,qFAA8B,CAC7B,UAAU,CC1QM,OAAO,CD2QvB,YAAY,CAAE,OAA6B,CAC3C,KAAK,CAAE,IAAI",
|
||||
"sources": ["global.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "global.css"
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
@import 'constants';
|
||||
|
||||
|
||||
/* [1] Panneau d'ajout/suppression d'elements
|
||||
=========================================================*/
|
||||
section[data-panel-list]{
|
||||
#WRAPPER > #CONTAINER section[data-panel-list]{
|
||||
display: block;
|
||||
position: relative;
|
||||
|
||||
|
@ -9,7 +12,7 @@ section[data-panel-list]{
|
|||
|
||||
background-color: #fff;
|
||||
|
||||
font-size: .8em;
|
||||
font-size: .9em;
|
||||
color: #000;
|
||||
|
||||
|
||||
|
@ -45,15 +48,18 @@ section[data-panel-list]{
|
|||
padding: .1em .7em;
|
||||
|
||||
border-radius: 3px;
|
||||
border: 1px solid #555;
|
||||
border: 1px solid #777;
|
||||
|
||||
background: #f5f5f5;
|
||||
background: #ecf0f1;
|
||||
|
||||
transition: all .2s ease-in-out;
|
||||
transition: all .1s ease-in-out;
|
||||
|
||||
color: #777;
|
||||
|
||||
// Animation de @hover
|
||||
&:hover{
|
||||
background: #333;
|
||||
background: $theme-fg-primary;
|
||||
border-color: darken($theme-fg-primary, 10);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
@ -119,13 +125,27 @@ section[data-panel-list]{
|
|||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
background: url('/f/svg/token/st/container/666666') center 1em no-repeat;
|
||||
// Image pour token
|
||||
&[data-token]{
|
||||
background: url('/f/svg/token/st/container/666666') center 1em no-repeat;
|
||||
// Si le token est actif
|
||||
&.active{
|
||||
background-image: url('/f/svg/token/st/container/399ced');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Image pour utilisateur
|
||||
&[data-user]{
|
||||
background: url('/f/svg/user/st/container/666666') center 1em no-repeat;
|
||||
// Si le token est actif
|
||||
&.active{
|
||||
background-image: url('/f/svg/user/st/container/399ced');
|
||||
}
|
||||
}
|
||||
|
||||
background-size: auto 50%;
|
||||
|
||||
// Si le token est actif
|
||||
&.active{
|
||||
background-image: url('/f/svg/token/st/container/399ced');
|
||||
}
|
||||
|
||||
|
||||
// Texte pour le type d'element
|
||||
|
@ -211,23 +231,48 @@ section[data-panel-list]{
|
|||
|
||||
border-bottom: 1px solid #ccc;
|
||||
|
||||
background-color: #f5f5f5;
|
||||
background-color: #ecf0f1;
|
||||
|
||||
font-weight: bold;
|
||||
// font-weight: bold;
|
||||
|
||||
/* (5.1) Description du champ de texte */
|
||||
& > .label{
|
||||
display: inline-block;
|
||||
width: 18em;
|
||||
padding-right: 2em;
|
||||
text-align: right;
|
||||
color: #3b494c;
|
||||
}
|
||||
|
||||
|
||||
/* (5.1) Champs de texte */
|
||||
& > input[type='text']{
|
||||
/* (5.2) Champs de texte */
|
||||
& > input[type='text'],
|
||||
& > input[type='email'],
|
||||
& > input[type='password']{
|
||||
margin: 1em 0;
|
||||
padding: .3em .5em;
|
||||
padding: .5em .7em;
|
||||
|
||||
border-radius: 3px;
|
||||
border: 1px solid #999;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
|
||||
// Animation de @focus
|
||||
&:focus{
|
||||
border-color: $theme-fg-primary;
|
||||
box-shadow: inset 0 0 2px #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* (5.3) Bouton de creation animation de @hover*/
|
||||
& > input[type='submit']:hover{
|
||||
background: $theme-fg-primary;
|
||||
border-color: darken($theme-fg-primary, 10);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#WRAPPER>#MENU-SIDE>span{display:block;position:relative;width:calc( 100% - 2*1em - 2*1.5em );padding:.8em 1.5em;padding-left:calc( 1.5em + 2*1em );border-bottom:1px solid transparent;background:url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat,url("/f/svg/sub/st/menu-side/aaaaaa") right 1.5em center no-repeat;background-size:2em 2em, .5em .5em;color:#666;font-size:.85em;transition:color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out;cursor:pointer}#WRAPPER>#MENU-SIDE>span.active{background:url("/f/svg/circle/st/menu-side/399ced") 1em center no-repeat,url("/f/svg/sub-active/st/menu-side/ffffff") right 1.5em center no-repeat;background-size:2em 2em, .5em .5em}#WRAPPER>#MENU-SIDE>span:hover{background:url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat,url("/f/svg/sub/st/menu-side/ffffff") right 1.5em center no-repeat;background-size:2em 2em, .5em .5em}#WRAPPER>#MENU-SIDE>span>svg,#WRAPPER>#MENU-SIDE>span>svg *{position:absolute;top:calc( 50% - 1em/2 );left:1.5em;width:1em;height:1em;fill:#939393 !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:hover,#WRAPPER>#MENU-SIDE>span.active{border-bottom-color:#2290eb;background-color:#399ced;color:#fff}#WRAPPER>#MENU-SIDE>span:hover>svg,#WRAPPER>#MENU-SIDE>span:hover>svg *,#WRAPPER>#MENU-SIDE>span.active>svg,#WRAPPER>#MENU-SIDE>span.active>svg *{fill:#fff !important}#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span{display:block;position:relative;width:calc( 100% - 1.5em - 2.5em );padding:.5em 1.5em;padding-left:2.5em;background:#313541 url("/f/svg/sub/st/menu-side/888888") 1.5em center no-repeat;background-size:.5em;color:#7a7a7a;font-size:.85em;cursor:pointer;transition:color .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span:hover,#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span.active{color:#fff;background-image:url("/f/svg/sub/st/menu-side/ffffff")}#WRAPPER>#MENU-SIDE>span:not(.icon):not(.active)+div.sub>span{display:none}
|
||||
#WRAPPER>#MENU-SIDE>span{display:block;position:relative;width:calc( 100% - 2*1em - 2*1.5em );padding:.8em 1.5em;padding-left:calc( 1.5em + 2*1em );border-bottom:1px solid transparent;background:url("/f/svg/sub/st/menu-side/aaaaaa") right 1.5em center no-repeat;background-size:.5em .5em;color:#666;font-size:.85em;transition:color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out;cursor:pointer}#WRAPPER>#MENU-SIDE>span>svg,#WRAPPER>#MENU-SIDE>span>svg *{position:absolute;top:calc( 50% - 1em/2 );left:1.5em;width:1em;height:1em;fill:#939393 !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.active):hover{background-image:url("/f/svg/sub/st/menu-side/000000");color:#000}#WRAPPER>#MENU-SIDE>span:not(.active):hover>svg,#WRAPPER>#MENU-SIDE>span:not(.active):hover>svg *{fill:#000 !important}#WRAPPER>#MENU-SIDE>span.active{border-bottom-color:#2290eb;background-color:#399ced;background-image:url("/f/svg/sub-active/st/menu-side/ffffff");color:#fff}#WRAPPER>#MENU-SIDE>span.active>svg,#WRAPPER>#MENU-SIDE>span.active>svg *{fill:#fff !important}#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span{display:block;position:relative;width:calc( 100% - 1.5em - 2.5em );padding:.5em 1.5em;padding-left:2.5em;background:#313541 url("/f/svg/sub/st/menu-side/888888") 1.5em center no-repeat;background-size:.5em;color:#7a7a7a;font-size:.85em;cursor:pointer;transition:color .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span:hover,#WRAPPER>#MENU-SIDE>span:not(.icon)+div.sub>span.active{color:#fff;background-image:url("/f/svg/sub/st/menu-side/ffffff")}#WRAPPER>#MENU-SIDE>span:not(.icon):not(.active)+div.sub>span{display:none}
|
||||
/*# sourceMappingURL=menu-side.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAMC,wBAAQ,CACP,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,8BAA8B,CAEtC,OAAO,CAAE,UAAU,CACnB,YAAY,CAAE,qBAAqB,CAEnC,aAAa,CAAE,qBAAqB,CAEpC,UAAU,CAAE,gIAC4D,CACxE,eAAe,CAAE,kBAAkB,CAiBnC,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAEhB,UAAU,CAAE,qGAAqG,CAEjH,MAAM,CAAE,OAAO,CAlBf,+BAAQ,CACP,UAAU,CAAE,uIACkE,CAC9E,eAAe,CAAE,kBAAkB,CAIpC,8BAAO,CACN,UAAU,CAAE,gIAC2D,CACvE,eAAe,CAAE,kBAAkB,CAWpC,2DAAkB,CACjB,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,mBAAmB,CACxB,IAAI,CAAE,KAAK,CACX,KAAK,CAAE,GAAG,C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jB,IAAI,CAAE,eAAe,CAKvB,+BAAQ,CACP,mBAAmB,CAAE,OAA4B,CAGjD,gBAAgB,CCjDA,OAAO,CDkDvB,gBAAgB,CAAE,4CAA4C,CAC9D,KAAK,CC7CU,IAAO,CD+CtB,yEAAkB,CACjB,IAAI,CAAE,eAAe,CAYxB,gDAAkC,CACjC,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,4BAA4B,CAEpC,OAAO,CAAE,UAAU,CACnB,YAAY,CAAE,KAAK,CAEnB,UAAU,CAAE,oEAAqE,CACjF,eAAe,CAAE,IAAI,CAErB,KAAK,CAAE,OAAoB,CAC3B,SAAS,CAAE,KAAK,CAEhB,MAAM,CAAE,OAAO,CAEf,UAAU,CAAE,qBAAqB,CAGjC,8GACQ,CACP,KAAK,CCjFU,IAAO,CDkFtB,gBAAgB,CAAE,qCAAqC,CAKzD,6DAA+C,CAC9C,OAAO,CAAE,IAAI",
|
||||
"sources": ["menu-side.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "menu-side.css"
|
||||
|
|
|
@ -14,25 +14,10 @@
|
|||
|
||||
border-bottom: 1px solid transparent;
|
||||
|
||||
background: url('/f/svg/circle/st/menu-side/29282e') 1em center no-repeat,
|
||||
url('/f/svg/sub/st/menu-side/aaaaaa') right 1.5em center no-repeat;
|
||||
background-size: 2em 2em, .5em .5em;
|
||||
background: url('/f/svg/sub/st/menu-side/aaaaaa') right 1.5em center no-repeat;
|
||||
background-size: .5em .5em;
|
||||
|
||||
|
||||
// Modification du sens de la fleche quand le sous-menu est deroule
|
||||
&.active{
|
||||
background: url('/f/svg/circle/st/menu-side/399ced') 1em center no-repeat,
|
||||
url('/f/svg/sub-active/st/menu-side/ffffff') right 1.5em center no-repeat;
|
||||
background-size: 2em 2em, .5em .5em;
|
||||
}
|
||||
|
||||
// Modification de la couleur de la fleche pour @hover
|
||||
&:hover{
|
||||
background: url('/f/svg/circle/st/menu-side/29282e') 1em center no-repeat,
|
||||
url('/f/svg/sub/st/menu-side/ffffff') right 1.5em center no-repeat;
|
||||
background-size: 2em 2em, .5em .5em;
|
||||
}
|
||||
|
||||
color: #666;
|
||||
font-size: .85em;
|
||||
|
||||
|
@ -53,13 +38,23 @@
|
|||
}
|
||||
|
||||
|
||||
/* (2) @hover ou .active -> survol souris ou active */
|
||||
&:hover,
|
||||
/* (2) Animation de @hover */
|
||||
&:not(.active):hover{
|
||||
background-image: url('/f/svg/sub/st/menu-side/000000');
|
||||
color: #000;
|
||||
|
||||
& > svg, & > svg *{
|
||||
fill: #000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* (3) Animation quand .active */
|
||||
&.active{
|
||||
border-bottom-color: darken($theme-fg-primary, 5);
|
||||
// box-shadow: inset 0 0 1em darken($dark-bg-primary, 1);
|
||||
|
||||
background-color: $theme-fg-primary;
|
||||
background-image: url('/f/svg/sub-active/st/menu-side/ffffff');
|
||||
color: $dark-fg-primary;
|
||||
|
||||
& > svg, & > svg *{
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Si les parametres de connection, on essaie de connecter
|
||||
if( $login_vars ){
|
||||
$login = new ModuleRequest('users/login', array( 'login' => $_POST['login'], 'password' => $_POST['password'] ));
|
||||
$login = new ModuleRequest('user/login', array( 'login' => $_POST['login'], 'password' => $_POST['password'] ));
|
||||
$login_ans = $login->dispatch();
|
||||
|
||||
// Si aucune erreur, on dit qu'on vient de se connecter
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
// Si on se deconnecte
|
||||
if( $logout_vars ){
|
||||
$logout = new ModuleRequest('users/logout');
|
||||
$logout = new ModuleRequest('user/logout');
|
||||
$logout_ans = $logout->dispatch();
|
||||
|
||||
// Si aucune erreur, on dit qu'on vient de se deconnecter
|
||||
|
|
|
@ -196,15 +196,15 @@
|
|||
break;
|
||||
|
||||
case 'varchar(255)':
|
||||
return $checker && is_string($value) && strlen($value) <= 255;
|
||||
return $checker && is_string($value) && strlen($value) <= 255 && strlen($value) > 0;
|
||||
break;
|
||||
|
||||
case 'varchar(50)':
|
||||
return $checker && is_string($value) && strlen($value) <= 50;
|
||||
return $checker && is_string($value) && strlen($value) <= 50 && strlen($value) > 0;
|
||||
break;
|
||||
|
||||
case 'varchar(30)':
|
||||
return $checker && is_string($value) && strlen($value) <= 30;
|
||||
return $checker && is_string($value) && strlen($value) <= 30 && strlen($value) > 0;
|
||||
break;
|
||||
|
||||
case 'text':
|
||||
|
@ -219,8 +219,8 @@
|
|||
return $checker && is_string($value) && preg_match('/^[\da-f]{40}$/i', $value);
|
||||
break;
|
||||
|
||||
case 'user.status':
|
||||
return $checker && is_numeric($value) && floor($value) == $value && $value >= 0 && $value <= 100;
|
||||
case 'array':
|
||||
return $checker && is_array($value);
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -177,13 +177,16 @@
|
|||
public static function fromPost($post){
|
||||
/* [0] Verification de l'authentification
|
||||
=========================================================*/
|
||||
/* (1) Si le token n'est pas dans le header */
|
||||
if( !isset($_SERVER['PHP_AUTH_DIGEST']) ){
|
||||
/* (1) Si le token n'est pas dans le header ET qu'on est pas connecte */
|
||||
if( !isset($_SERVER['PHP_AUTH_DIGEST']) && !connected() ){
|
||||
$tmp = new ModuleRequest();
|
||||
$tmp->error = ManagerError::TokenError;
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
// On definit le token
|
||||
$token = isset($_SERVER['PHP_AUTH_DIGEST']) ? $_SERVER['PHP_AUTH_DIGEST'] : null;
|
||||
|
||||
|
||||
/* [1] On verifie que le @path est renseigne
|
||||
=========================================================*/
|
||||
|
@ -194,6 +197,7 @@
|
|||
=========================================================*/
|
||||
// Si variable n'existe pas, on cree un tableau vide
|
||||
$params = $post;
|
||||
|
||||
// On retire le @path de @params
|
||||
unset($params['path']);
|
||||
|
||||
|
@ -201,7 +205,7 @@
|
|||
/* [3] On retourne une instance de <ModuleRequest>
|
||||
=========================================================*/
|
||||
// On cree notre requete avec le token
|
||||
return new ModuleRequest($post['path'], $params, $_SERVER['PHP_AUTH_DIGEST']);
|
||||
return new ModuleRequest($post['path'], $params, $token);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -249,17 +249,6 @@
|
|||
// On recupere le contenu
|
||||
$content = file_get_contents($this->path);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
///////////// SI FICHIER JS ////////////
|
||||
////////////////////////////////////////
|
||||
if( $this->flags['extension'] == 'js' )
|
||||
$content = 'var js_access_token = "'. substr(session_id(), 0, 23) .'";' . "\n\n" . $content;
|
||||
|
||||
|
||||
|
||||
|
||||
// On affiche tout
|
||||
echo str_replace( '</svg>', $this->stylesheet.'</svg>', $content );
|
||||
}
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
*
|
||||
* @id_token<int> UID du token en question
|
||||
*
|
||||
* @return status<bool> Retourne l'etat de la suppression (VRAI -> fait/FAUX -> erreur)
|
||||
*
|
||||
*/
|
||||
public static function remove($id_token){
|
||||
/* [1] Suppression du token
|
||||
|
|
|
@ -0,0 +1,205 @@
|
|||
<?php
|
||||
|
||||
namespace manager\module;
|
||||
use \manager\sessionManager;
|
||||
use \manager\Database;
|
||||
use \manager\ManagerError;
|
||||
use \manager\Repo;
|
||||
|
||||
class user{
|
||||
|
||||
|
||||
/* VERIFICATION DES LOGINS D'UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Username ou adresse mail de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Retourne l'id de l'utilisateur si les logins sont corrects
|
||||
*
|
||||
*/
|
||||
public static function login($login, $password){
|
||||
/* [1] On verifie les logins
|
||||
=========================================================*/
|
||||
$check = new Repo('user/login', array($login, $password));
|
||||
$user = $check->answer();
|
||||
|
||||
// Si le login/password est incorrect, on retourne une erreur
|
||||
if( $user === false ) return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
/* [2] Gestion du login
|
||||
=========================================================*/
|
||||
$_SESSION['userid'] = $user['id_user'];
|
||||
$_SESSION['username'] = $user['login'];
|
||||
$_SESSION['permission'] = explode( ',', str_replace(' ', '', $user['permission']) );
|
||||
|
||||
/* [4] Retour de l'id user
|
||||
=========================================================*/
|
||||
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'id_user' => $user['id_user']
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* DECONNEXION D'UN UTILISATEUR
|
||||
*
|
||||
*/
|
||||
public static function logout(){
|
||||
$_SESSION['userid'] = null;
|
||||
$_SESSION['username'] = null;
|
||||
$_SESSION['permission'] = array();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* RETOURNE L'UTILISATEUR D'ID DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return user<Array> Tableau contenant les informations de l'utilisateur
|
||||
*
|
||||
*/
|
||||
public static function getById($user_id){
|
||||
/* [1] On recupere les donnees de l'utilisateur
|
||||
=========================================================*/
|
||||
$getUser = new Repo('user/getById', array($user_id));
|
||||
$user_data = $getUser->answer();
|
||||
|
||||
// Si aucun utilisateur n'est trouve
|
||||
if( $user_data === false ) return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
/* [2] On met les permissions au bon format (string -> array)
|
||||
=========================================================*/
|
||||
$user_data['permission'] = explode( ',', str_replace(' ', '', $user_data['permission']) );
|
||||
|
||||
/* [3] Gestion du retour
|
||||
=========================================================*/
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'user' => $user_data
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* RETOURNE LA LISTE DE TOUS LES UTILISATEURS
|
||||
*
|
||||
* @return users<Array> Tableau contenant les informations de tous les utilisateurs
|
||||
*
|
||||
*/
|
||||
public static function getAll(){
|
||||
/* [1] On recupere les donnees des utilisateurs
|
||||
=========================================================*/
|
||||
$getUsers = new Repo('user/getAll');
|
||||
$users_data = $getUsers->answer();
|
||||
|
||||
// Si aucun utilisateur n'est trouve
|
||||
if( $users_data === false ) return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
/* [2] On met les permissions au bon format (string -> array)
|
||||
=========================================================*/
|
||||
foreach($users_data as $i=>$user)
|
||||
$users_data[$i]['permission'] = explode( ',', str_replace(' ', '', $user['permission']) );
|
||||
|
||||
/* [3] Gestion du retour
|
||||
=========================================================*/
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'users' => $users_data
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* CREATION D'UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Login (identifiant) de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
* @mail<String> Adresse mail de l'utilisateur
|
||||
* @reference<int> Reference vers une Personne (sinon NULL)
|
||||
* @permissions<String> Liste des permissions de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Renvoie l'id de l'utilisateur cree
|
||||
*
|
||||
*/
|
||||
public static function create($login, $password, $mail, $reference, $permissions){
|
||||
/* [0] Verification et formattage des INPUT
|
||||
=========================================================*/
|
||||
$password = sessionManager::sha1($password);
|
||||
$reference = (is_numeric($reference)) ? (int) $reference : null;
|
||||
$permissions = explode( ',', str_replace(' ', '', $permissions) );
|
||||
|
||||
/* [1] Creation de l'utilisateur
|
||||
=========================================================*/
|
||||
$create = new Repo('user/create', array($login, $password, $mail, $reference, $permissions));
|
||||
$created_id = $create->answer();
|
||||
|
||||
// Si erreur de creation, on retourne une erreur
|
||||
if( $created_id === false ) return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
/* [2] Gestion du retour
|
||||
=========================================================*/
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'id_user' => $created_id
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* SUPPRESSION D'UN UTILISATEUR
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
*/
|
||||
public static function remove($id_user){
|
||||
/* [1] On verifie que l'utilisateur existe
|
||||
=========================================================*/
|
||||
$exists = new Repo('user/getById', array($id_user));
|
||||
$exists_status = $exists->answer();
|
||||
|
||||
// Si l'utilisateur n'existe pas, on retourne une erreur
|
||||
if( $exists_status === false ) return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
/* [2] Suppression de l'utilisateur
|
||||
=========================================================*/
|
||||
$remove = new Repo('user/remove', array($id_user));
|
||||
$remove_status = $remove->answer();
|
||||
|
||||
|
||||
/* [3] On verifie que l'utilisateur est bien supprime
|
||||
=========================================================*/
|
||||
$removed = new Repo('user/getById', array($id_user));
|
||||
$removed_status = $removed->answer();
|
||||
|
||||
// Si l'utilisateur n'existe pas, on retourne une erreur
|
||||
if( $removed_status !== false ) return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
|
||||
/* [4] Gestion du retour
|
||||
=========================================================*/
|
||||
return array( 'ModuleError' => ManagerError::Success );
|
||||
}
|
||||
|
||||
// [x] "login",
|
||||
// [x] "logout",
|
||||
// [x] "getById",
|
||||
// [x] "getAll",
|
||||
// [x] "create",
|
||||
// [ ] "remove",
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace manager\module;
|
||||
use \manager\sessionManager;
|
||||
use \manager\Database;
|
||||
use \manager\ManagerError;
|
||||
use \manager\Repo;
|
||||
|
||||
class users{
|
||||
|
||||
|
||||
/* VERIFICATION DES LOGINS D'UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Username ou adresse mail de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Retourne l'id de l'utilisateur si les logins sont corrects
|
||||
*
|
||||
*/
|
||||
public static function login($login, $password){
|
||||
/* [1] On verifie les logins
|
||||
=========================================================*/
|
||||
$check = new Repo('users/login', array($login, $password));
|
||||
$user = $check->answer();
|
||||
|
||||
// Si le login/password est incorrect, on retourne une erreur
|
||||
if( $user === false ) return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
/* [2] Gestion du login
|
||||
=========================================================*/
|
||||
$_SESSION['userid'] = $user['id_user'];
|
||||
$_SESSION['username'] = $user['login'];
|
||||
$_SESSION['permission'] = explode( ',', str_replace(' ', '', $user['permission']) );
|
||||
|
||||
/* [4] Retour de l'id user
|
||||
=========================================================*/
|
||||
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'id_user' => $user['id_user']
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* DECONNEXION D'UN UTILISATEUR
|
||||
*
|
||||
*/
|
||||
public static function logout(){
|
||||
$_SESSION['userid'] = null;
|
||||
$_SESSION['username'] = null;
|
||||
$_SESSION['permission'] = array();
|
||||
}
|
||||
|
||||
// [x] "login",
|
||||
// [x] "logout",
|
||||
// [ ] "getById",
|
||||
// [ ] "getAll",
|
||||
|
||||
// [ ] "create",
|
||||
// [ ] "edit",
|
||||
// [ ] "remove",
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -85,12 +85,7 @@
|
|||
if( !Database::check('sha1', $token) ) return false;
|
||||
|
||||
|
||||
/* [1] Verification du token local
|
||||
=========================================================*/
|
||||
if( substr($_SESSION['session_token'], 0, 40) == $token ) return true;
|
||||
|
||||
|
||||
/* [2] Verification dans la base de donnees
|
||||
/* [1] Verification dans la base de donnees
|
||||
=========================================================*/
|
||||
$check = Database::getPDO()->prepare("SELECT id_token, permission
|
||||
FROM api_token
|
||||
|
@ -104,7 +99,7 @@
|
|||
if( $token_info === false ) return false;
|
||||
|
||||
|
||||
/* [3] On retourne le resultat (les permissions du token)
|
||||
/* [2] On retourne le resultat (les permissions du token)
|
||||
=========================================================*/
|
||||
return explode( ',', str_replace(' ', '', $token_info['permission']) );
|
||||
}
|
||||
|
|
|
@ -0,0 +1,237 @@
|
|||
<?php
|
||||
|
||||
namespace manager\repo;
|
||||
use \manager\Database;
|
||||
use \manager\sessionManager;
|
||||
|
||||
class user{
|
||||
|
||||
|
||||
/* VERIFICATION DU LOGIN/PASSWORD D'UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Username ou Adresse mail de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Retourne l'id de l'utilisateur si ses credentials sont bons
|
||||
*
|
||||
*/
|
||||
public static function login($login, $password){
|
||||
/* [0] Gestion des INPUT
|
||||
=========================================================*/
|
||||
$checker = Database::check('varchar(255)', $login);
|
||||
$checker = $checker && Database::check('text', $password);
|
||||
|
||||
// Si les parametres sont incorrects, on retourne une erreur
|
||||
if( !$checker ) return false;
|
||||
|
||||
|
||||
/* [1] On verifie son login/password dans la BDD
|
||||
=========================================================*/
|
||||
$check = Database::getPDO()->prepare("SELECT id_user, login, permission
|
||||
FROM users
|
||||
WHERE ( login = :username OR mail = :mail ) AND password = :password");
|
||||
$check->execute(array(
|
||||
':username' => $login,
|
||||
':mail' => $login,
|
||||
':password' => sessionManager::sha1($password)
|
||||
));
|
||||
$result = $check->fetch();
|
||||
|
||||
/* [2] Gestion du retour
|
||||
=========================================================*/
|
||||
// Si on a rien trouve, on retourne une erreur
|
||||
if( $result === false ) return false;
|
||||
|
||||
|
||||
// On retourne le resultat
|
||||
return Database::delNumeric( $result );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RETOURNE LES DONNEES D'UN UTILISATEUR D'ID DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return user<Array> Tableau contenant les donnees de l'utilisateur s'il existe sinon retourne FALSE
|
||||
*
|
||||
*/
|
||||
public static function getById($id_user){
|
||||
/* [1] On effectue la requete
|
||||
=========================================================*/
|
||||
$getUser = Database::getPDO()->prepare("SELECT id_user, login, mail, permission
|
||||
FROM users
|
||||
WHERE id_user = :id_user");
|
||||
$getUser->execute(array( ':id_user' => $id_user ));
|
||||
|
||||
|
||||
/* [2] On recupere le resultat de la requete
|
||||
=========================================================*/
|
||||
$userData = $getUser->fetch();
|
||||
|
||||
// Si l'utilisateur n'existe pas, on retourne FALSE
|
||||
if( $userData === false ) return false;
|
||||
|
||||
/* [3] Gestion du retour
|
||||
=========================================================*/
|
||||
return Database::delNumeric( $userData, true );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RETOURNE LES DONNEES DE TOUS LES UTILISATEURS
|
||||
*
|
||||
* @return users<Array> Tableau contenant les donnees des utilisateurs, retourne FALSE si erreur
|
||||
*
|
||||
*/
|
||||
public static function getAll(){
|
||||
/* [1] On effectue la requete
|
||||
=========================================================*/
|
||||
$getUsers = Database::getPDO()->query("SELECT id_user, login, mail, permission
|
||||
FROM users
|
||||
ORDER BY login ASC");
|
||||
|
||||
|
||||
/* [2] On recupere le resultat de la requete
|
||||
=========================================================*/
|
||||
$usersData = $getUsers->fetchAll();
|
||||
|
||||
// Si l'utilisateur n'existe pas, on retourne FALSE
|
||||
if( $usersData === false ) return false;
|
||||
|
||||
/* [3] Gestion du retour
|
||||
=========================================================*/
|
||||
return Database::delNumeric( $usersData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* CREE UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Login (identifiant) de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
* @mail<String> Adresse mail de l'utilisateur
|
||||
* @reference<int> Reference vers une Personne (sinon NULL)
|
||||
* @permissions<Array> Liste des permissions de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Renvoie l'id de l'utilisateur cree ou FALSE si erreur
|
||||
*
|
||||
*/
|
||||
public static function create($login, $password, $mail, $reference, $permissions){
|
||||
/* [0] Verification et formattage des INPUT
|
||||
=========================================================*/
|
||||
$checkInput = Database::check('sha1', $password);
|
||||
$checkInput = $checkInput && ( Database::check('int', $reference) || $reference === null );
|
||||
$checkInput = $checkInput && Database::check('array', $permissions);
|
||||
|
||||
// Si erreur en entree, on retourne FAUX
|
||||
if( !$checkInput ) return false;
|
||||
|
||||
// On formatte les permissions (array -> string)
|
||||
$permissions = implode(',', $permissions);
|
||||
|
||||
|
||||
/* [1] On verifie que le login/mail et reference sont uniques
|
||||
=========================================================*/
|
||||
$checkUnique = Database::getPDO()->prepare("SELECT id_user
|
||||
FROM users
|
||||
WHERE login = :login
|
||||
OR mail = :mail
|
||||
OR ( reference = :reference AND reference is not NULL )");
|
||||
$checkUnique->execute(array(
|
||||
':login' => $login,
|
||||
':mail' => $mail,
|
||||
':reference' => $reference
|
||||
));
|
||||
$unique = $checkUnique->fetch() === false;
|
||||
|
||||
// Si un utilisateur a le meme LOGIN/MAIL ou REFERENCE, on retourne une erreur
|
||||
if( !$unique ) return false;
|
||||
|
||||
|
||||
/* [2] Creation de l'utilisateur
|
||||
=========================================================*/
|
||||
/* (1) Si reference NULL */
|
||||
if( $reference == null ){
|
||||
|
||||
$create = Database::getPDO()->prepare("INSERT INTO users(id_user, login, password, mail, reference, permission)
|
||||
VALUES(DEFAULT, :login, :password, :mail, NULL, :permission)");
|
||||
$create->execute(array(
|
||||
':login' => $login,
|
||||
':password' => $password,
|
||||
':mail' => $mail,
|
||||
':permission' => $permissions
|
||||
));
|
||||
|
||||
/* (2) Si reference est defini */
|
||||
}else{
|
||||
|
||||
$create = Database::getPDO()->prepare("INSERT INTO users(id_user, login, password, mail, reference, permission)
|
||||
VALUES(DEFAULT, :login, :password, :mail, :reference, :permission)");
|
||||
$create->execute(array(
|
||||
':login' => $login,
|
||||
':password' => $password,
|
||||
':mail' => $mail,
|
||||
':reference' => (int) $reference,
|
||||
':permission' => $permissions
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
/* [3] Verification de la creation + recuperation id
|
||||
=========================================================*/
|
||||
$checkCreate = Database::getPDO()->prepare("SELECT id_user
|
||||
FROM users
|
||||
WHERE login = :login
|
||||
AND password = :password
|
||||
AND mail = :mail
|
||||
AND ( reference = :reference OR reference is NULL )
|
||||
AND permission = :permission");
|
||||
$checkCreate->execute(array(
|
||||
':login' => $login,
|
||||
':password' => $password,
|
||||
':mail' => $mail,
|
||||
':reference' => (int) $reference,
|
||||
':permission' => $permissions
|
||||
));
|
||||
|
||||
// On recupere l'id de l'utilisateur
|
||||
$id_user = $checkCreate->fetch();
|
||||
|
||||
// Si erreur, on retourne FALSE
|
||||
if( $id_user === false ) return false;
|
||||
|
||||
/* [4] Gestion du retour
|
||||
=========================================================*/
|
||||
return $id_user['id_user'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* SUPRESSION D'UN UTILISATEUR D'ID DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
*/
|
||||
public static function remove($id_user){
|
||||
/* [1] On effectue la suppression
|
||||
=========================================================*/
|
||||
$getUser = Database::getPDO()->prepare("DELETE FROM users WHERE id_user = :id_user");
|
||||
$getUser->execute(array( ':id_user' => $id_user ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace manager\repo;
|
||||
use \manager\Database;
|
||||
|
||||
class users{
|
||||
|
||||
|
||||
/* VERIFICATION DU LOGIN/PASSWORD D'UN UTILISATEUR
|
||||
*
|
||||
* @login<String> Username ou Adresse mail de l'utilisateur
|
||||
* @password<String> Password de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Retourne l'id de l'utilisateur si ses credentials sont bons
|
||||
*
|
||||
*/
|
||||
public static function login($login, $password){
|
||||
/* [0] Gestion des INPUT
|
||||
=========================================================*/
|
||||
$checker = Database::check('varchar(255)', $login);
|
||||
$checker = $checker && Database::check('text', $password);
|
||||
|
||||
// Si les parametres sont incorrects, on retourne une erreur
|
||||
if( !$checker ) return false;
|
||||
|
||||
|
||||
/* [1] On verifie son login/password dans la BDD
|
||||
=========================================================*/
|
||||
$check = Database::getPDO()->prepare("SELECT id_user, login, permission
|
||||
FROM users
|
||||
WHERE ( login = :username OR mail = :mail ) AND password = :password");
|
||||
$check->execute(array(
|
||||
':username' => $login,
|
||||
':mail' => $login,
|
||||
':password' => sha1($password)
|
||||
));
|
||||
$result = $check->fetch();
|
||||
|
||||
/* [2] Gestion du retour
|
||||
=========================================================*/
|
||||
// Si on a rien trouve, on retourne une erreur
|
||||
if( $result === false ) return false;
|
||||
|
||||
|
||||
// On retourne le resultat
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -7,19 +7,27 @@
|
|||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
enable-background="new 0 0 139 139"
|
||||
height="32"
|
||||
id="Safety"
|
||||
version="1.1"
|
||||
viewBox="0 0 32.000001 32"
|
||||
width="32"
|
||||
xml:space="preserve"
|
||||
id="svg4200"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="token.svg"><metadata
|
||||
id="metadata4207"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs4205" /><sodipodi:namedview
|
||||
sodipodi:docname="token.svg">
|
||||
<metadata
|
||||
id="metadata4208">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs4206" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
|
@ -30,20 +38,22 @@
|
|||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview4203"
|
||||
id="namedview4204"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="13.726619"
|
||||
inkscape:cx="26.74026"
|
||||
inkscape:cy="15.083197"
|
||||
inkscape:zoom="22.627417"
|
||||
inkscape:cx="16.037016"
|
||||
inkscape:cy="14.839514"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Safety" /><path
|
||||
d="m 27.259844,13.87868 c 0.118671,-0.67971 0.184135,-1.37892 0.184135,-2.09374 C 27.443979,5.286998 22.310196,0 16.000007,0 9.6895395,0 4.5554775,5.286998 4.5554775,11.78494 c 0,0.71482 0.06574,1.41347 0.184693,2.09374 -0.993663,0.63459 -1.654433,1.74413 -1.654433,3.01135 l 0,11.53702 c 0,1.9734 1.599833,3.57295 3.572672,3.57295 l 18.6829165,0 c 1.972282,0 3.571836,-1.59955 3.571836,-3.57295 l 0.0011,0 0,-11.53702 c 0,-1.26694 -0.660213,-2.37676 -1.654432,-3.01135 z m -9.683404,10.07368 0,2.50714 c 0,0.87137 -0.705899,1.57727 -1.57699,1.57727 -0.871092,0 -1.57699,-0.7059 -1.57699,-1.57727 l 0,-2.50825 c -1.011491,-0.55742 -1.697612,-1.63298 -1.697612,-2.86984 0,-1.80848 1.466119,-3.27488 3.275159,-3.27488 1.809039,0 3.275437,1.4664 3.275437,3.27488 0,1.23741 -0.686678,2.31381 -1.699004,2.87095 z m 5.513198,-10.63556 -14.1795395,0 c -0.09722,-0.49446 -0.149035,-1.00731 -0.149035,-1.53186 0,-4.1794 3.2473015,-7.579355 7.2389445,-7.579355 3.991363,0 7.238386,3.399675 7.238386,7.579355 0,0.52455 -0.05126,1.0374 -0.148756,1.53186 z"
|
||||
inkscape:current-layer="svg4200" />
|
||||
<path
|
||||
d="m 22.866317,1.1559801 c -5.044932,0 -9.133682,4.08875 -9.133682,9.1336899 0,0.69929 0.07849,1.37718 0.228342,2.0301 L 0,26.27718 l 0,2.28342 2.2834207,2.28342 4.5668413,0 2.2834207,-2.28342 0,-2.28342 2.2834203,0 0,-2.28342 2.283421,0 0,-2.28342 4.566841,0 2.526034,-2.52604 c 0.667187,0.15342 1.359349,0.23548 2.072918,0.23548 C 27.91125,19.41978 32,15.33103 32,10.2861 32,5.2411701 27.907682,1.1559801 22.866317,1.1559801 Z M 13.700524,17.1435 2.2834207,28.5606 l 0,-2.28342 11.4171033,-11.4171 0,2.28342 z m 11.417103,-6.85027 c -1.259449,0 -2.28342,-1.0239701 -2.28342,-2.2834199 0,-1.25945 1.023971,-2.28342 2.28342,-2.28342 1.25945,0 2.283421,1.02397 2.283421,2.28342 0,1.2594498 -1.023971,2.2834199 -2.283421,2.2834199 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0" /></svg>
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="32"
|
||||
version="1.1"
|
||||
width="32"
|
||||
id="svg4252"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="user.svg">
|
||||
<metadata
|
||||
id="metadata4272">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs4270" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview4268"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="9.9375"
|
||||
inkscape:cx="30.621605"
|
||||
inkscape:cy="9.111739"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4252" />
|
||||
<g
|
||||
transform="matrix(1.6,0,0,1.6,-3.2004,-1648.64)"
|
||||
id="g4254">
|
||||
<path
|
||||
d="m 12,1039.4 c -1.277,0 -2.4943,0.2 -3.5938,0.7 0.6485,1.3 2.0108,2.3 3.5938,2.3 1.583,0 2.945,-1 3.594,-2.3 -1.1,-0.5 -2.317,-0.7 -3.594,-0.7 z"
|
||||
id="path4256"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#95a5a6" />
|
||||
<path
|
||||
d="m 8.4062,1041.1 c -2.8856,1.3 -4.9781,4 -5.3437,7.3 0,1.1 0.8329,2 1.9375,2 l 14,0 c 1.105,0 1.938,-0.9 1.938,-2 -0.366,-3.3 -2.459,-6 -5.344,-7.3 -0.649,1.3 -2.011,2.3 -3.594,2.3 -1.583,0 -2.9453,-1 -3.5938,-2.3 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#d35400" />
|
||||
<path
|
||||
d="m 8.4062,1040.1 c -2.8856,1.3 -4.9781,4 -5.3437,7.3 0,1.1 0.8329,2 1.9375,2 l 14,0 c 1.105,0 1.938,-0.9 1.938,-2 -0.366,-3.3 -2.459,-6 -5.344,-7.3 -0.649,1.3 -2.011,2.3 -3.594,2.3 -1.583,0 -2.9453,-1 -3.5938,-2.3 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#e67e22" />
|
||||
<path
|
||||
d="m 12,11 c -1.147,0 -2.2412,0.232 -3.25,0.625 0.9405,0.616 2.047,1 3.25,1 1.206,0 2.308,-0.381 3.25,-1 C 14.241,11.232 13.147,11 12,11 Z"
|
||||
transform="translate(0,1028.4)"
|
||||
id="path4262"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#7f8c8d" />
|
||||
<path
|
||||
d="M 17,4 A 5,5 0 1 1 7,4 5,5 0 1 1 17,4 Z"
|
||||
transform="translate(0,1031.4)"
|
||||
id="path4264"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bdc3c7" />
|
||||
<path
|
||||
d="m 8.4062,1040.1 c -0.3172,0.2 -0.6094,0.3 -0.9062,0.5 0.8153,1.6 2.541,2.8 4.5,2.8 1.959,0 3.685,-1.2 4.5,-2.8 -0.297,-0.2 -0.589,-0.3 -0.906,-0.5 -0.649,1.3 -2.011,2.3 -3.594,2.3 -1.583,0 -2.9453,-1 -3.5938,-2.3 z"
|
||||
style="color:#000000;text-indent:0;text-transform:none;block-progression:tb;fill:#d35400"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -25,9 +25,9 @@
|
|||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="44.32972"
|
||||
inkscape:cy="7.3003018"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:cx="5.5586754"
|
||||
inkscape:cy="1.5580102"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
|
@ -48,7 +48,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -91,16 +91,16 @@
|
|||
id="path4154"
|
||||
transform="translate(-0.06313452,0.09470178)"
|
||||
d="m 117.97656,356.31055 -5.06445,18.90234 8.18945,0 0,-3.95508 -3.125,0 0,-14.94726 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#53d192;fill-opacity:1" />
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#399ced;fill-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4156"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#53d192;fill-opacity:1"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#399ced;fill-opacity:1"
|
||||
d="m 133.64754,367.11655 q 0,2.97851 -0.14649,4.22363 -0.13427,1.23291 -0.8789,2.2583 -0.73243,1.02539 -1.98975,1.57471 -1.25732,0.54931 -2.92969,0.54931 -1.58691,0 -2.85644,-0.51269 -1.25733,-0.5249 -2.02637,-1.5625 -0.76904,-1.0376 -0.91553,-2.2583 -0.14648,-1.22071 -0.14648,-4.27246 l 0,-3.38135 q 0,-2.97852 0.13428,-4.21143 0.14648,-1.24511 0.8789,-2.2705 0.74463,-1.0254 2.00196,-1.57471 1.25732,-0.54932 2.92968,-0.54932 1.58692,0 2.84424,0.5249 1.26953,0.5127 2.03858,1.5503 0.76904,1.03759 0.91552,2.2583 0.14649,1.2207 0.14649,4.27246 l 0,3.38135 z m -5.13916,-6.49414 q 0,-1.3794 -0.15869,-1.75782 -0.14649,-0.39062 -0.62256,-0.39062 -0.40283,0 -0.62256,0.31738 -0.20752,0.30518 -0.20752,1.83106 l 0,9.22851 q 0,1.72119 0.13428,2.12403 0.14648,0.40283 0.65918,0.40283 0.5249,0 0.67138,-0.46387 0.14649,-0.46387 0.14649,-2.20947 l 0,-9.08203 z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4158"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#53d192;fill-opacity:1"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;font-family:Impact;-inkscape-font-specification:'Impact Condensed';fill:#399ced;fill-opacity:1"
|
||||
d="m 147.36824,362.81967 -5.13916,0 0,-1.79443 q 0,-1.69678 -0.14648,-2.12403 -0.14649,-0.42724 -0.6958,-0.42724 -0.47608,0 -0.64698,0.36621 -0.1709,0.36621 -0.1709,1.87988 l 0,9.48487 q 0,1.33056 0.1709,1.75781 0.1709,0.41504 0.6836,0.41504 0.56152,0 0.75683,-0.47608 0.20752,-0.47607 0.20752,-1.85547 l 0,-2.34375 -1.0376,0 0,-3.00293 6.01807,0 0,10.60791 -3.23486,0 -0.47608,-1.41601 q -0.5249,0.91553 -1.33056,1.37939 -0.79346,0.45166 -1.87989,0.45166 -1.29394,0 -2.4292,-0.62255 -1.12304,-0.63477 -1.70898,-1.5625 -0.58594,-0.92774 -0.73242,-1.94092 -0.14649,-1.02539 -0.14649,-3.06397 l 0,-5.87158 q 0,-2.83203 0.30518,-4.11377 0.30518,-1.28174 1.74561,-2.34375 1.45263,-1.07422 3.74755,-1.07422 2.2583,0 3.74756,0.92774 1.48926,0.92773 1.94092,2.20947 0.45166,1.26953 0.45166,3.69873 l 0,0.85449 z" />
|
||||
</g>
|
||||
</g>
|
||||
|
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.1 KiB |
|
@ -39,7 +39,7 @@ $render = $answer->get('render');
|
|||
?>
|
||||
|
||||
|
||||
<section data-sublink='network'>
|
||||
<section data-sublink='phone'>
|
||||
<h6>CERCLE DES RELATIONS</h6>
|
||||
<?= $render; ?>
|
||||
</section>
|
|
@ -29,25 +29,11 @@
|
|||
<img src='/f/png/ut2/st/credits'/>
|
||||
</center>
|
||||
|
||||
<p>Bienvenue sur la Web Application dévéloppée par des chercheurs du CNRS appartenant au LabEx SMS (Structuration des Mondes Sociaux) de l'université de Toulouse.</p>
|
||||
<p>Cette application va vous permettre de cartographier le réseau de vos amis et des relations sociales avec lesquels vous communiquez depuis votre téléphone, facebook, ou hors-ligne.</p>
|
||||
<p>Cette recherche est entièrement à but non lucratif, les informations que vous communiquez ne seront pas exploitées à des fins commerciales.</p>
|
||||
<p>Bienvenue sur la Web Application dévéloppée par des chercheurs du CNRS appartenant au LabEx SMS (Structuration des Mondes Sociaux) de l'université de Toulouse.</p>
|
||||
<p>Cette application va vous permettre de cartographier le réseau de vos amis et des relations sociales avec lesquels vous communiquez depuis votre téléphone, facebook, ou hors-ligne.</p>
|
||||
<p>Cette recherche est entièrement à but non lucratif, les informations que vous communiquez ne seront pas exploitées à des fins commerciales.</p>
|
||||
|
||||
<p>Vous pourrez accéder a la plateforme si vous avez été sondé afin de compléter, consulter et modifier vos informations.</p>
|
||||
<h6>sexe</h6>
|
||||
<input type='radio' name='sexe' value='0' id='sexeM'><label for='sexeM'>Homme</label><br>
|
||||
<input type='radio' name='sexe' value='1' id='sexeF'><label for='sexeF'>Femme</label><br>
|
||||
|
||||
<br>
|
||||
<h6>diplomes</h6>
|
||||
<input type='checkbox' name='diplome' value='0' id='diplomBTS'><label for='diplomBTS'>BTS</label><br>
|
||||
<input type='checkbox' name='diplome' value='1' id='diplomBAC'><label for='diplomBAC'>BAC</label><br>
|
||||
<input type='checkbox' name='diplome' value='1' id='diplomDUT'><label for='diplomDUT'>DUT</label><br>
|
||||
|
||||
<br>
|
||||
<h6>validation</h6>
|
||||
<input type='button' value='Vérifier les données'><br>
|
||||
<input type='button' value='Soumettre' class='primary'><br>
|
||||
<p>Vous pourrez accéder a la plateforme si vous avez été sondé afin de compléter, consulter et modifier vos informations.</p>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
=========================================================*/
|
||||
var TOKEN = {
|
||||
add: { // Tout ce qui attrait a l'ajout
|
||||
toggle: document.getElementById('add-token'), // bouton de toggle pour l'affichage du panel
|
||||
panel: document.querySelector('div[data-add]'), // formulaire de creation
|
||||
state: true, // etat (visible ou non) du panel
|
||||
toggle: document.getElementById('add-token'), // bouton de toggle pour l'affichage du panel
|
||||
panel: document.querySelector("[data-sublink='tokens'] div[data-add]"), // formulaire de creation
|
||||
state: true, // etat (visible ou non) du panel
|
||||
|
||||
name: document.getElementById('add-name'), // nom du token a creer
|
||||
duration: document.getElementById('add-duration'), // duree du token a creer (en jours)
|
||||
submit: document.getElementById('add-submit') // validation de la creation
|
||||
name: document.querySelector("[data-sublink='tokens'] div[data-add] #add-name"), // nom du token a creer
|
||||
duration: document.querySelector("[data-sublink='tokens'] div[data-add] #add-duration"), // duree du token a creer (en jours)
|
||||
submit: document.querySelector("[data-sublink='tokens'] div[data-add] #add-token-submit") // validation de la creation
|
||||
},
|
||||
|
||||
|
||||
|
@ -37,8 +37,8 @@ var TOKEN = {
|
|||
TOKEN.add.submit.addEventListener('click', function(e){
|
||||
// On redige la requete
|
||||
var request = { // on ecrit la requete
|
||||
'path': 'token/generate',
|
||||
'name': TOKEN.add.name.value,
|
||||
'path': 'token/generate',
|
||||
'name': TOKEN.add.name.value,
|
||||
'duration': TOKEN.add.duration.value
|
||||
};
|
||||
|
||||
|
@ -48,17 +48,11 @@ var TOKEN = {
|
|||
if( answer.ModuleError == 0 )
|
||||
reload();
|
||||
|
||||
}, js_access_token);
|
||||
});
|
||||
}, false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* (2) Gestion de la suppression de token */
|
||||
/* (2) Gestion de la suppression d'un token */
|
||||
for( var i = 0 ; i < TOKEN.remove.buttons.length ; i++ ){
|
||||
|
||||
/* (2.0) Pour chaque bouton supprimer, on attache un evenement */
|
||||
|
@ -76,11 +70,115 @@ for( var i = 0 ; i < TOKEN.remove.buttons.length ; i++ ){
|
|||
|
||||
// On lance la requete
|
||||
api.send(request, function(answer){
|
||||
console.log(answer);
|
||||
// Si la suppression effectuee, on recharge la page
|
||||
if( answer.ModuleError == 0 )
|
||||
reload();
|
||||
|
||||
}, js_access_token);
|
||||
});
|
||||
|
||||
}, false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* [2] Gestion des utilisateurs
|
||||
=========================================================*/
|
||||
var USERS = {
|
||||
add: { // Tout ce qui attrait a l'ajout
|
||||
toggle: document.getElementById('add-user'), // bouton de toggle pour l'affichage du panel
|
||||
panel: document.querySelector("[data-sublink='users'] div[data-add]"), // formulaire de creation
|
||||
state: true, // etat (visible ou non) du panel
|
||||
|
||||
login: document.querySelector("[data-sublink='users'] div[data-add] #add-login"), // identifiant de l'utilisateur
|
||||
password: document.querySelector("[data-sublink='users'] div[data-add] #add-password"), // password de l'utilisateur
|
||||
password2: document.querySelector("[data-sublink='users'] div[data-add] #add-password2"), // verification du password de l'utilisateur
|
||||
mail: document.querySelector("[data-sublink='users'] div[data-add] #add-mail"), // adresse mail de l'utilisateur
|
||||
isAdmin: document.querySelector("[data-sublink='users'] div[data-add] #add-admin"), // Bouton radio si l'utilisateur est admin
|
||||
isSubject: document.querySelector("[data-sublink='users'] div[data-add] #add-subject"), // Bouton radio si l'utilisateur est sujet
|
||||
reference: document.querySelector("[data-sublink='users'] div[data-add] #add-reference"), // reference de l'utilisateur
|
||||
submit: document.querySelector("[data-sublink='users'] div[data-add] #add-user-submit") // validation de la creation
|
||||
},
|
||||
|
||||
|
||||
remove: {
|
||||
buttons: document.querySelectorAll('.remove-user')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* (1) Gestion de la creation d'utilisateur */
|
||||
|
||||
/* (1.1) Gestion du toggle pour le panel de creation */
|
||||
USERS.add.toggle.addEventListener('click', function(e){
|
||||
// Gestion du toggle
|
||||
if( USERS.add.state ) USERS.add.panel.addClass('active');
|
||||
else USERS.add.panel.remClass('active');
|
||||
|
||||
USERS.add.state = !USERS.add.state; // switch de l'etat pour le toggle
|
||||
}, false);
|
||||
|
||||
/* (1.2) Gestion de la creation */
|
||||
USERS.add.submit.addEventListener('click', function(e){
|
||||
// On verifie que les 2 mots de passe sont identiques
|
||||
if( USERS.add.password.value != USERS.add.password2.value ){
|
||||
return;
|
||||
}
|
||||
|
||||
// On redige la requete
|
||||
var request = { // on ecrit la requete
|
||||
'path': 'user/create',
|
||||
'login': USERS.add.login.value,
|
||||
'password': USERS.add.password.value,
|
||||
'mail': USERS.add.mail.value,
|
||||
'reference': USERS.add.reference.value,
|
||||
'permissions': (USERS.add.isAdmin.checked) ? 'admin' : 'subject'
|
||||
};
|
||||
|
||||
// On lance la requete
|
||||
api.send(request, function(answer){
|
||||
console.log(answer);
|
||||
// Si la generation effectuee, on recharge la page
|
||||
if( answer.ModuleError == 0 )
|
||||
reload();
|
||||
});
|
||||
|
||||
}, false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* (2) Gestion de la suppression d'utilisateur */
|
||||
for( var i = 0 ; i < USERS.remove.buttons.length ; i++ ){
|
||||
|
||||
/* (2.0) Pour chaque bouton supprimer, on attache un evenement */
|
||||
USERS.remove.buttons[i].addEventListener('click', function(e){
|
||||
var user_id = e.target.parentNode.getData('id');
|
||||
|
||||
/* (2.1) Si on ne trouve pas l'id, on retourne une erreur */
|
||||
if( user_id == false ){ console.warn('id de l\'utilisateur non trouvee'); return; }
|
||||
|
||||
/* (2.2) On lance la suppression */
|
||||
var request = { // on ecrit la requete
|
||||
'path': 'user/remove',
|
||||
'id_user': user_id
|
||||
};
|
||||
|
||||
// On lance la requete
|
||||
api.send(request, function(answer){
|
||||
// Si la suppression effectuee, on recharge la page
|
||||
if( answer.ModuleError == 0 )
|
||||
reload();
|
||||
|
||||
});
|
||||
|
||||
}, false);
|
||||
|
||||
|
|
|
@ -6,23 +6,25 @@
|
|||
use \manager\ResourceDispatcher;
|
||||
use \manager\Database;
|
||||
|
||||
debug();
|
||||
|
||||
|
||||
|
||||
/* [1] Gestion des tokens
|
||||
=========================================================*/
|
||||
// permission: admin
|
||||
//=======================================================//
|
||||
|
||||
/* (1) On recupere la liste des tokens */
|
||||
$req_tokens = new Repo('token/getAll');
|
||||
$tokens = $req_tokens->answer();
|
||||
/* (1) Gestion des droits */
|
||||
if( permission('admin') ){
|
||||
|
||||
/* [1] Gestion des tokens
|
||||
=========================================================*/
|
||||
// permission: admin
|
||||
//=======================================================//
|
||||
|
||||
/* (2) On recupere la liste des tokens */
|
||||
$req_tokens = new Repo('token/getAll');
|
||||
$tokens = $req_tokens->answer();
|
||||
|
||||
|
||||
/* (2) Gestion des droits */
|
||||
if( permission('admin') ){ ?>
|
||||
|
||||
<section data-sublink='tokens'>
|
||||
?><section data-sublink='tokens'>
|
||||
|
||||
<h6 class='center'>Gestion des accès distants</h6><br>
|
||||
|
||||
|
@ -38,9 +40,9 @@ if( permission('admin') ){ ?>
|
|||
<div data-description>Liste des accès distants actifs. Ils seront automatiquement désactivés a la date d'expiration. Veuillez toutefois les supprimer.</div>
|
||||
<!-- Creation d'un nouvel element (cache) -->
|
||||
<div data-add>
|
||||
<label for='add-name'>Nom de l'accès</label><br><input type='text' placeholder='token' id='add-name'><br>
|
||||
<label for='add-duration'>Duree de vie (jours)</label><br><input type='text' value='10' id='add-duration'><br>
|
||||
<input type='button' value='Ajouter un accès' id='add-submit'>
|
||||
<span class='label'>Nom de l'accès</span><input type='text' placeholder='token' id='add-name'><br>
|
||||
<span class='label'>Duree de vie (jours)</span><input type='text' value='10' id='add-duration'><br>
|
||||
<input type='submit' value='Ajouter un accès' id='add-token-submit'>
|
||||
</div>
|
||||
|
||||
<!-- Conteneur de la liste des elements -->
|
||||
|
@ -52,9 +54,9 @@ if( permission('admin') ){ ?>
|
|||
echo "<li data-element data-id='".$token['id']."'>";
|
||||
// Si token actif
|
||||
if( !$token['expired'] )
|
||||
echo "<div class='active'><span>actif</span></div>";
|
||||
echo "<div class='active' data-token><span>actif</span></div>";
|
||||
else
|
||||
echo "<div><span>Expiré</span></div>";
|
||||
echo "<div data-token><span>Expiré</span></div>";
|
||||
|
||||
|
||||
echo "<div>";
|
||||
|
@ -76,8 +78,79 @@ if( permission('admin') ){ ?>
|
|||
</section>
|
||||
</section>
|
||||
|
||||
<?php } ?>
|
||||
<?php
|
||||
/* [2] Gestion des utilisateurs
|
||||
=========================================================*/
|
||||
// permission: admin
|
||||
//=======================================================//
|
||||
|
||||
<section data-sublink='users'>
|
||||
Gestion des utilisateurs
|
||||
</section>
|
||||
/* (1) On recupere la liste des utilisateurs */
|
||||
$req_users = new ModuleRequest('user/getAll');
|
||||
$answer_users = $req_users->dispatch();
|
||||
// Si erreur de requete
|
||||
if( $answer_users->error != ManagerError::Success )
|
||||
var_dump( ManagerError::explicit($answer_users->error) );
|
||||
// On recupere la liste des utilisateurs
|
||||
$users = $answer_users->get('users');
|
||||
|
||||
|
||||
?><section data-sublink='users'>
|
||||
<h6 class='center'>Gestion des utilisateurs</h6><br>
|
||||
|
||||
<!-- [1] Panel d'ajout/suppression d'utilisateur -->
|
||||
<section data-panel-list>
|
||||
<!-- Header -->
|
||||
<div data-header>
|
||||
<span>Gestion des utilisateurs</span>
|
||||
<button id='add-user'>Ajouter un utilisateur</button>
|
||||
</div>
|
||||
|
||||
<!-- Description des utilisateurs et des permissions -->
|
||||
<div data-description>Liste des utilisateurs de la plateforme. Un <i>administrateur</i> peut tout faire. Un <i>sujet</i> peut compléter ses données et les consulter.</div>
|
||||
<!-- Creation d'un nouvel element (cache) -->
|
||||
<div data-add>
|
||||
<span class='label'>Identifiant</span><input type='text' id='add-login'><br>
|
||||
<span class='label'>Adresse mail</span><input type='email' id='add-mail'><br>
|
||||
<span class='label'>Mot de passe</span><input type='password' id='add-password'><br>
|
||||
<span class='label'>Vérification du mot de passe</span><input type='password' id='add-password2'><br>
|
||||
<span class='label'>Droits</span>
|
||||
<input type='radio' name='add-permissions' value='subject' id='add-subject' checked='true'><label for='add-subject'>Sujet</label>
|
||||
<input type='radio' name='add-permissions' value='admin' id='add-admin'><label for='add-admin'>Administrateur</label><br>
|
||||
<span class='label'>Identifiant d'étude (optionnel)</span><input type='text' id='add-reference'><br>
|
||||
<input type='submit' value='Créer un utilisateur' id='add-user-submit'>
|
||||
</div>
|
||||
|
||||
<!-- Conteneur de la liste des elements -->
|
||||
<ul data-list>
|
||||
|
||||
<!-- Elements de la liste -->
|
||||
<?php
|
||||
foreach($users as $user){
|
||||
echo "<li data-element data-id='".$user['id_user']."'>";
|
||||
// Si user actif
|
||||
if( in_array('admin', $user['permission']) )
|
||||
echo "<div class='active' data-user><span>Administrateur</span></div>";
|
||||
else
|
||||
echo "<div data-user><span>Sujet</span></div>";
|
||||
|
||||
|
||||
echo "<div>";
|
||||
echo "<span data-prefix='Identifiant'>".$user['login']."</span>";
|
||||
echo "<span data-prefix='Adresse mail'>".$user['mail']."</span>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<button class='remove-user'>Supprimer</button>";
|
||||
echo "</li>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- FIN PERMISSION ADMIN -->
|
||||
<?php } ?>
|
Loading…
Reference in New Issue