Merged feature/refactor_module_repo into dev
This commit is contained in:
commit
84bf2837cb
|
@ -1,3 +1,8 @@
|
|||
AuthType Basic
|
||||
AuthName "Private project -> wait for production"
|
||||
AuthUserFile /var/www/socioview.pass
|
||||
|
||||
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
|
|
@ -1,17 +1,58 @@
|
|||
{
|
||||
|
||||
"call_log": [
|
||||
"unserialize"
|
||||
],
|
||||
"users": {
|
||||
"login": {
|
||||
"description": "Test de connexion avec un login (identifiant ou adresse mail) et un mot de passe.",
|
||||
"parameters": {
|
||||
"login": { "description": "Identifiant ou adresse mail", "type": "varchar(255)" },
|
||||
"password": { "description": "Mot de passe", "type":"text" }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"charts": [
|
||||
"network_data",
|
||||
"network_render"
|
||||
],
|
||||
|
||||
"token" :[
|
||||
"remove",
|
||||
"generate"
|
||||
]
|
||||
"call_log": {
|
||||
"unserialize": {
|
||||
"description": "Recupere le contenu d'un fichier XML de journal d'appel.",
|
||||
"parameters": {
|
||||
"filecontent": { "description": "Contenu du fichier XML", "type": "text" }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"charts": {
|
||||
|
||||
"network_data": {
|
||||
"description": "Renvoie un jeu de donnees fictif pour un graphique de type #network.",
|
||||
"parameters": {}
|
||||
},
|
||||
|
||||
"network_render": {
|
||||
"description": "Renvoie le contenu du svg representant un graphique de type #network avec les donnees recues.",
|
||||
"parameters": {
|
||||
"dataset": { "description": "Dataset au bon format pour un graphique de type #network." }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"token": {
|
||||
|
||||
|
||||
"remove": {
|
||||
"description": "Suppression d'un token d'id donne.",
|
||||
"parameters": {
|
||||
"token_id": { "description": "UID du token a supprimer", "type": "id" }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"generate": {
|
||||
"description": "Creation d'un token de nom et de duree donnee",
|
||||
"parameters": {
|
||||
"name": { "description": "Nom attribue au token", "type": "varchar(50)" },
|
||||
"duration": { "description": "Duree du token en nombre de jours", "type": "numeric" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,9 @@
|
|||
{
|
||||
|
||||
"users": [
|
||||
"login"
|
||||
],
|
||||
|
||||
"Personnes": [
|
||||
"getById"
|
||||
],
|
||||
|
|
|
@ -17,5 +17,4 @@ $dark-fg-primary: #ffffff;
|
|||
=========================================================*/
|
||||
/* (1) Layout de base */
|
||||
$menu-side-width: 15em;
|
||||
$header-height: 5em;
|
||||
$header-elements: calc( #{$header-height} - 2*1.5em );
|
||||
$header-height: 4em;
|
||||
|
|
|
@ -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}#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 #53d192;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:#53d192;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="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="button"]:hover{background-color:#515151;color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary{border-color:#53d192;color:#53d192;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary:hover{background-color:#53d192;color:#fff}
|
||||
#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 #53d192;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:#53d192;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:#53d192;color:#53d192;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="submit"].primary:hover,#WRAPPER>#CONTAINER>section input[type="button"].primary:hover{background-color:#53d192;color:#fff}
|
||||
/*# 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,CAZd,kCAAQ,CAAC,OAAO,CAAE,KAAK,CAkBvB,8BAAI,CACH,KAAK,CAAE,OAAsB,CAC7B,SAAS,CAAE,KAAK,CAChB,cAAc,CAAE,SAAS,CACzB,WAAW,CAAE,GAAG,CAChB,cAAc,CAAE,IAAI,CAEpB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAEV,qCAAQ,CAAC,OAAO,CAAC,IAAI,CACrB,oCAAO,CAAC,OAA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vB,gBAAgB,CAAE,kCAAkC,CAKrD,oEAA4C,CAC3C,aAAa,CAAE,GAAG,CASnB,iGACsB,CACrB,MAAM,CAAE,MAAM,CACd,OAAO,CAAE,SAAS,CAElB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAAmB,CAE3B,WAAW,CAAE,IAAI,CACjB,KAAK,CCxHW,OAAO,CD0HvB,gBAAgB,CAAE,IAAI,CAEtB,UAAU,CAAE,iDAAiD,CAG7D,6GAAO,CACN,gBAAgB,CChID,OAAO,CDiItB,KAAK,CAAE,IAAI,CAKZ,iHAAS,CACR,YAAY,CCtIG,OAAO,CDuItB,KAAK,CCvIU,OAAO,CDwItB,gBAAgB,CAAE,IAAI,CAItB,6HAAO,CACN,gBAAgB,CC7IF,OAAO,CD8IrB,KAAK,CAAE,IAAI",
|
||||
"sources": ["container.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "container.css"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
display: none;
|
||||
|
||||
// Gestion de l'activation des sous-parties
|
||||
&.active{display: block;}
|
||||
&.active{ display: block; }
|
||||
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
|
@ -22,6 +22,8 @@
|
|||
color: #000;
|
||||
font-size: 1em;
|
||||
|
||||
border: 1px solid #ddd;
|
||||
|
||||
|
||||
|
||||
/* [2] Titres
|
||||
|
@ -112,6 +114,7 @@
|
|||
|
||||
/* [5] Boutons de submit
|
||||
=========================================================*/
|
||||
& input[type="submit"],
|
||||
& input[type="button"]{
|
||||
margin: .5em 0;
|
||||
padding: .3em .5em;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#WRAPPER>#HEADER>#searchbar{display:block;position:relative;width:10%;margin:1.3em 0;padding:.2em 1em;border:0;border-radius:2em;background-color:#e8e8e8;transition:transform .3s ease-in-out, width .3s ease-in-out}#WRAPPER>#HEADER>#searchbar:focus{width:20%}#WRAPPER>#HEADER>.user-picture{display:block;position:relative;margin-left:2em;width:calc( 5em - 2*1.5em );height:calc( 5em - 2*1.5em );border-radius:50% / 50%;background:#e8e8e8 url("/f/svg/nopic/st/header") center center no-repeat;background-size:auto 80%;cursor:default;align-self:center}#WRAPPER>#HEADER>.user-picture.active{background-image:url("/f/svg/sample/dy/profile");background-size:auto 100%}#WRAPPER>#HEADER>.user-name{display:block;position:relative;margin-left:1em;margin-right:4em;color:#828282;align-self:center;cursor:pointer}#WRAPPER>#HEADER>.user-name:hover{color:#4f4f4f}#WRAPPER>#HEADER>.user-panel{display:block;position:absolute;top:calc( 5em - 1em );right:0;margin:.5em;border-radius:5px;border:1px solid #cfcfcf;background-color:#fff;transition:left .3s ease-in-out}#WRAPPER>#HEADER>.user-panel>span{display:block;position:relative;color:#000;padding:.5em 1em;padding-left:2em;cursor:pointer}#WRAPPER>#HEADER>.user-panel>span:not(:last-child){border-bottom:1px solid #ddd}#WRAPPER>#HEADER>.user-panel>span:hover{background-color:#eee}#WRAPPER>#HEADER>.user-panel:before{content:'';display:block;position:absolute;top:-2.5em;left:-3.2em;width:1em;height:1em;background:url("/f/svg/expand/st/header/999999") center center no-repeat;background-size:1em 1em;cursor:pointer}#WRAPPER>#HEADER>.user-panel:before:hover{background-image:url("/f/svg/expand/st/header/ff0000")}#WRAPPER>#HEADER>#toggle-user-panel{display:none}#WRAPPER>#HEADER>#toggle-user-panel+.user-panel{left:100%}#WRAPPER>#HEADER>#toggle-user-panel:checked+.user-panel{left:auto}#WRAPPER>#HEADER>#toggle-user-panel:checked+.user-panel:before{left:7em}
|
||||
#WRAPPER>#HEADER>#searchbar{display:inline-block;position:absolute;top:.8em;left:1em;width:20em;height:2em;padding:.2em 1em;border:0;border-radius:3px;background-color:#e8e8e8}#WRAPPER>#HEADER>#user-data{display:inline-block;position:absolute;top:0;right:0;height:calc( 100% - 2*1em )}#WRAPPER>#HEADER>#user-data>#user-name{display:block;position:absolute;top:0;right:calc( 4em*2 - 1em );height:4em;padding:0 1em;color:#828282;line-height:4em;white-space:nowrap;cursor:pointer}#WRAPPER>#HEADER>#user-data>#user-name:hover{color:#4f4f4f}#WRAPPER>#HEADER>#user-data>#user-picture{display:block;position:absolute;top:1em;right:4em;width:calc( 4em - 2*1em );height:calc( 4em - 2*1em );border-radius:50% / 50%;background:#e8e8e8 url("/f/svg/nopic/st/header") center center no-repeat;background-size:auto 80%;cursor:default;align-self:center}#WRAPPER>#HEADER>#user-data>#user-picture.active{background-image:url("/f/svg/sample/dy/profile");background-size:auto 100%}#WRAPPER>#HEADER>#user-data:before{content:'';display:block;position:absolute;top:0;right:0;width:4em;height:4em;background:url("/f/svg/expand/st/header/999999") center center no-repeat;background-size:1em 1em;cursor:pointer}#WRAPPER>#HEADER>.user-panel{display:block;position:absolute;top:calc( 4em - 1em );right:0;margin:.5em;border-radius:5px;border:1px solid #cfcfcf;background-color:#fff;transition:left .3s ease-in-out}#WRAPPER>#HEADER>.user-panel>span{display:block;position:relative;color:#000;padding:.5em 1em;padding-left:2em;cursor:pointer}#WRAPPER>#HEADER>.user-panel>span:not(:last-child){border-bottom:1px solid #ddd}#WRAPPER>#HEADER>.user-panel>span:hover{background-color:#eee}#WRAPPER>#HEADER>#toggle-user-panel{display:none}#WRAPPER>#HEADER>#toggle-user-panel+.user-panel{left:100%}#WRAPPER>#HEADER>#toggle-user-panel:checked+.user-panel{left:auto}#WRAPPER>#HEADER>#toggle-user-panel:checked+.user-panel:before{left:7em}
|
||||
/*# sourceMappingURL=header.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAOC,2BAAc,CACb,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,GAAG,CAEX,MAAM,CAAE,OAAO,CAEf,OAAO,CAAE,QAAQ,CAEjB,MAAM,CAAE,CAAC,CACT,aAAa,CAAE,GAAG,CAElB,gBAAgB,CChBC,OAAO,CDkBxB,UAAU,CAAE,gDAAgD,CAG5D,iCAAO,CACN,KAAK,CAAE,GAA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KzB,MAAM,CAAE,OAAO,CAEf,UAAU,CAAE,MAAM,CAJlB,gDAAQ,CAAE,gBAAgB,CAAE,+BAA+B,CAAE,eAAe,CAAE,SAAS,CAUxF,kCAAQ,CACP,OAAO,CAAE,EAAE,CACX,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,CAAC,CACN,KAAK,CAAE,CAAC,CACR,KAAK,CCzES,GAAG,CD0EjB,MAAM,CC1EQ,GAAG,CD4ElB,UAAU,CAAE,6DAA6D,CACzE,eAAe,CAAE,OAAO,CAExB,MAAM,CAAE,OAAO,CAWjB,4BAAe,CACX,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACd,GAAG,CAAE,iBAA+B,CACpC,KAAK,CAAE,CAAC,CAET,MAAM,CAAE,IAAI,CAElB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAA+B,CAEjC,gBAAgB,CAAE,IAAI,CAEtB,UAAU,CAAE,oBAAoB,CAIhC,iCAAQ,CACP,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAOxB,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,QAAQ,CACjB,YAAY,CAAE,GAAG,CAEjB,MAAM,CAAE,OAAO,CARf,kDAAkB,CACjB,aAAa,CAAE,cAAc,CAU9B,uCAAO,CACN,gBAAgB,CAAE,IAAI,CAUzB,mCAAsB,CAAE,OAAO,CAAE,IAAI,CACrC,+CAAoC,CAAE,IAAI,CAAE,IAAI,CAChD,uDAA4C,CAAE,IAAI,CAAE,IAAI,CACxD,8DAAmD,CAAE,IAAI,CAAE,GAAG",
|
||||
"sources": ["header.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "header.css"
|
||||
|
|
140
css/header.scss
140
css/header.scss
|
@ -6,69 +6,101 @@
|
|||
/* [1] Barre de recherche
|
||||
=========================================================*/
|
||||
& > #searchbar{
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 10%;
|
||||
|
||||
margin: 1.3em 0;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: .8em;
|
||||
left: 1em;
|
||||
width: 20em;
|
||||
height: 2em;
|
||||
|
||||
padding: .2em 1em;
|
||||
|
||||
border: 0;
|
||||
border-radius: 2em;
|
||||
border-radius: 3px;
|
||||
|
||||
background-color: $theme-bg;
|
||||
|
||||
transition: transform .3s ease-in-out, width .3s ease-in-out;
|
||||
|
||||
// @focus
|
||||
&:focus{
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* [2] Informations utilisateur
|
||||
=========================================================*/
|
||||
/* (1) Image du profil */
|
||||
& > .user-picture{
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-left: 2em;
|
||||
width: $header-elements;
|
||||
height: $header-elements;
|
||||
/* (0) Conteneur */
|
||||
& > #user-data{
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: calc( 100% - 2*1em );
|
||||
|
||||
border-radius: 50% / 50%;
|
||||
|
||||
background: $theme-bg url('/f/svg/nopic/st/header') center center no-repeat;
|
||||
background-size: auto 80%;
|
||||
/* (1) Username de l'utilisateur */
|
||||
& > #user-name{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: calc( #{$header-height}*2 - 1em );
|
||||
height: $header-height;
|
||||
|
||||
// Si on est connecte
|
||||
&.active{ background-image: url('/f/svg/sample/dy/profile'); background-size: auto 100%; }
|
||||
padding: 0 1em;
|
||||
|
||||
cursor: default;
|
||||
color: darken($theme-bg, 40);
|
||||
line-height: $header-height;
|
||||
white-space: nowrap;
|
||||
|
||||
align-self: center;
|
||||
}
|
||||
cursor: pointer;
|
||||
|
||||
/* (2) Username de l'utilisateur */
|
||||
& > .user-name{
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-left: 1em;
|
||||
margin-right: 4em;
|
||||
|
||||
color: darken($theme-bg, 40);
|
||||
// Animation de @hover
|
||||
&:hover{
|
||||
color: darken($theme-bg, 60);
|
||||
}
|
||||
|
||||
// flex alignment
|
||||
align-self: center;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
// Animation de @hover
|
||||
&:hover{
|
||||
color: darken($theme-bg, 60);
|
||||
}
|
||||
|
||||
|
||||
/* (2) Image du profil */
|
||||
& > #user-picture{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
right: $header-height;
|
||||
width: calc( #{$header-height} - 2*1em );
|
||||
height: calc( #{$header-height} - 2*1em );
|
||||
|
||||
|
||||
border-radius: 50% / 50%;
|
||||
|
||||
background: $theme-bg url('/f/svg/nopic/st/header') center center no-repeat;
|
||||
background-size: auto 80%;
|
||||
|
||||
// Si on est connecte
|
||||
&.active{ background-image: url('/f/svg/sample/dy/profile'); background-size: auto 100%; }
|
||||
|
||||
cursor: default;
|
||||
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* (3) Icone d'activation */
|
||||
&:before{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: $header-height;
|
||||
height: $header-height;
|
||||
|
||||
background: url('/f/svg/expand/st/header/999999') center center no-repeat;
|
||||
background-size: 1em 1em;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,7 +133,6 @@
|
|||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
|
||||
color: #000;
|
||||
padding: .5em 1em;
|
||||
padding-left: 2em;
|
||||
|
@ -115,28 +146,7 @@
|
|||
}
|
||||
|
||||
|
||||
/* (2) Icone d'activation */
|
||||
&:before{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -2.5em;
|
||||
left: -3.2em;
|
||||
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
|
||||
background: url('/f/svg/expand/st/header/999999') center center no-repeat;
|
||||
background-size: 1em 1em;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
// @hover
|
||||
&:hover{
|
||||
background-image: url('/f/svg/expand/st/header/ff0000');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
body{font-family:'Open Sans';font-size:15px}#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#e8e8e8;overflow-x:hidden;overflow-y:auto;z-index:1}#WRAPPER>#HEADER{display:flex;position:absolute;top:0;left:15em;width:calc( 100% - 15em );height:calc( 5em - 1px );border-bottom:1px solid #e5e5e5;background-color:#fff;flex-direction:row;justify-content:flex-end;align-content:space-around;z-index:10}#WRAPPER>#MENU-SIDE{display:block;position:fixed;top:0;left:0;width:15em;height:100%;box-shadow:2px 1px 3px #ddd;background-color:#32323a;transition:all .3s;z-index:9}#WRAPPER>#CONTAINER{display:flex;position:absolute;top:5em;left:15em;width:calc( 100% - 15em - 2*1em );min-height:calc( 100% - 5em - 2*1em );padding:1em;flex-direction:row;justify-content:space-between;overflow-x:none;overflow-y:auto}#LOGIN{display:flex;position:fixed;top:0;left:-100%;width:100%;height:100%;flex-direction:row;flex-wrap:nowrap;justify-content:space-around;align-items:center;background-color:#32323a;transition:left .3s ease-in-out;z-index:101}#LOGIN.active{left:0}#LOGIN>#login-icon{width:5em;height:5em;background-color:#f00}#LOGIN>#login-form{display:block}#LOGIN>#login-form>input[type='text'],#LOGIN>#login-form>input[type='password'],#LOGIN>#login-form>input[type='button']{display:flex;width:20em;margin:2em 0;padding:1em 2em;flex-direction:column;justify-content:space-around;flex-wrap:nowrap;align-items:middle;border-radius:5px;border:1px solid #6b6b6b;background-color:#32323a;color:#fff;transition:border .2s ease-in-out}#LOGIN>#login-form>input[type='text']:hover,#LOGIN>#login-form>input[type='text']:focus,#LOGIN>#login-form>input[type='password']:hover,#LOGIN>#login-form>input[type='password']:focus,#LOGIN>#login-form>input[type='button']:hover,#LOGIN>#login-form>input[type='button']:focus{border-color:#53d192}#LOGIN>#login-form>input[type='button']{margin:2em auto;border:0;background-color:#53d192;color:#fff;font-weight:bold}#LOGIN>#login-form>input[type='button']:hover{box-shadow:0 0 1em #1a1a1f}
|
||||
body{font-family:'Open Sans';font-size:15px}#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#e8e8e8;overflow-x:hidden;overflow-y:auto;z-index:1}#WRAPPER>#HEADER{display:block;position:fixed;top:0;left:0;width:100%;height:calc( 4em - 1px );border-bottom:1px solid #cfcfcf;background-color:#fff;z-index:9}#WRAPPER>#MENU-SIDE{display:block;position:fixed;top:4em;left:0;width:15em;height:calc( 100% - 4em );box-shadow:2px 1px 3px #ddd;background-color:#32323a;transition:all .3s;z-index:10}#WRAPPER>#CONTAINER{display:flex;position:absolute;top:4em;left:15em;width:calc( 100% - 15em - 2*1em );min-height:calc( 100% - 4em - 2*1em );padding:1em;flex-direction:row;justify-content:space-between;overflow-x:none;overflow-y:auto}#LOGIN{display:flex;position:fixed;top:0;left:-100%;width:100%;height:100%;flex-direction:row;flex-wrap:nowrap;justify-content:space-around;align-items:center;background-color:#32323a;transition:left .3s ease-in-out;z-index:101}#LOGIN.active{left:0}#LOGIN>#login-icon{width:35em;height:10em;background:url("/f/svg/icon/st") center center no-repeat;background-size:auto 100%}#LOGIN>#login-form{display:block}#LOGIN>#login-form>input[type='text'],#LOGIN>#login-form>input[type='password'],#LOGIN>#login-form>input[type='button']{display:flex;width:20em;margin:2em 0;padding:1em 2em;flex-direction:column;justify-content:space-around;flex-wrap:nowrap;align-items:middle;border-radius:5px;border:1px solid #6b6b6b;background-color:#32323a;color:#fff;transition:border .2s ease-in-out;cursor:default}#LOGIN>#login-form>input[type='text']:hover,#LOGIN>#login-form>input[type='text']:focus,#LOGIN>#login-form>input[type='password']:hover,#LOGIN>#login-form>input[type='password']:focus,#LOGIN>#login-form>input[type='button']:hover,#LOGIN>#login-form>input[type='button']:focus{border-color:#53d192}#LOGIN>#login-form>input[type='button']{margin:2em auto;border:0;background-color:#53d192;color:#fff;font-weight:bold;cursor:pointer}#LOGIN>#login-form>input[type='button']:hover{background-color:#33be79;box-shadow:0 0 1em #1a1a1f}#LOGIN>#login-form>#lost-password{color:#ddd;cursor:pointer}#LOGIN>#login-form>#lost-password:hover{color:#53d192;text-decoration:underline}#LOGIN>#login-close{display:block;position:absolute;top:2em;right:2em;width:2em;height:2em;background:url("/f/svg/close/st/container/ffffff") center center no-repeat;background-size:80%;cursor:pointer}
|
||||
/*# sourceMappingURL=layout.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAEA,IAAI,CAEH,WAAW,CAAE,WAAW,CACxB,SAAS,CAAE,IAAI,CAKhB,QAAQ,CACP,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,KAAK,CACd,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CAEb,gBAAgB,CCfE,OAAO,CDiBzB,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,IAAI,CAEhB,OAAO,CAAE,CAAC,CAKV,gBAAW,CACV,OAAO,CAAE,IAAI,CACb,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,CAAC,CACN,IAAI,CCdW,IAAI,CDenB,KAAK,CAAE,mBAAkC,CACzC,MAAM,CAAE,iBAA+B,CAExC,aAAa,CAAE,iBAA8B,CAE7C,gBAAgB,CClCC,IAAO,CDqCxB,cAAc,CAAE,GAAG,CACnB,eAAe,CAAE,QAAQ,CACzB,aAAa,CAAE,YAAY,CAE3B,OAAO,CAAE,EAAE,CAQZ,mBAAc,CACb,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,KAAK,CACd,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CCxCU,IAAI,CDyCnB,MAAM,CAAE,IAAI,CAEb,UAAU,CAAE,gBAAgB,CAE5B,gBAAgB,CCtDA,OAAO,CDwDvB,UAAU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,KAAK,CC5LU,IAAO,CD8LtB,MAAM,CAAE,OAAO,CAGf,uCAAO,CACN,KAAK,CCvMU,OAAO,CDwMtB,eAAe,CAAE,SAAS,CAO7B,mBAAgB,CACf,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,GAAG,CACV,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CAEZ,UAAU,CAAE,+DAA+D,CAC3E,eAAe,CAAE,GAAG,CAEpB,MAAM,CAAE,OAAO",
|
||||
"sources": ["layout.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "layout.css"
|
||||
|
|
|
@ -27,23 +27,18 @@ body{
|
|||
/* [1] Header de la page
|
||||
==========================================*/
|
||||
& > #HEADER{
|
||||
display: flex;
|
||||
position: absolute;
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: $menu-side-width;
|
||||
width: calc( 100% - #{$menu-side-width} );
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc( #{$header-height} - 1px );
|
||||
|
||||
border-bottom: 1px solid darken($theme-bg, 1);
|
||||
border-bottom: 1px solid darken($theme-bg, 10);
|
||||
|
||||
background-color: $theme-bg-primary;
|
||||
|
||||
// Flex properties
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-content: space-around;
|
||||
|
||||
z-index: 10;
|
||||
z-index: 9;
|
||||
|
||||
}
|
||||
|
||||
|
@ -54,10 +49,10 @@ body{
|
|||
& > #MENU-SIDE{
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
top: $header-height;
|
||||
left: 0;
|
||||
width: $menu-side-width;
|
||||
height: 100%;
|
||||
height: calc( 100% - #{$header-height} );
|
||||
|
||||
box-shadow: 2px 1px 3px #ddd;
|
||||
|
||||
|
@ -65,7 +60,7 @@ body{
|
|||
|
||||
transition: all .3s;
|
||||
|
||||
z-index: 9;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
|
||||
|
@ -125,10 +120,11 @@ body{
|
|||
|
||||
/* (1) Logo et nom du site */
|
||||
& > #login-icon{
|
||||
width: 5em;
|
||||
height: 5em;
|
||||
width: 35em;
|
||||
height: 10em;
|
||||
|
||||
background-color: #f00;
|
||||
background: url('/f/svg/icon/st') center center no-repeat;
|
||||
background-size: auto 100%;
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,6 +159,8 @@ body{
|
|||
|
||||
transition: border .2s ease-in-out;
|
||||
|
||||
cursor: default;
|
||||
|
||||
// Animation de @hover/@focus
|
||||
&:hover,
|
||||
&:focus{
|
||||
|
@ -183,12 +181,47 @@ body{
|
|||
color: $dark-fg-primary;
|
||||
font-weight: bold;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
// Animation de @hover
|
||||
&:hover{
|
||||
background-color: darken($theme-fg-primary, 10);
|
||||
box-shadow: 0 0 1em darken($dark-bg, 10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* (3) Mot de passe oublie */
|
||||
& > #lost-password{
|
||||
color: $dark-fg;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
// Animation de @hover
|
||||
&:hover{
|
||||
color: $theme-fg-primary;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* (4) Gestio de la fermeture */
|
||||
& > #login-close{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
right: 2em;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
|
||||
background: url('/f/svg/close/st/container/ffffff') center center no-repeat;
|
||||
background-size: 80%;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
#WRAPPER>#MENU-SIDE>span:not(.icon){display:block;position:relative;width:calc( 100% - 2*1em - 2*1.5em );padding:1.5em 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/777777") right 1em center no-repeat;background-size:2em 2em, 1em 1em;color:#ddd;text-shadow:1px 1px 0 #26262c;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:not(.icon).active{background:url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat,url("/f/svg/sub-active/st/menu-side/dddddd") right 1em center no-repeat;background-size:2em 2em, 1em 1em}#WRAPPER>#MENU-SIDE>span:not(.icon)>svg,#WRAPPER>#MENU-SIDE>span:not(.icon)>svg *{position:absolute;top:calc( 50% - 1em/2 );left:1.5em;width:1em;height:1em;fill:#ddd !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon):hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg,#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg *,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg *{fill:#53d192 !important}#WRAPPER>#MENU-SIDE>span.icon{display:block;position:relative;width:calc( 100% - 3em - 2*1.5em );height:calc( 5em - 1px );padding:0 1.5em;padding-left:calc( 1.5em + 3em );border-bottom:1px solid transparent;background:#32323a;color:#fff;text-shadow:1px 1px 0 #26262c;font-weight:bold;line-height:5em}#WRAPPER>#MENU-SIDE>span.icon>svg,#WRAPPER>#MENU-SIDE>span.icon>svg *{position:absolute;top:calc( 50% - 5em/2 );left:1.5em;height:5em}#WRAPPER>#MENU-SIDE>span.icon:hover{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span.sep{border-bottom:1px solid #4a4a55}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span{display:block;position:relative;width:calc( 100% - 2*1.5em );padding:.5em 1.5em;padding-left:1.5em;border-bottom:1px solid transparent;background:#242329 url("/f/svg/sub/st/menu-side/888888") 0.5em center no-repeat;background-size:.5em;color:#aaa;font-size:.85em;cursor:pointer;transition:color .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span:hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active+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:1.5em 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/777777") right 1em center no-repeat;background-size:2em 2em, 1em 1em;color:#ddd;text-shadow:1px 1px 0 #26262c;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/29282e") 1em center no-repeat,url("/f/svg/sub-active/st/menu-side/dddddd") right 1em center no-repeat;background-size:2em 2em, 1em 1em}#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:#ddd !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:hover,#WRAPPER>#MENU-SIDE>span.active{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#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:#53d192 !important}#WRAPPER>#MENU-SIDE>span.sep{border-bottom:1px solid #4a4a55}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span{display:block;position:relative;width:calc( 100% - 2*1.5em );padding:.5em 1.5em;padding-left:1.5em;border-bottom:1px solid transparent;background:#242329 url("/f/svg/sub/st/menu-side/888888") 0.5em center no-repeat;background-size:.5em;color:#aaa;font-size:.85em;cursor:pointer;transition:color .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span:hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active+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,mCAAmB,CAClB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,8BAA8B,CAEtC,OAAO,CAAE,WAAW,CACpB,YAAY,CAAE,qBAAqB,CAEnC,aAAa,CAAE,qBAAqB,CAEpC,UAAU,CAAE,8HAC0D,CACtE,eAAe,CAAE,gBAAgB,CAUjC,KAAK,CCjBW,IAAO,CDkBvB,WAAW,CAAE,iBAA6B,CAE1C,UAAU,CAAE,qGAAqG,CAEjH,MAAM,CAAE,OAAO,CAXf,0CAAQ,CACP,UAAU,CAAE,qIACgE,CAC5E,eAAe,CAAE,gBAAgB,CAWlC,iFAAkB,CACjB,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,mBAAmB,CACxB,IAAI,CAAE,KAAK,CACX,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CAEZ,IAAI,CAAE,eAAmB,CACzB,UAAU,CAAE,oBAAoB,CAKjC,oFACQ,CACP,mBAAmB,CAAE,OAA2B,CAChD,UAAU,CA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AAI",
|
||||
"sources": ["menu-side.scss","constants.scss"],
|
||||
"names": [],
|
||||
"file": "menu-side.css"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/* [1] Elements du menu
|
||||
=========================================================*/
|
||||
& > span:not(.icon){
|
||||
& > span{
|
||||
display: block;
|
||||
position: relative;
|
||||
width: calc( 100% - 2*1em - 2*1.5em );
|
||||
|
@ -64,55 +64,15 @@
|
|||
|
||||
}
|
||||
|
||||
/* [2] Specification pour le logo
|
||||
=========================================================*/
|
||||
& > span.icon{
|
||||
display: block;
|
||||
position: relative;
|
||||
width: calc( 100% - 3em - 2*1.5em );
|
||||
height: calc( #{$header-height} - 1px );
|
||||
|
||||
padding: 0 1.5em;
|
||||
padding-left: calc( 1.5em + 3em );
|
||||
|
||||
border-bottom: 1px solid transparent;
|
||||
|
||||
background: $dark-bg;
|
||||
|
||||
color: $dark-fg-primary;
|
||||
text-shadow: 1px 1px 0 darken($dark-bg, 5);
|
||||
font-weight: bold;
|
||||
line-height: $header-height;
|
||||
|
||||
& > svg, & > svg *{
|
||||
position: absolute;
|
||||
top: calc( 50% - 5em/2 );
|
||||
left: 1.5em;
|
||||
height: 5em;
|
||||
}
|
||||
|
||||
|
||||
&:hover{
|
||||
border-bottom-color: darken($dark-bg-primary, 2);
|
||||
box-shadow: inset 0 0 1em darken($dark-bg-primary, 1);
|
||||
|
||||
background-color: $dark-bg-primary;
|
||||
color: $dark-fg-primary;
|
||||
text-shadow: 1px 1px 0 darken($dark-bg-primary, 5);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* [3] Elements du menu avec separateur en dessous
|
||||
/* [2] Elements du menu avec separateur en dessous
|
||||
=========================================================*/
|
||||
& > span.sep{
|
||||
border-bottom: 1px solid lighten($dark-bg, 10);
|
||||
}
|
||||
|
||||
|
||||
/* [4] Gestion du menu deroulant
|
||||
/* [3] Gestion du menu deroulant
|
||||
=========================================================*/
|
||||
/* (1) Quand le menu est deroule */
|
||||
& > span:not(.icon).active + div.sub>span{
|
||||
|
|
|
@ -202,4 +202,19 @@
|
|||
function reload(){ navMenu( pageManager.page ); }
|
||||
|
||||
|
||||
/* [7] Gestion du toggle de la page de login
|
||||
=========================================================*/
|
||||
var LOGIN = {
|
||||
show: document.getElementById('user-data'),
|
||||
hide: document.getElementById('login-close'),
|
||||
page: document.getElementById('LOGIN')
|
||||
};
|
||||
|
||||
// Ouverture de la page de login
|
||||
LOGIN.show.addEventListener('click', function(e){ LOGIN.page.className = 'active'; }, false);
|
||||
|
||||
// Fermeture de la page de login
|
||||
LOGIN.hide.addEventListener('click', function(e){ LOGIN.page.className = ''; }, false);
|
||||
|
||||
|
||||
// }
|
|
@ -73,10 +73,10 @@ APIClass.prototype = {
|
|||
|
||||
// on créé un formulaire POST (virtuel)
|
||||
var form = new FormData();
|
||||
form.append('path', pRequest.path ); // on créé la variable $_POST['json']=>request
|
||||
|
||||
if( pRequest.hasOwnProperty('data') )
|
||||
form.append('data', JSON.stringify(pRequest.data) );
|
||||
// On ajoute tous les attributs en POST
|
||||
for( var key in pRequest )
|
||||
form.append(key, pRequest[key]);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -203,24 +203,15 @@
|
|||
return $checker && is_string($value) && strlen($value) <= 50;
|
||||
break;
|
||||
|
||||
/* (2) Utilisateur */
|
||||
case 'user.code':
|
||||
case 'machine.code':
|
||||
return $checker && is_string($value) && preg_match('/^[\dA-F]{2}(\-[\dA-F]{2}){3,5}$/i', $value);
|
||||
case 'varchar(30)':
|
||||
return $checker && is_string($value) && strlen($value) <= 30;
|
||||
break;
|
||||
|
||||
case 'user.username':
|
||||
case 'machine.name':
|
||||
case 'group.name':
|
||||
return $checker && is_string($value) && preg_match('/^[\w-]{1,30}$/i', $value);
|
||||
break;
|
||||
case 'text':
|
||||
return $checker && is_string($value);
|
||||
|
||||
case 'user.firstname':
|
||||
case 'user.lastname':
|
||||
return $checker && is_string($value) && preg_match('/^[a-z -]{3,30}$/i', $value);
|
||||
break;
|
||||
|
||||
case 'user.mail':
|
||||
case 'mail':
|
||||
return $checker && is_string($value) && strlen($value) <= 50 && preg_match('/^[\w\.-]+@[\w\.-]+\.[a-z]{2,4}$/i', $value);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace manager;
|
||||
use \manager\Database;
|
||||
|
||||
// FORMAT:
|
||||
//
|
||||
|
@ -21,7 +22,7 @@
|
|||
|
||||
// Attributs prives utiles (initialisation)
|
||||
private $path;
|
||||
private $data;
|
||||
private $params;
|
||||
private $modules;
|
||||
|
||||
// Contiendra la reponse a la requete
|
||||
|
@ -37,12 +38,12 @@
|
|||
/* CONSTRUCTEUR D'UNE REQUETE DE MODULE
|
||||
*
|
||||
* @path<String> Chemin de delegation ("module/methode")
|
||||
* @data<Array> Tableau contenant les parametres utiles au traitement
|
||||
* @param<Array> Tableau associatif contenant les parametres utiles au traitement
|
||||
*
|
||||
* @return status<Boolean> Retourne si oui ou non tout s'est bien passe
|
||||
*
|
||||
*/
|
||||
public function __construct($path=null, $data=null){
|
||||
public function __construct($path=null, $params=null){
|
||||
// Si pas parametre manquant, on quitte
|
||||
if( $path == null ){
|
||||
$this->error = ManagerError::MissingPath;
|
||||
|
@ -71,19 +72,24 @@
|
|||
}
|
||||
|
||||
// Type de @data (optionnel)
|
||||
$data = (is_array($data)) ? $data : array();
|
||||
$params = (is_array($params)) ? $params : array();
|
||||
|
||||
|
||||
/* [2] Verification du chemin (existence module+methode)
|
||||
=========================================================*/
|
||||
if( !$this->checkPath($path) ) // Verification de la coherence du chemin + attribution
|
||||
return false;
|
||||
// Gestion d'erreur interne
|
||||
|
||||
|
||||
/* [3] Construction de l'objet
|
||||
/* [3] Verification des parametres (si @type est defini)
|
||||
=========================================================*/
|
||||
$this->data = $data;
|
||||
if( !$this->checkParams($params) ){ // Verification de tous les types
|
||||
$this->error = ManagerError::ParamError;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* [4] Construction de l'objet
|
||||
=========================================================*/
|
||||
$this->params = $params;
|
||||
$this->error = ManagerError::Success;
|
||||
|
||||
return true; // On retourne que tout s'est bien passe
|
||||
|
@ -114,7 +120,7 @@
|
|||
|
||||
/* [3] On amorce la methode
|
||||
=========================================================*/
|
||||
$returned = call_user_func_array( $this->getFunctionCaller(), $this->data );
|
||||
$returned = call_user_func_array( $this->getFunctionCaller(), $this->params );
|
||||
|
||||
|
||||
/* [4] Gestion de la reponse
|
||||
|
@ -148,10 +154,12 @@
|
|||
if( !isset($json['path']) )
|
||||
return new ModuleRequest();
|
||||
|
||||
// On definit $data au cas ou il soit vide
|
||||
$data = (isset($json['data'])) ? $json['data'] : array();
|
||||
// On definit $params au cas ou il soit vide
|
||||
$params = $json;
|
||||
// On retire le @path de @params
|
||||
unset($params['path']);
|
||||
|
||||
return new ModuleRequest($json['path'], $data);
|
||||
return new ModuleRequest($json['path'], $params);
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,18 +202,13 @@
|
|||
/* [2] On verifie que @data est renseigne
|
||||
=========================================================*/
|
||||
// Si variable n'existe pas, on cree un tableau vide
|
||||
$data = (isset($post['data'])) ? $post['data'] : array();
|
||||
|
||||
// Si c'est toujours pas un tableau, on essaie de voir si c'est un json
|
||||
$data = (!is_array($data)) ? json_decode($data, true) : $data;
|
||||
|
||||
// Si toujours pas de tableau, on cree un tableau vide
|
||||
$data = (!is_array($data)) ? array() : $data;
|
||||
|
||||
$params = $post;
|
||||
// On retire le @path de @params
|
||||
unset($params['path']);
|
||||
|
||||
/* [3] On retourne une instance de <ModuleRequest>
|
||||
=========================================================*/
|
||||
return new ModuleRequest($post['path'], $data);
|
||||
return new ModuleRequest($post['path'], $params);
|
||||
|
||||
}
|
||||
|
||||
|
@ -242,7 +245,7 @@
|
|||
|
||||
/* [3] Verification de l'existence de la methode (conf)
|
||||
=========================================================*/
|
||||
if( array_search($method, $this->modules[$module]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||
if( array_key_exists($method, $this->modules[$module]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||
$this->error = ManagerError::UnknownMethod;
|
||||
return false; // On retourne FALSE, si erreur
|
||||
}
|
||||
|
@ -262,6 +265,47 @@
|
|||
|
||||
|
||||
|
||||
/* VERIFICATION DU TYPE DES PARAMETRES ENVOYES
|
||||
*
|
||||
* @params<Array> Tableau associatif contenant les parametres
|
||||
*
|
||||
* @return correct<bool> Retourne si oui ou non les parametres ont le bon type
|
||||
*
|
||||
*/
|
||||
private function checkParams($params){
|
||||
/* [1] On verifie qu'il ne manque aucun parametre
|
||||
=========================================================*/
|
||||
// Si @params n'est pas un tableau
|
||||
if( !is_array($params) ) return false;
|
||||
|
||||
$method = $this->modules[$this->path['module']][$this->path['method']];
|
||||
|
||||
// Si le nombre de parametre en entree et requis est different
|
||||
if( count($method['parameters']) > count($params) ) return false;
|
||||
|
||||
|
||||
|
||||
/* [2] Si le type est defini, pour chaque param, on teste
|
||||
=========================================================*/
|
||||
foreach($method['parameters'] as $name=>$paramsdata){
|
||||
// Si le parametre n'existe pas dans le tableau recu
|
||||
if( !isset($params[$name]) ) return false;
|
||||
|
||||
// Si le type n'est pas defini, on reboucle
|
||||
if( !isset($paramsdata['type']) ) continue;
|
||||
|
||||
// Si la verification est fausse, on retourne faux
|
||||
if( !Database::check($paramsdata['type'], $params[$name]) ) return false;
|
||||
}
|
||||
|
||||
/* [3] Gestion du retour, si tout s'est bien passe
|
||||
=========================================================*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOI LE CHEMIN D'AMORCAGE DE LA METHODE
|
||||
*
|
||||
|
|
|
@ -19,13 +19,6 @@
|
|||
*
|
||||
*/
|
||||
public static function unserialize($content=null){
|
||||
/* [1] Normalisation + verification des donnees
|
||||
=========================================================*/
|
||||
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||
if( $content === null )
|
||||
return array('ModuleError' => ManagerError::ParamError);
|
||||
|
||||
|
||||
/* [2] On recupere le xml
|
||||
=========================================================*/
|
||||
$xml = simplexml_load_string($content);
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
*
|
||||
*/
|
||||
public static function remove($id_token){
|
||||
/* [0] Verification des INPUT
|
||||
=========================================================*/
|
||||
if( !Database::check('id', $id_token) ) return array('ModuleError' => ManagerError::ParamError);
|
||||
|
||||
|
||||
/* [1] Suppression du token
|
||||
=========================================================*/
|
||||
$remove = new Repo('token/remove', array($id_token));
|
||||
|
|
|
@ -1,402 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace manager\module;
|
||||
use \manager\Database;
|
||||
use \manager\sessionManager;
|
||||
use \manager\ManagerError;
|
||||
use \manager\Repo;
|
||||
use \manager\repo\cluster as clusterRepo;
|
||||
|
||||
class userDefault{
|
||||
|
||||
|
||||
/* CREATION D'UN NOUVEL UTILISATEUR DANS LA BDD
|
||||
*
|
||||
* @code<String> Code RFID de l'utilisateur
|
||||
* @username<String> Identifiant l'utilisateur
|
||||
* @firstname<String> Prenom de l'utilisateur
|
||||
* @lastcode<String> Nom de l'utilisateur
|
||||
* @mail<String> Adresse email de l'utilisateur
|
||||
* @password<String> Mot de passe de l'utilisateur
|
||||
* @status<String> Status de l'utilisateur
|
||||
*
|
||||
* @return status<Boolean> Retourne si oui ou non, tout s'est bien passe
|
||||
*
|
||||
*/
|
||||
public static function create($code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||
/* [1] Normalisation + verification des donnees
|
||||
=========================================================*/
|
||||
$password_hash = sessionManager::secure_sha1($password);
|
||||
|
||||
$correct_param = Database::check('user.code', $code);
|
||||
$correct_param = $correct_param && Database::check('user.username', $username);
|
||||
$correct_param = $correct_param && Database::check('user.firstname', $firstname);
|
||||
$correct_param = $correct_param && Database::check('user.lastname', $lastname);
|
||||
$correct_param = $correct_param && Database::check('user.mail', $mail);
|
||||
$correct_param = $correct_param && Database::check('user.password', $password_hash);
|
||||
$correct_param = $correct_param && Database::check('user.status', $status);
|
||||
|
||||
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||
if( !$correct_param )
|
||||
return array('ModuleError' => ManagerError::ParamError);
|
||||
|
||||
|
||||
|
||||
|
||||
/* [2] Creation de l'utilisateur
|
||||
=========================================================*/
|
||||
$create_user = new Repo('user/create', array($code, $username, $firstname, $lastname, $mail, $password_hash, $status) );
|
||||
$id_user = $create_user->answer();
|
||||
|
||||
// Si une erreur est retournee, on retourne une erreur
|
||||
if( $id_user === false )
|
||||
return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
|
||||
|
||||
/* [3] Creation du groupe de meme nom que l'username
|
||||
=========================================================*/
|
||||
$create_group = new Repo('cluster/create', array($username) );
|
||||
$id_group = $create_group->answer();
|
||||
|
||||
// Si une erreur est retournee, on retourne une erreur
|
||||
if( $id_group === false )
|
||||
return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
|
||||
|
||||
/* [4] Association au groupe
|
||||
=========================================================*/
|
||||
$assoc_goup = new Repo('cluster/link', array($id_group, $id_user, clusterRepo::USER_CLASS));
|
||||
$id_assoc = $assoc_goup->answer();
|
||||
|
||||
// Si une erreur est retournee, on retourne une erreur
|
||||
if( $id_assoc === false )
|
||||
return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
|
||||
/* [5] Gestion du retour
|
||||
=========================================================*/
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'id_user' => $id_user,
|
||||
'id_cluster' => $id_group
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* AJOUTE UN UTILISATEUR DONNEE A UN GROUPE DONNE
|
||||
*
|
||||
* @id_cluster<int> UID du groupe
|
||||
* @id_user<int> UID de l'utilisateur
|
||||
*
|
||||
* @return association<int> Renvoie l'UID de l'association cree
|
||||
* Renvoie FALSE si une erreur occure
|
||||
*
|
||||
*/
|
||||
public static function link($id_cluster, $id_user){
|
||||
/* [1] Normalisation + verification des donnees
|
||||
=========================================================*/
|
||||
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||
$correct_param = $correct_param && Database::check('auto_increment_id', $id_user);
|
||||
|
||||
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||
if( !$correct_param )
|
||||
return array('ModuleError' => ManagerError::ParamError);
|
||||
|
||||
/* [2] Creation de l'association
|
||||
=========================================================*/
|
||||
$link_user = new Repo('cluster/link', array($id_cluster, $id_user, clusterRepo::USER_CLASS));
|
||||
|
||||
return $link_user;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RETIRE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||
*
|
||||
* @id_cluster<int> UID du groupe
|
||||
* @id_user<int> UID de l'utilisateur
|
||||
*
|
||||
* @return association<int> Renvoie l'UID de l'association cree
|
||||
* Renvoie FALSE si une erreur occure
|
||||
*
|
||||
*/
|
||||
public static function unlink($id_cluster, $id_user){
|
||||
/* [1] Normalisation + verification des donnees
|
||||
=========================================================*/
|
||||
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||
$correct_param = $correct_param && Database::check('auto_increment_id', $id_user);
|
||||
|
||||
// Si les parametres ne sont pas corrects, on retourne une erreur
|
||||
if( !$correct_param )
|
||||
return array('ModuleError' => ManagerError::ParamError);
|
||||
|
||||
/* [2] Suppression de l'association
|
||||
=========================================================*/
|
||||
$link_user = new Repo('cluster/unlink', array($id_cluster, $id_user, clusterRepo::USER_CLASS));
|
||||
|
||||
return $link_user;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE UN UTILISATEUR EN FONCTION D'UN MOT CLE
|
||||
*
|
||||
* @keyword<String> Element de recherche
|
||||
*
|
||||
* @return users<Array> Retourne la liste des utilisateurs trouves
|
||||
*
|
||||
*/
|
||||
public static function search($keyword){
|
||||
// On recupere les donnees
|
||||
$user = new Repo('user/search', array($keyword));
|
||||
|
||||
return array(
|
||||
'users' => $user->answer()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE LA LISTE EXHAUSTIVE DES UTILISATEURS
|
||||
*
|
||||
* @return utilisateurs<Array> Liste des utilisateurs
|
||||
*
|
||||
*/
|
||||
public static function getAll(){
|
||||
// On recupere les donnees
|
||||
$users = new Repo('user/getAll');
|
||||
|
||||
return array(
|
||||
'users' => $users->answer()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEURS D'UID DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Utilisateur d'UID donne
|
||||
*
|
||||
*/
|
||||
public static function getById($id_user){
|
||||
// On recupere les donnees
|
||||
$request = new Repo('user/getById', array($id_user));
|
||||
$answer = $request->answer();
|
||||
|
||||
// Si aucun resultat, on retourne une erreur
|
||||
if( $answer === false )
|
||||
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
|
||||
return array(
|
||||
'user' => $answer
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEURS DE CODE DONNE
|
||||
*
|
||||
* @code<String> Code de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Utilisateur de code donne
|
||||
*
|
||||
*/
|
||||
public static function getByCode($code){
|
||||
// On recupere les donnees
|
||||
$request = new Repo('user/getByCode', array($code));
|
||||
$answer = $request->answer();
|
||||
|
||||
// Si aucun resultat, on retourne une erreur
|
||||
if( $answer === false )
|
||||
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
|
||||
return array(
|
||||
'user' => $answer
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEURS D'USERNAME DONNE
|
||||
*
|
||||
* @username<String> Username de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Utilisateur d'username donne
|
||||
*
|
||||
*/
|
||||
public static function getByUsername($username){
|
||||
// On recupere les donnees
|
||||
$request = new Repo('user/getByUsername', array($username));
|
||||
$answer = $request->answer();
|
||||
|
||||
// Si aucun resultat, on retourne une erreur
|
||||
if( $answer === false )
|
||||
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
|
||||
return array(
|
||||
'user' => $answer
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE LES GROUPES D'UN UTILISATEUR DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return clusters<Array> Groupes de l'utilisateur donne
|
||||
*
|
||||
*/
|
||||
public static function getClusters($id_user){
|
||||
// On recupere les donnees
|
||||
$request = new Repo('user/getClusters', array($id_user));
|
||||
$answer = $request->answer();
|
||||
|
||||
// Si aucun resultat, on retourne une erreur
|
||||
if( $answer === false )
|
||||
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||
|
||||
|
||||
return array(
|
||||
'clusters' => $answer
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MODIFIE UN UTILISATEUR DONNEE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur
|
||||
* @code<String> Code RFID de l'utilisateur
|
||||
* @username<String> Identifiant l'utilisateur
|
||||
* @firstname<String> Prenom de l'utilisateur
|
||||
* @lastcode<String> Nom de l'utilisateur
|
||||
* @mail<String> Adresse email de l'utilisateur
|
||||
* @password<String> Mot de passe de l'utilisateur
|
||||
* @status<String> Status de l'utilisateur
|
||||
*
|
||||
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||
*
|
||||
*/
|
||||
public static function edit($id_user=null, $code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||
// Si @id_user n'est pas au bon format, on retourne une erreur
|
||||
if( !Database::check('auto_increment_id', $id_user) )
|
||||
return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
/* [1] On verifie l'existence de l'utilisateur
|
||||
=========================================================*/
|
||||
$user_exists = new Repo('user/getById', array($id_user));
|
||||
$user_data = $user_exists->answer();
|
||||
|
||||
// Si on a recupere aucun utilisateur, on retourne une erreur
|
||||
if( !is_array($user_data) )
|
||||
return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
|
||||
/* [2] Normalisation + verification des donnees
|
||||
=========================================================*/
|
||||
$password_hash = sessionManager::secure_sha1($password);
|
||||
|
||||
/* (1) Verification des parametres (si correct et different)*/
|
||||
$correct_param = array(
|
||||
'code' => Database::check('user.code', $code ) && $user_data['code'] != $code,
|
||||
'username' => Database::check('user.username', $username ) && $user_data['username'] != $username,
|
||||
'firstname' => Database::check('user.firstname', $firstname ) && $user_data['firstname'] != $firstname,
|
||||
'lastname' => Database::check('user.lastname', $lastname ) && $user_data['lastname'] != $lastname,
|
||||
'mail' => Database::check('user.mail', $mail ) && $user_data['mail'] != $mail,
|
||||
'password' => Database::check('user.password', $password_hash ) && $user_data['password'] != $password_hash,
|
||||
'status' => Database::check('user.status', $status ) && $user_data['status'] != $status
|
||||
);
|
||||
|
||||
/* (2) Gestion des parametres optionnels */
|
||||
$opt_data = array(
|
||||
'code' => ($correct_param['code']) ? $code : $user_data['code'],
|
||||
'username' => ($correct_param['username']) ? $username : $user_data['username'],
|
||||
'firstname' => ($correct_param['firstname']) ? $firstname : $user_data['firstname'],
|
||||
'lastname' => ($correct_param['lastname']) ? $lastname : $user_data['lastname'],
|
||||
'mail' => ($correct_param['mail']) ? $mail : $user_data['mail'],
|
||||
'password' => ($correct_param['password']) ? $password : $user_data['password'],
|
||||
'status' => ($correct_param['status']) ? $status : $user_data['status'],
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
/* [3] Modification de l'utilisateur
|
||||
=========================================================*/
|
||||
$request = new Repo('user/edit', array(
|
||||
$id_user,
|
||||
$opt_data['code'],
|
||||
$opt_data['username'],
|
||||
$opt_data['firstname'],
|
||||
$opt_data['lastname'],
|
||||
$opt_data['mail'],
|
||||
$opt_data['password'],
|
||||
$opt_data['status'])
|
||||
);
|
||||
|
||||
|
||||
return array(
|
||||
'status' => $request->answer()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* SUPPRIME UN UTILISATEUR DONNEE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||
*
|
||||
*/
|
||||
public static function delete($id_user){
|
||||
// On recupere les donnees
|
||||
$request = new Repo('user/delete', array($id_user));
|
||||
$answer = $request->answer();
|
||||
|
||||
return array(
|
||||
'status' => $answer
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,49 @@
|
|||
<?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));
|
||||
$success = $check->answer();
|
||||
|
||||
// Si le login/password est incorrect, on retourne une erreur
|
||||
if( $success === false ) return array('ModuleError' => ManagerError::ModuleError);
|
||||
|
||||
|
||||
/* [2] Si les logins sont ok, on retourne l'id de l'utilisateur
|
||||
=========================================================*/
|
||||
return array(
|
||||
'ModuleError' => ManagerError::Success,
|
||||
'id_user' => $success
|
||||
);
|
||||
|
||||
}
|
||||
// [x] "login",
|
||||
// [ ] "getById",
|
||||
// [ ] "getAll",
|
||||
|
||||
// [ ] "create",
|
||||
// [ ] "edit",
|
||||
// [ ] "remove",
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,405 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace manager\repo;
|
||||
use \manager\Database;
|
||||
use \manager\repo\cluster as clusterRepo;
|
||||
|
||||
class user{
|
||||
|
||||
/* CREATION D'UN UTILISATEUR ET DE SON GROUPE INDIVIDUEL
|
||||
*
|
||||
* @code<String> Code RFID de l'utilisateur
|
||||
* @username<String> Identifiant l'utilisateur
|
||||
* @firstname<String> Prenom de l'utilisateur
|
||||
* @lastcode<String> Nom de l'utilisateur
|
||||
* @mail<String> Adresse email de l'utilisateur
|
||||
* @password<String> Mot de passe de l'utilisateur
|
||||
* @status<String> Status de l'utilisateur
|
||||
*
|
||||
* @return id_user<int> Renvoie l'UID de l'utilisateur cree
|
||||
* Renvoie FALSE si une erreur occure
|
||||
*
|
||||
*/
|
||||
public static function create($code, $username, $firstname, $lastname, $mail, $password, $status){
|
||||
/* [1] Verification de l'unicite de code+username
|
||||
=========================================================*/
|
||||
$check_unique = !is_array(self::getByCode($code));
|
||||
$check_unique = $check_unique && !is_array(self::getByUsername($username));
|
||||
|
||||
// Si un utilisateur a deja ce code ou cet username, on renvoie une erreur
|
||||
if( !$check_unique )
|
||||
return false;
|
||||
|
||||
/* [2] Creation de l'utilisateur
|
||||
=========================================================*/
|
||||
$insert_user = Database::getPDO()->prepare("INSERT INTO user(id_user, code, username, firstname, lastname, mail, password, status)
|
||||
VALUES(DEFAULT, :code, :username, :firstname, :lastname, :mail, :password, :status)");
|
||||
$insert_user->execute(array(
|
||||
':code' => $code,
|
||||
':username' => $username,
|
||||
':firstname' => $firstname,
|
||||
':lastname' => $lastname,
|
||||
':mail' => $mail,
|
||||
':password' => $password,
|
||||
':status' => $status
|
||||
));
|
||||
|
||||
/* [3] On retourne l'id_user ou FALSE si erreur
|
||||
=========================================================*/
|
||||
$check_user = self::getByCode($code);
|
||||
|
||||
// Si n'existe pas on retourne FALSE
|
||||
if( $check_user === false )
|
||||
return false;
|
||||
|
||||
// Sinon, on retourne son id
|
||||
return $check_user['id_user'];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE UNE LISTE D'UTILISATEURS EN FONCTION D'UN MOT CLE
|
||||
*
|
||||
* @keyword<String> Element de recherche
|
||||
*
|
||||
* @return users<Array> Retourne les utilisateurs trouves
|
||||
*
|
||||
*/
|
||||
public static function search($keyword){
|
||||
// On recupere les donnees
|
||||
$searchusers = Database::getPDO()->query("SELECT * FROM user
|
||||
WHERE code LIKE '%".$keyword."%'
|
||||
OR username LIKE '%".$keyword."%'
|
||||
OR firstname LIKE '%".$keyword."%'
|
||||
OR lastname LIKE '%".$keyword."%'
|
||||
OR mail LIKE '%".$keyword."%'
|
||||
");
|
||||
|
||||
return Database::delNumeric( $searchusers->fetchAll() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE LA LISTE DE TOUS LES UTILISATEURS
|
||||
*
|
||||
* @return utilisateurs<Array> Liste des utilisateurs de la BDD
|
||||
*
|
||||
*/
|
||||
public static function getAll(){
|
||||
// On ecrit la requete
|
||||
$request = Database::getPDO()->query("SELECT * FROM user ORDER BY username");
|
||||
|
||||
// On recupere le resutat
|
||||
$answer = $request->fetchAll();
|
||||
|
||||
// On retourne en supprimant les indices numeriques
|
||||
return Database::delNumeric( $answer );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEUR D'ID DONNE
|
||||
*
|
||||
* @id<int> Id de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Renvoie l'utilisateur d'id donne si existe
|
||||
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||
*
|
||||
*/
|
||||
public static function getById($id){
|
||||
// On ecrit la requete
|
||||
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||
WHERE id_user = :id");
|
||||
|
||||
// On execute la requete
|
||||
$request->execute(array(
|
||||
':id' => $id
|
||||
));
|
||||
|
||||
// On recupere 1 seul utilisateur
|
||||
$answer = $request->fetch();
|
||||
|
||||
// Gestion d'erreur -> aucun resultat
|
||||
if( $answer === false )
|
||||
return false;
|
||||
|
||||
// On retourne en supprimant les indices numeriques
|
||||
return Database::delNumeric( $answer, true );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEUR DE CODE DONNE
|
||||
*
|
||||
* @code<String> Code de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Renvoie l'utilisateur de code donne si existe
|
||||
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||
*
|
||||
*/
|
||||
public static function getByCode($code){
|
||||
// On ecrit la requete
|
||||
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||
WHERE code = :code");
|
||||
|
||||
// On execute la requete
|
||||
$request->execute(array(
|
||||
':code' => $code
|
||||
));
|
||||
|
||||
// On recupere 1 seul utilisateur
|
||||
$answer = $request->fetch();
|
||||
|
||||
// Gestion d'erreur -> aucun resultat
|
||||
if( $answer === false )
|
||||
return false;
|
||||
|
||||
// On retourne en supprimant les indices numeriques
|
||||
return Database::delNumeric( $answer, true );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE L'UTILISATEUR D'USERNAME DONNE
|
||||
*
|
||||
* @username<String> Identifiant de l'utilisateur en question
|
||||
*
|
||||
* @return utilisateur<Array> Renvoie l'utilisateur d'username donne si existe
|
||||
* @return error<Boolean> Retourne FALSE si aucun resultat
|
||||
*
|
||||
*/
|
||||
public static function getByUsername($username){
|
||||
// On ecrit la requete
|
||||
$request = Database::getPDO()->prepare("SELECT * FROM user
|
||||
WHERE username = :username");
|
||||
|
||||
// On execute la requete
|
||||
$request->execute(array(
|
||||
':username' => $username
|
||||
));
|
||||
|
||||
// On recupere 1 seul utilisateur
|
||||
$answer = $request->fetch();
|
||||
|
||||
// Gestion d'erreur -> aucun resultat
|
||||
if( $answer === false )
|
||||
return false;
|
||||
|
||||
// On retourne en supprimant les indices numeriques
|
||||
return Database::delNumeric( $answer, true );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE LES GROUPE AUQUELS UN UTILISATEUR DONNE APPARTIENT
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return groups<Array> Renvoie un tableau d'UID des groupes
|
||||
*
|
||||
*/
|
||||
public static function getGroups($id_user){
|
||||
/* [1] On redige/execute la requete
|
||||
=========================================================*/
|
||||
$select_groups = Database::getPDO()->prepare("SELECT gm.id_group FROM user as u, group_merge as gm
|
||||
WHERE u.id_user = gm.id_user
|
||||
AND u.id_user = :id_user
|
||||
ORDER BY gm.id_user ASC");
|
||||
$select_groups->execute(array(
|
||||
':id_user' => $id_user
|
||||
));
|
||||
|
||||
// On retourne en supprimant les indices numeriques
|
||||
return Database::delNumeric( $select_groups->fetchAll() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RENVOIE LES GROUPES AUQUEL APPARTIENT UN UTILISATEUR DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return clusters<Array> Retourne la liste des groupes auquel appartient l'utilisateur
|
||||
*
|
||||
*/
|
||||
public static function getClusters($id_user){
|
||||
/* [1] On redige/execute la requete
|
||||
=========================================================*/
|
||||
$get_clusters = Database::getPDO()->prepare("SELECT c.* FROM cluster as c, cluster_merge as cm
|
||||
WHERE cm.id_cluster = c.id_cluster
|
||||
AND cm.id_entity = :id_user
|
||||
AND cm.class = :class
|
||||
ORDER BY c.id_cluster");
|
||||
$get_clusters->execute(array(
|
||||
':id_user' => $id_user,
|
||||
':class' => clusterRepo::USER_CLASS
|
||||
));
|
||||
|
||||
/* [2] On retourne la liste des groupes
|
||||
=========================================================*/
|
||||
return Database::delNumeric( $get_clusters->fetchAll() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MODIFICATION D'UN UTILISATEUR
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur
|
||||
* @code<String> Code RFID de l'utilisateur
|
||||
* @username<String> Identifiant l'utilisateur
|
||||
* @firstname<String> Prenom de l'utilisateur
|
||||
* @lastcode<String> Nom de l'utilisateur
|
||||
* @mail<String> Adresse email de l'utilisateur
|
||||
* @password<String> Mot de passe de l'utilisateur
|
||||
* @status<String> Status de l'utilisateur
|
||||
*
|
||||
* @return status<Boolean> Renvoie si oui ou non tout s'est bien passe
|
||||
*
|
||||
*/
|
||||
public static function edit($id_user=null, $code=null, $username=null, $firstname=null, $lastname=null, $mail=null, $password=null, $status=null){
|
||||
/* [1] Verification de l'unicite de code+username (si differents)
|
||||
=========================================================*/
|
||||
// On recupere les utilisateurs ayant le meme code ou username (si existent)
|
||||
$getbycode = self::getByCode($code);
|
||||
$getbyusername = self::getByUsername($username);
|
||||
|
||||
$check_unique = is_array($getbycode) && $getbycode['id_user'] == $id_user || !is_array($getbycode);
|
||||
$check_unique = $check_unique && is_array($getbyusername) && $getbyusername['id_user'] == $id_user || !is_array($getbyusername);
|
||||
|
||||
// Si un utilisateur a deja ce code ou cet username (sauf lui), on renvoie une erreur
|
||||
if( !$check_unique )
|
||||
return false;
|
||||
|
||||
/* [2] Modification de l'utilisateur
|
||||
=========================================================*/
|
||||
$edit_user = Database::getPDO()->prepare("UPDATE user
|
||||
SET code = :code,
|
||||
username = :username,
|
||||
firstname = :firstname,
|
||||
lastname = :lastname,
|
||||
mail = :mail,
|
||||
password = :password,
|
||||
status = :status
|
||||
WHERE id_user = :id_user");
|
||||
$edit_user->execute(array(
|
||||
':code' => $code,
|
||||
':username' => $username,
|
||||
':firstname' => $firstname,
|
||||
':lastname' => $lastname,
|
||||
':mail' => $mail,
|
||||
':password' => $password,
|
||||
':status' => $status,
|
||||
':id_user' => $id_user
|
||||
));
|
||||
|
||||
|
||||
|
||||
/* [3] On retourne si tout a ete modifie, si erreur
|
||||
=========================================================*/
|
||||
$check_user = self::getById($id_user);
|
||||
|
||||
$checker = $check_user['id_user'] == $id_user;
|
||||
$checker = $checker && $check_user['code'] == $code;
|
||||
$checker = $checker && $check_user['username'] == $username;
|
||||
$checker = $checker && $check_user['firstname'] == $firstname;
|
||||
$checker = $checker && $check_user['lastname'] == $lastname;
|
||||
$checker = $checker && $check_user['mail'] == $mail;
|
||||
$checker = $checker && $check_user['password'] == $password;
|
||||
$checker = $checker && $check_user['status'] == $status;
|
||||
|
||||
// On retourne l'etat de la modification
|
||||
return $checker;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* SUPPRIME UN UTILISATEUR DONNE
|
||||
*
|
||||
* @id_user<int> UID de l'utilisateur en question
|
||||
*
|
||||
* @return status<Boolean> Retourne si oui ou non l'utilisateur a bien ete supprime
|
||||
*
|
||||
*/
|
||||
public static function delete($id_user){
|
||||
/* [1] On redige/execute la requete
|
||||
=========================================================*/
|
||||
$delete_user = Database::getPDO()->prepare("DELETE FROM user WHERE id_user = :id_user");
|
||||
$delete_user->execute(array(
|
||||
':id_user' => $id_user
|
||||
));
|
||||
|
||||
|
||||
/* [2] On verifie que l'utilisateur n'existe plus
|
||||
=========================================================*/
|
||||
return ( self::getById($id_user) === false );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?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
|
||||
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 (int) $result['id_user'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,50 @@
|
|||
<?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"
|
||||
enable-background="new 0 0 24 24"
|
||||
height="32"
|
||||
id="Layer_1"
|
||||
version="1.1"
|
||||
viewBox="0 0 32 32"
|
||||
width="32"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="close.svg"><metadata
|
||||
id="metadata9"><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="defs7" /><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="namedview5"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
units="mm"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="13.906433"
|
||||
inkscape:cx="30.533823"
|
||||
inkscape:cy="11.421499"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /><path
|
||||
d="m 31.642464,3.8662573 c 0.476715,0.4767141 0.476715,1.2580377 0,1.7347517 l -9.558649,9.549511 c -0.476714,0.475191 -0.476714,1.258037 0,1.736275 l 9.55408,9.552557 c 0.476714,0.476714 0.476714,1.258037 0,1.736274 l -3.480164,3.467981 c -0.478237,0.475191 -1.261084,0.475191 -1.739321,0 l -9.551034,-9.551034 c -0.476714,-0.476714 -1.261084,-0.476714 -1.737798,0 l -9.558649,9.544942 c -0.476714,0.476714 -1.261084,0.476714 -1.737798,0 l -3.475596,-3.47255 c -0.476714,-0.476714 -0.476714,-1.258038 0,-1.736275 l 9.561696,-9.547988 c 0.476714,-0.475191 0.476714,-1.258037 0,-1.736274 L 0.365151,5.5903477 c -0.478237,-0.476714 -0.478237,-1.2595607 0,-1.7362747 L 3.843792,0.38456957 c 0.47976,-0.475191 1.261084,-0.475191 1.739321,0.00152 l 9.549511,9.54951093 c 0.478237,0.4782365 1.261084,0.4782365 1.737798,0.00152 l 9.558649,-9.54494173 c 0.475191,-0.475191 1.258038,-0.475191 1.737798,0 l 3.475595,3.47407243 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0" /></svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
|
@ -7,62 +9,100 @@
|
|||
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 512 512"
|
||||
id="Layer_1"
|
||||
width="30.98082mm"
|
||||
height="9.0311117mm"
|
||||
viewBox="0 0 109.77456 32.000001"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
viewBox="0 0 32 32"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="icon.svg"
|
||||
width="32"
|
||||
height="32"><metadata
|
||||
id="metadata4235"><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 /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs4233" /><sodipodi:namedview
|
||||
sodipodi:docname="icon.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview4231"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="44.32972"
|
||||
inkscape:cy="7.3003018"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="21.080621"
|
||||
inkscape:cx="30.899655"
|
||||
inkscape:cy="15.29331"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:snap-page="true" /><g
|
||||
id="g4219"
|
||||
transform="matrix(-0.0625,0,0,0.0625,32,0)"><path
|
||||
d="m 161.7,217.8 c -4,0 -7.9,-2.3 -9.6,-6.3 -2.4,-5.3 0,-11.6 5.3,-13.9 l 172.8,-76.9 c 5.3,-2.4 11.6,0 13.9,5.3 2.4,5.3 0,11.6 -5.3,13.9 l -172.8,77 c -1.4,0.6 -2.8,0.9 -4.3,0.9 z"
|
||||
id="path4227"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;stroke:none" /><path
|
||||
d="m 418,196.3 c -51.8,0 -94,-42.2 -94,-94 0,-51.8 42.2,-94 94,-94 51.8,0 94,42.2 94,94 0,51.8 -42.2,94 -94,94 z m 0,-166.9 c -40.2,0 -72.9,32.7 -72.9,72.9 0,40.2 32.7,72.9 72.9,72.9 40.2,0 72.9,-32.7 72.9,-72.9 0,-40.2 -32.7,-72.9 -72.9,-72.9 z"
|
||||
id="path4223"
|
||||
style="fill:#15c1df;fill-opacity:1;stroke:none"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 334.6,392.2 c -1.5,0 -3,-0.3 -4.4,-1 L 159,311.9 c -5.3,-2.4 -7.6,-8.7 -5.1,-14 2.5,-5.3 8.7,-7.6 14,-5.1 L 339,372.1 c 5.3,2.4 7.6,8.7 5.1,14 -1.8,3.8 -5.6,6.1 -9.5,6.1 z"
|
||||
id="path4229"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;stroke:none" /><path
|
||||
d="M 94,350 C 42.2,350 0,307.8 0,256 c 0,-51.8 42.2,-94 94,-94 51.8,0 94,42.2 94,94 0,51.8 -42.2,94 -94,94 z m 0,-166.9 c -40.2,0 -72.9,32.7 -72.9,72.9 0,40.2 32.7,72.9 72.9,72.9 40.2,0 72.9,-32.7 72.9,-72.9 0,-40.2 -32.7,-72.9 -72.9,-72.9 z"
|
||||
id="path4221"
|
||||
style="fill:#f43213;fill-opacity:1;stroke:none"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 418,503.7 c -51.8,0 -94,-42.2 -94,-94 0,-51.8 42.2,-94 94,-94 51.8,0 94,42.2 94,94 0,51.8 -42.2,94 -94,94 z m 0,-166.9 c -40.2,0 -72.9,32.7 -72.9,72.9 0,40.2 32.7,72.9 72.9,72.9 40.2,0 72.9,-32.7 72.9,-72.9 0,-40.2 -32.7,-72.9 -72.9,-72.9 z"
|
||||
id="path4225"
|
||||
style="fill:#53d192;fill-opacity:1;stroke:none"
|
||||
inkscape:connector-curvature="0" /></g></svg>
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-76.593196,-343.62782)">
|
||||
<g
|
||||
id="g4195"
|
||||
transform="matrix(1.5496524,0,0,1.5496524,-42.099629,-206.4647)">
|
||||
<g
|
||||
transform="translate(0,-0.06313453)"
|
||||
id="text4136"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:25px;line-height:125%;font-family:Impact;-inkscape-font-specification:'Impact, Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ababab;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4170"
|
||||
d="m 88.739189,364.07434 -5.13916,0 0,-3.44238 q 0,-1.50147 -0.170898,-1.86768 -0.158692,-0.37842 -0.720215,-0.37842 -0.634766,0 -0.805664,0.45166 -0.170899,0.45166 -0.170899,1.95313 l 0,9.17969 q 0,1.44043 0.170899,1.87988 0.170898,0.43945 0.769043,0.43945 0.57373,0 0.744629,-0.43945 0.183105,-0.43945 0.183105,-2.06299 l 0,-2.47803 5.13916,0 0,0.76905 q 0,3.06396 -0.439453,4.3457 -0.427246,1.28174 -1.916504,2.24609 -1.477051,0.96436 -3.649902,0.96436 -2.258301,0 -3.723145,-0.81787 -1.464844,-0.81787 -1.940918,-2.2583 -0.476074,-1.45264 -0.476074,-4.35791 l 0,-5.77393 q 0,-2.13623 0.146484,-3.19824 0.146485,-1.07422 0.8667,-2.06299 0.732422,-0.98877 2.01416,-1.55029 1.293945,-0.57373 2.966308,-0.57373 2.270508,0 3.747559,0.8789 1.477051,0.87891 1.940918,2.19727 0.463867,1.30615 0.463867,4.07715 l 0,1.87988 z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4172"
|
||||
d="m 99.481377,355.45618 2.941893,19.76318 -5.261229,0 -0.256348,-3.55225 -1.843262,0 -0.305175,3.55225 -5.322266,0 2.612305,-19.76318 7.434082,0 z m -2.722168,12.70752 q -0.390625,-3.35694 -0.78125,-8.28858 -0.78125,5.66406 -0.976563,8.28858 l 1.757813,0 z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4174"
|
||||
d="m 108.44134,355.45618 0,15.8081 3.125,0 0,3.95508 -8.26416,0 0,-19.76318 5.13916,0 z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4176"
|
||||
transform="translate(0,0.06313453)"
|
||||
d="m 112.82422,355.39258 0,18.21484 4.8789,-18.21484 -4.8789,0 z m 5.13867,0.96875 -5.03711,18.79492 8.16211,0 0,-3.95508 -3.125,0 0,-14.83984 z" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(0.06313452,-0.09470178)"
|
||||
id="text4140"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:11.25px;line-height:125%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Light';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#53d192;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
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" />
|
||||
<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"
|
||||
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"
|
||||
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>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 7.2 KiB |
35
view.php
35
view.php
|
@ -41,13 +41,18 @@
|
|||
<body>
|
||||
|
||||
<!-- LOGIN -->
|
||||
<div id='LOGIN'>
|
||||
<?php if( connected() ) echo "<div id='LOGIN'>";
|
||||
else echo "<div id='LOGIN' class='active'>"; ?>
|
||||
|
||||
<div id='login-icon'></div>
|
||||
<span id='login-close'></span>
|
||||
|
||||
<div id='login-form'>
|
||||
<input type='text' placeholder='Identifiant ou adresse mail' id='login-login'>
|
||||
<input type='password' placeholder='Mot de passe' id='login-password'>
|
||||
<input type='button' value='Connexion' id='login-submit'>
|
||||
|
||||
<span id='lost-password'>Mot de passe oublié ?</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -62,31 +67,23 @@
|
|||
<input type='text' placeholder='Recherche...' id='searchbar'>
|
||||
|
||||
<!-- ZONE UTILISATEUR -->
|
||||
<?php if( connected() ){
|
||||
echo "<span class='user-picture' class='active'></span>";
|
||||
echo "<span class='user-name'>".$_SESSION['username']."</span>";
|
||||
}else{
|
||||
echo "<span class='user-picture'></span>";
|
||||
echo "<span class='user-name'>Me connecter</span>";
|
||||
}?>
|
||||
<div id='user-data'>
|
||||
<?php if( connected() ){
|
||||
echo "<span id='user-name'>".$_SESSION['username']."</span>";
|
||||
echo "<span id='user-picture' class='active'></span>";
|
||||
}else{
|
||||
echo "<span id='user-name'>Me connecter</span>";
|
||||
echo "<span id='user-picture'></span>";
|
||||
}?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- USER PANEL -->
|
||||
<input type='checkbox' value='' id='toggle-user-panel'>
|
||||
<label for='toggle-user-panel' class='user-panel'>
|
||||
<span class='profile'>Mon Profil</span>
|
||||
<span class='administration'>Historique</span>
|
||||
<span class='logout'>Parametres</span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- MENU DE LA PAGE -->
|
||||
<nav id='MENU-SIDE'>
|
||||
<span class='icon sep' ><?= ResourceDispatcher::getResource('f/svg/icon/st' ); ?>CALL LOG</span>
|
||||
|
||||
<span data-link='dashboard' ><?= ResourceDispatcher::getResource('f/svg/home/st/menu-side'); ?>Tableau de bord</span>
|
||||
<span data-link='dashboard' class='sep'><?= ResourceDispatcher::getResource('f/svg/home/st/menu-side'); ?>Tableau de bord</span>
|
||||
<div class='sub'>
|
||||
<span data-sublink='presentation'>Presentation</span>
|
||||
</div>
|
||||
|
|
|
@ -35,7 +35,8 @@ var TOKEN = {
|
|||
// On redige la requete
|
||||
var request = { // on ecrit la requete
|
||||
'path': 'token/generate',
|
||||
'data': [TOKEN.add.name.value, TOKEN.add.duration.value]
|
||||
'name': TOKEN.add.name.value,
|
||||
'duration': TOKEN.add.duration.value
|
||||
};
|
||||
|
||||
// On lance la requete
|
||||
|
@ -67,7 +68,7 @@ for( var i = 0 ; i < TOKEN.remove.buttons.length ; i++ ){
|
|||
/* (2.2) On lance la suppression */
|
||||
var request = { // on ecrit la requete
|
||||
'path': 'token/remove',
|
||||
'data': [token_id]
|
||||
'token_id': token_id
|
||||
};
|
||||
|
||||
// On lance la requete
|
||||
|
|
Loading…
Reference in New Issue