- [x] Radio Button
- [x] Checkbox - [x] Titles - [x] Button carved - [x] Button
This commit is contained in:
parent
db2006417a
commit
0fb7693a34
|
@ -1,2 +1,2 @@
|
||||||
# stef
|
# SOCIOVIEW
|
||||||
Personal STEF project
|
Plateforme d'acquisition et mise en relation de donnees relationnelles.
|
116
automate.php
116
automate.php
|
@ -6,6 +6,8 @@
|
||||||
use \manager\ManagerError;
|
use \manager\ManagerError;
|
||||||
use \manager\Repo;
|
use \manager\Repo;
|
||||||
|
|
||||||
|
use \manager\module\callLog;
|
||||||
|
|
||||||
debug();
|
debug();
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,110 +22,48 @@
|
||||||
|
|
||||||
/* [1] On recupere le journal d'appel
|
/* [1] On recupere le journal d'appel
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
$filename = 'calllog.xml';
|
$file_content = file_get_contents('calllog.xml');
|
||||||
$file = simplexml_load_file( $filename );
|
|
||||||
|
/* [2] On cree la requete
|
||||||
/* [2] On parcours chaque ligne
|
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
$names = array(); // Contiendra les correspondances num/names
|
$request = new ModuleRequest('callLog/unserialize', array($file_content));
|
||||||
$msms = array(); // Contiendra les personnes utilisant SMS/MMS
|
$answer = $request->dispatch(); // on l'execute
|
||||||
$call = array(); // Contiendra les personnes utilisant CALL
|
|
||||||
|
|
||||||
|
/* [3] Si erreur
|
||||||
|
|
||||||
/* [3] On parcours chaque ligne
|
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
foreach($file->Item as $log){
|
if( $answer->error != ManagerError::Success ){
|
||||||
// On recupere le numero en string
|
// on l'explicite
|
||||||
$num = (string) $log['Number'];
|
var_dump( ManagerError::explicit($answer->error) );
|
||||||
|
// on quitte
|
||||||
// On formatte le numero
|
return;
|
||||||
if( preg_match("/^(?:\+33|33|0)(.+)/", $num, $m) )
|
|
||||||
$num = '0'.$m[1];
|
|
||||||
// Si pas un numero, on sort de la boucle
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
|
|
||||||
|
|
||||||
/* (1) Si le type est MMS ou SMS */
|
|
||||||
if( $log['Type'] == 'SMS' || $log['Type'] == 'MMS' ){
|
|
||||||
|
|
||||||
// Si la personne n'est pas referencee, on l'ajoute
|
|
||||||
// Sinon on incremente son nombre d'apparition
|
|
||||||
if( isset($msms[$num]) )
|
|
||||||
$msms[$num]+= 1;
|
|
||||||
else
|
|
||||||
$msms[$num] = 1;
|
|
||||||
|
|
||||||
// On enregistre le nom si c'est pas fait
|
|
||||||
if( !isset($names[$num]) ) $names[$num] = $log['Name'];
|
|
||||||
|
|
||||||
|
|
||||||
/* (2) Si le type est PHONE */
|
|
||||||
}else if( $log['Type'] == 'PHONE' ){
|
|
||||||
|
|
||||||
// Si la personne n'est pas referencee, on l'ajoute
|
|
||||||
// Sinon on incremente son nombre d'apparition
|
|
||||||
if( isset($call[$num]) )
|
|
||||||
$call[$num]+= 1;
|
|
||||||
else
|
|
||||||
$call[$num] = 1;
|
|
||||||
|
|
||||||
// On enregistre le nom si c'est pas fait
|
|
||||||
if( !isset($names[$num]) ) $names[$num] = $log['Name'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// var_dump( $log );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* [4] On trie par nombre de contacts
|
/* [4] Sinon on recupere le resultat
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
$tmp = $msms;
|
$obj = $answer->get('object');
|
||||||
/* (2) Tri des appels */
|
|
||||||
$maxMSMS = array();
|
|
||||||
for( $i = 0 ; $i < 10 ; $i++ ){
|
|
||||||
$maxval = max($tmp);
|
|
||||||
$maxkey = array_search($maxval, $tmp);
|
|
||||||
array_push( $maxMSMS, array($maxkey, $maxval) );
|
|
||||||
unset($tmp[$maxkey]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$tmp = $call;
|
|
||||||
/* (2) Tri des appels */
|
|
||||||
$maxCalls = array();
|
|
||||||
for( $i = 0 ; $i < 10 ; $i++ ){
|
|
||||||
$maxval = max($tmp);
|
|
||||||
$maxkey = array_search($maxval, $tmp);
|
|
||||||
array_push( $maxCalls, array($maxkey, $maxval) );
|
|
||||||
unset($tmp[$maxkey]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* [5] On debug les donnees recues
|
/* [5] On debug les donnees recues
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
echo "Il y a ".count($names)." personnes :<br>";
|
var_dump( "Il y a ".count($obj['contact'])." personnes :" );
|
||||||
echo "- ".count($msms)." par SMS/MMS<br>";
|
var_dump( "- ".count($obj['SMS'])." par SMS/MMS" );
|
||||||
echo "- ".count($call)." par telephone<br><br>";
|
var_dump( "- ".count($obj['CALL'])." par telephone" );
|
||||||
|
echo "<br>";
|
||||||
echo "TOP 10 DES APPELS<br>";
|
echo "TOP 10 DES APPELS<br>";
|
||||||
echo "=================<br>";
|
echo "=================<br>";
|
||||||
foreach($maxCalls as $v)
|
foreach($obj['CALL'] as $v)
|
||||||
var_dump( $v[0] ." (".$names[$v[0]].") \t\t\t". $v[1] ." appels");
|
var_dump( $v[0] ." (".$obj['contact'][$v[0]].") \t\t\t". $v[1] ." appels");
|
||||||
|
|
||||||
echo "TOP 10 DES MMS/SMS<br>";
|
echo "TOP 10 DES MMS/SMS<br>";
|
||||||
echo "==================<br>";
|
echo "==================<br>";
|
||||||
foreach($maxMSMS as $v)
|
foreach($obj['SMS'] as $v)
|
||||||
var_dump( $v[0] ." (".$names[$v[0]].") \t\t\t". $v[1] ." appels");
|
var_dump( $v[0] ." (".$obj['contact'][$v[0]].") \t\t\t". $v[1] ." appels");
|
||||||
|
|
||||||
|
|
||||||
// var_dump( $call );
|
var_dump("\n\n\nOBJET COMPLET");
|
||||||
|
var_dump( $obj );
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
parseCallLog();
|
parseCallLog();
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1,4 +1,11 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
|
"callLog": [
|
||||||
|
|
||||||
|
"unserialize"
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
"userDefault" :[
|
"userDefault" :[
|
||||||
"create",
|
"create",
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAMC,2BAAW,CACV,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,CAAC,CAIb,kCAAkB,CACjB,OAAO,CAAE,KAAK,CAIf,uCAAuB,CACtB,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,WAAW,CAAE,UAAU,CACvB,eAAe,CAAE,UAAU,CAC3B,SAAS,CAAE,IAAI,CAEf,mDAAW,CACV,IAAI,CAAE,KAAK,CAIZ,kDAAU,CACT,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CAEjB,IAAI,CAAE,4BAA4B,CAClC,MAAM,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CACX,OAAO,CAAE,QAAQ,CACjB,YAAY,CAAE,GAAG,CAEhB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAAiB,CAGzB,UAAU,CAAE,wEAAuE,CACnF,eAAe,CAAE,GAAG,CAEpB,UAAU,CAAE,sBAAsB,CAElC,iHACO,CACN,YAAY,CCtCI,OAAO,CD2C1B,8CAAM,CACL,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,4BAA4B,CACnC,MAAM,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CACX,OAAO,CAAE,GAAG,CAEZ,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAA6B,CAErC,UAAU,CCrDQ,OAAO,CDuDzB,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,eAAuC,CAQtD,uCAAyB,CACxB,OAAO,CAAE,YAAY,CACr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N,gBAAgB,CAAE,OAAsB,CAKzC,wDAAS,CACR,YAAY,CCzHG,OAAO,CD0HtB,KAAK,CC1HU,OAAO,CD2HtB,gBAAgB,CAAE,IAAI,CAItB,8DAAO,CACN,gBAAgB,CChIF,OAAO,CDiIrB,KAAK,CAAE,IAAI",
|
||||||
"sources": ["container.scss","constants.scss"],
|
"sources": ["container.scss","constants.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "container.css"
|
"file": "container.css"
|
||||||
|
|
|
@ -5,532 +5,142 @@
|
||||||
/* [1] Section (contenu)
|
/* [1] Section (contenu)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
& > section{
|
& > section{
|
||||||
display: none;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @active
|
|
||||||
& > section.active{
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
|
||||||
|
|
||||||
// @active + .list
|
|
||||||
& > section.active.list{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: flex-start;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.inline-box{
|
|
||||||
flex: 0 0 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Barre de recherche
|
|
||||||
.searchbar{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
// width: calc( 100% - 2*1em - 2*1em );
|
|
||||||
flex: calc( 100% - 2*1em - 2*1em );
|
|
||||||
height: 1em;
|
|
||||||
margin: 1em;
|
|
||||||
padding: .5em 1em;
|
|
||||||
padding-left: 2em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
border: 1px solid #b1b1b1;
|
|
||||||
// box-shadow: 0 0 1px #b7b7b7;
|
|
||||||
|
|
||||||
background: #fff url('/f/svg/search/st/sub-menu-side/b1b1b1') .5em center no-repeat;
|
|
||||||
background-size: 1em;
|
|
||||||
|
|
||||||
transition: border .4s ease-in-out;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus{
|
|
||||||
border-color: $form-search-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Erreur
|
|
||||||
.error{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
width: calc( 100% - 2*1em - 2*1em );
|
|
||||||
height: 1em;
|
|
||||||
margin: 1em;
|
|
||||||
padding: 1em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
border: 1px solid $form-invalid-color;
|
|
||||||
|
|
||||||
background: $form-invalid-color;
|
|
||||||
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: 1px 1px darken($form-invalid-color, 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [2] INLINE-BOX pour afficher les listes de donnees
|
|
||||||
=========================================================*/
|
|
||||||
& > section > .inline-box{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
// width: calc( 50% - 2*1em - 2*1em );
|
flex-grow: 1;
|
||||||
flex: calc( 50% - 2*1em - 2*1em );
|
|
||||||
margin: 1em;
|
|
||||||
padding: 1em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
padding: 1.5em;
|
||||||
box-shadow: 0 0 1px #b7b7b7;
|
|
||||||
|
|
||||||
background-color: #fff;
|
border-radius: 5px;
|
||||||
|
|
||||||
// Lors de la recherche, quand on veut en masquer
|
|
||||||
&.hidden{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a{
|
|
||||||
text-decoration: none;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (1) Titre de l'element */
|
|
||||||
.title{
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
font-size: 1.15em;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
color: darken($theme-color, 10);
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
& > span{
|
|
||||||
font-size: .8em;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (2) Code RFID */
|
|
||||||
/* (3) Adresse mail */
|
|
||||||
.code,
|
|
||||||
.mail{
|
|
||||||
display: block;
|
|
||||||
margin: 1em;
|
|
||||||
color: #333;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
// svg (icone)
|
|
||||||
svg{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin-left: .5em;
|
|
||||||
margin-right: .5em;
|
|
||||||
margin-bottom: -.6em;
|
|
||||||
width: 1.5em;
|
|
||||||
height: 2em;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
path{
|
|
||||||
fill: #333 !important;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (4) Groupes */
|
|
||||||
.groups{
|
|
||||||
display: block;
|
|
||||||
margin: 1em;
|
|
||||||
color: #333;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
// svg (icone)
|
|
||||||
svg{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin-left: .5em;
|
|
||||||
margin-right: .5em;
|
|
||||||
margin-bottom: -.6em;
|
|
||||||
width: 1.5em;
|
|
||||||
height: 2em;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
path{
|
|
||||||
fill: #333 !important;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
span{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
padding: .1em .5em;
|
|
||||||
margin-right: calc( .2em + 2em );
|
|
||||||
|
|
||||||
border-radius: 3px 0 0 3px;
|
|
||||||
border: 1px solid #bdbdbd;
|
|
||||||
box-shadow: inset 0 0 2px #fafafa;
|
|
||||||
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
color: #333;
|
|
||||||
|
|
||||||
cursor: default;
|
|
||||||
|
|
||||||
|
|
||||||
&:before{
|
|
||||||
content: 'x';
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: -1px;
|
|
||||||
left: 100%;
|
|
||||||
height: calc( 100% - .1em - 1px );
|
|
||||||
padding: .1em .5em;
|
|
||||||
|
|
||||||
border-radius: 0 3px 3px 0;
|
|
||||||
border: 1px solid #bdbdbd;
|
|
||||||
box-shadow: inset 0 0 2px #fafafa;
|
|
||||||
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
color: inherit;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover:before{
|
|
||||||
color: $form-invalid-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (5) Lien vers la modification */
|
|
||||||
.link_edit,
|
|
||||||
.link_remove{
|
|
||||||
display: inline-block;
|
|
||||||
float: right;
|
|
||||||
position: relative;
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
margin-left: 1em;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
& > svg{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
fill: #ddd !important;
|
|
||||||
|
|
||||||
transition: fill .4s ease-in-out;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover{
|
|
||||||
& > svg{
|
|
||||||
fill: $form-neutral-color !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (6) Lien vers la suppression */
|
|
||||||
.link_remove{
|
|
||||||
|
|
||||||
&:hover{
|
|
||||||
& > svg{
|
|
||||||
fill: $form-invalid-color !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* [3] Formulaires
|
|
||||||
=========================================================*/
|
|
||||||
& > section > form{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
margin: .3em 0;
|
|
||||||
padding: 1em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
border-color: $form-invalid-color;
|
|
||||||
box-shadow: 0 0 1px #b7b7b7;
|
|
||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
transform: translateX(-50%);
|
color: #000;
|
||||||
|
font-size: 1.2em;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Titres
|
||||||
|
=========================================================*/
|
||||||
|
& h6{
|
||||||
|
color: lighten($theme-fg, 20);
|
||||||
|
font-size: 1.2em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 300;
|
||||||
|
letter-spacing: .2em;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
// &:before{content:'- ';}
|
||||||
|
// &:after{content:' -';}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [3][4] Boutons radio + Checkboxes
|
||||||
&.valid{
|
=========================================================*/
|
||||||
border-color: $form-valid-color;
|
& input[type="radio"],
|
||||||
}
|
& input[type="checkbox"]{
|
||||||
|
display: none;
|
||||||
&.neutral{
|
|
||||||
border-color: $form-neutral-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.search{
|
|
||||||
border-color: $form-neutral-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Textes centres
|
|
||||||
.edit_search_view,
|
|
||||||
.remove_search_view{
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
color: #aaaaaa;
|
|
||||||
|
|
||||||
span{
|
|
||||||
color: #888888;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Label
|
||||||
|
& input[type="radio"] + label[for],
|
||||||
|
& input[type="checkbox"] + label[for]{
|
||||||
|
padding-left: .8em;
|
||||||
|
|
||||||
|
// Pas de selection
|
||||||
|
-webkit-touch-callout: none; /* iOS Safari */
|
||||||
|
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
||||||
|
-khtml-user-select: none; /* Konqueror */
|
||||||
|
-moz-user-select: none; /* Firefox */
|
||||||
|
-ms-user-select: none; /* IE/Edge */
|
||||||
|
user-select: none; /* non-prefixed */
|
||||||
|
|
||||||
|
|
||||||
/* (1) Champs de texte */
|
// Receptacle
|
||||||
input[type=text],
|
|
||||||
input[type=mail],
|
|
||||||
input[type=password],
|
|
||||||
&.invalid > input[type=text],
|
|
||||||
&.invalid > input[type=mail],
|
|
||||||
&.invalid > input[type=password],
|
|
||||||
input.invalid[type=text],
|
|
||||||
input.invalid[type=mail],
|
|
||||||
input.invalid[type=password]{
|
|
||||||
display: inline-block;
|
|
||||||
margin: 1em 0;
|
|
||||||
padding: .7em 1em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
border: 1px solid #d7dde8;
|
|
||||||
|
|
||||||
color: #2f3033;
|
|
||||||
|
|
||||||
transition: border .4s ease-in-out;
|
|
||||||
|
|
||||||
&:focus,
|
|
||||||
&:hover{
|
|
||||||
border-color: $form-invalid-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Champs valides
|
|
||||||
&.valid > input[type=text],
|
|
||||||
&.valid > input[type=mail],
|
|
||||||
&.valid > input[type=password],
|
|
||||||
input.valid[type=text],
|
|
||||||
input.valid[type=mail],
|
|
||||||
input.valid[type=password]{
|
|
||||||
&:focus,
|
|
||||||
&:hover{
|
|
||||||
border-color: $form-valid-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Champs neutres
|
|
||||||
&.neutral > input[type=text],
|
|
||||||
&.neutral > input[type=mail],
|
|
||||||
&.neutral > input[type=password],
|
|
||||||
input.neutral[type=text],
|
|
||||||
input.neutral[type=mail],
|
|
||||||
input.neutral[type=password]{
|
|
||||||
&:focus,
|
|
||||||
&:hover{
|
|
||||||
border-color: $form-neutral-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Champs neutres
|
|
||||||
&.search > input[type=text],
|
|
||||||
&.search > input[type=mail],
|
|
||||||
&.search > input[type=password],
|
|
||||||
input.search[type=text],
|
|
||||||
input.search[type=mail],
|
|
||||||
input.search[type=password]{
|
|
||||||
&:focus,
|
|
||||||
&:hover{
|
|
||||||
border-color: $form-search-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (2) Boutons */
|
|
||||||
button,
|
|
||||||
button.invalid,
|
|
||||||
&.invalid > button{
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
|
|
||||||
padding: .7em 1em;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
border: 1px solid $form-invalid-color;
|
|
||||||
|
|
||||||
background: $form-invalid-color center center no-repeat;
|
|
||||||
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
transition: background .4s ease-in-out;
|
|
||||||
|
|
||||||
transform: translateX(-50%);
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:disabled{
|
|
||||||
background-color: #fff;
|
|
||||||
color: $form-invalid-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Boutons valides
|
|
||||||
button.valid,
|
|
||||||
&.valid > button{
|
|
||||||
border-color: $form-valid-color;
|
|
||||||
|
|
||||||
background-color: $form-valid-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:disabled{
|
|
||||||
background-color: #fff;
|
|
||||||
color: $form-valid-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Boutons neutres
|
|
||||||
button.neutral,
|
|
||||||
&.neutral > button{
|
|
||||||
border-color: $form-neutral-color;
|
|
||||||
|
|
||||||
background-color: $form-neutral-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:disabled{
|
|
||||||
background-color: #fff;
|
|
||||||
color: $form-neutral-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Boutons recherche
|
|
||||||
button.search,
|
|
||||||
&.search > button{
|
|
||||||
border-color: $form-search-color;
|
|
||||||
|
|
||||||
background-color: $form-search-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:disabled{
|
|
||||||
background-color: #fff;
|
|
||||||
color: $form-search-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Boutons quand action validee
|
|
||||||
&.invalid > button.active,
|
|
||||||
button.invalid.active,
|
|
||||||
button.active{
|
|
||||||
background-color: #fff;
|
|
||||||
background-image: url('/f/svg/active/st/container/'+$rd-form-invalid-color) !important;
|
|
||||||
background-size: 1em auto;
|
|
||||||
|
|
||||||
color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
button.valid.active,
|
|
||||||
&.valid > button.active{
|
|
||||||
background-image: url('/f/svg/active/st/container/'+$rd-form-valid-color) !important;
|
|
||||||
}
|
|
||||||
button.neutral.active,
|
|
||||||
&.neutral > button.active{
|
|
||||||
background-image: url('/f/svg/active/st/container/'+$rd-form-neutral-color) !important;
|
|
||||||
}
|
|
||||||
button.search.active,
|
|
||||||
&.search > button.active{
|
|
||||||
background-image: url('/f/svg/active/st/container/'+$rd-form-search-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// "OU" separant les boutons
|
|
||||||
hr.OR[data-label]{
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 0;
|
|
||||||
|
|
||||||
border: 0;
|
|
||||||
border-bottom: 1px dashed $form-invalid-color;
|
|
||||||
|
|
||||||
&:before{
|
&:before{
|
||||||
content: attr(data-label);
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 50%;
|
top: .1em;
|
||||||
left: 50%;
|
left: -.8em;
|
||||||
padding: 0 1em;
|
width: calc( 1em - 2*.15em );
|
||||||
|
height: calc( 1em - 2*.15em );
|
||||||
|
|
||||||
|
border-radius: 50% / 50%;
|
||||||
|
border: .15em solid $theme-fg-primary;
|
||||||
|
|
||||||
|
background: #fff center center no-repeat;
|
||||||
|
background-image: none;
|
||||||
|
background-size: 70% auto;
|
||||||
|
|
||||||
|
transition: background .2s ease-in-out;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Quand actif
|
||||||
|
& input[type="radio"]:checked + label[for]:before,
|
||||||
|
& input[type="checkbox"]:checked + label[for]:before{
|
||||||
|
background-color: $theme-fg-primary;
|
||||||
|
background-image: url('/f/svg/checked/st/container');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Specifique a checkbox
|
||||||
|
& input[type="checkbox"] + label[for]:before{
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Boutons de submit
|
||||||
|
=========================================================*/
|
||||||
|
& input[type="button"]{
|
||||||
|
margin: .5em;
|
||||||
|
padding: .5em;
|
||||||
|
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 3px solid $theme-fg;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
color: $theme-fg;
|
||||||
|
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
transition: background .2s ease-in-out, color .2s ease-in-out;
|
||||||
|
|
||||||
|
/* (1) Animation de @hover */
|
||||||
|
&:hover{
|
||||||
|
background-color: lighten($theme-fg, 60);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (2) Bouton primaire */
|
||||||
|
&.primary{
|
||||||
|
border-color: $theme-fg-primary;
|
||||||
|
color: $theme-fg-primary;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
color: $form-invalid-color;
|
|
||||||
|
/* (3) Animation de @hover pour bouton primaire */
|
||||||
transform: translateX(-50%) translatey(-50%);
|
&:hover{
|
||||||
|
background-color: $theme-fg-primary;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// "OU" valide
|
|
||||||
.valid > hr.OR,
|
|
||||||
hr.OR.valid{
|
|
||||||
border-bottom: 1px dashed $form-valid-color;
|
|
||||||
&:before{
|
|
||||||
color: $form-valid-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// "OU" neutre
|
|
||||||
.neutral > hr.OR,
|
|
||||||
hr.OR.neutral{
|
|
||||||
border-bottom: 1px dashed $form-neutral-color;
|
|
||||||
&:before{
|
|
||||||
color: $form-neutral-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// "OU" recherche
|
|
||||||
.search > hr.OR,
|
|
||||||
hr.OR.search{
|
|
||||||
border-bottom: 1px dashed $form-search-color;
|
|
||||||
&:before{
|
|
||||||
color: $form-search-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -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/sample/dy/profile") center center no-repeat;background-size:auto 100%;transform:scale(1);transition:transform .3s ease-in-out;cursor:default;align-self:center}#WRAPPER>#HEADER>.user-name{display:block;position:relative;margin-left:1em;margin-right:4em;color:#828282;align-self:center;cursor:default}#WRAPPER>#HEADER>.user-panel{display:block;position:absolute;top:5em;right:0;margin:1em;border-radius:5px;border:1px solid #cfcfcf;background-color:#fff}#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:-4em;left:-4.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: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/sample/dy/profile") center center no-repeat;background-size:auto 100%;cursor:default;align-self:center}#WRAPPER>#HEADER>.user-name{display:block;position:relative;margin-left:1em;margin-right:4em;color:#828282;align-self:center;cursor:default}#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}
|
||||||
/*# sourceMappingURL=header.css.map */
|
/*# sourceMappingURL=header.css.map */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"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,GAAG,CAQZ,8BAAiB,CAChB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACX,WAAW,CAAE,GAAG,CACtB,KAAK,CCjBU,qBAAmC,CDkBlD,MAAM,CClBS,qBAAmC,CDoBnD,aAAa,CAAE,SAAS,CAExB,UAAU,CAAE,+DAAiE,CAC7E,eAAe,CAAE,SAAS,CAE1B,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KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,GAAG,CAAE,MAAM,CACX,IAAI,CAAE,MAAM,CAEZ,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CAEZ,UAAU,CAAE,6DAA6D,CACzE,eAAe,CAAE,OAAO,CAExB,MAAM,CAAE,OAAO,CAGf,yCAAO,CACN,gBAAgB,CAAE,qCAAqC,CAQ1D,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"],
|
"sources": ["header.scss","constants.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "header.css"
|
"file": "header.css"
|
||||||
|
|
|
@ -43,13 +43,9 @@
|
||||||
background: $theme-bg url('/f/svg/sample/dy/profile') center center no-repeat;
|
background: $theme-bg url('/f/svg/sample/dy/profile') center center no-repeat;
|
||||||
background-size: auto 100%;
|
background-size: auto 100%;
|
||||||
|
|
||||||
transform: scale(1);
|
|
||||||
|
|
||||||
transition: transform .3s ease-in-out;
|
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (2) Username de l'utilisateur */
|
/* (2) Username de l'utilisateur */
|
||||||
|
@ -74,17 +70,18 @@
|
||||||
& > .user-panel{
|
& > .user-panel{
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $header-height;
|
top: calc( #{$header-height} - 1em );
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
margin: 1em;
|
margin: .5em;
|
||||||
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid darken($theme-bg, 10);
|
border: 1px solid darken($theme-bg, 10);
|
||||||
// box-shadow: 0 0 5px darken($theme-bg, 20);
|
|
||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
|
transition: left .3s ease-in-out;
|
||||||
|
|
||||||
|
|
||||||
/* (1) Pour chaque element du menu */
|
/* (1) Pour chaque element du menu */
|
||||||
& > span{
|
& > span{
|
||||||
|
@ -115,8 +112,8 @@
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -4em;
|
top: -2.5em;
|
||||||
left: -4.2em;
|
left: -3.2em;
|
||||||
|
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
|
|
@ -109,14 +109,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [3] Gestion du toggle de l'admin panel
|
|
||||||
=========================================================*/
|
|
||||||
var adminPanelSwitch = document.querySelector('')
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
|
@ -72,7 +72,7 @@
|
||||||
switch($error){
|
switch($error){
|
||||||
case self::Success: return "Tout s'est bien deroule"; break;
|
case self::Success: return "Tout s'est bien deroule"; break;
|
||||||
|
|
||||||
case self::ParsingFailed: return "La lecture du fichier JSON a echoue"; break;
|
case self::ParsingFailed: return "La lecture du fichier JSON ou XML a echoue"; break;
|
||||||
|
|
||||||
case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;
|
case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;
|
||||||
case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;
|
case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;
|
||||||
|
|
|
@ -0,0 +1,396 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace manager\module;
|
||||||
|
use \manager\Database;
|
||||||
|
use \manager\sessionManager;
|
||||||
|
use \manager\ManagerError;
|
||||||
|
use \manager\Repo;
|
||||||
|
|
||||||
|
class callLog{
|
||||||
|
|
||||||
|
|
||||||
|
/* DESERIALISATION D'UN JOURNAL D'APPEL
|
||||||
|
*
|
||||||
|
* @content<String> Le contenu du journal d'appel a deserialiser
|
||||||
|
*
|
||||||
|
* @return object<Array> Retourne un tableau associatif contenant les donnees triees
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
|
||||||
|
// Si le format XML n'est pas bon, on retourne une erreur
|
||||||
|
if( $xml === false )
|
||||||
|
return array('ModuleError' => ManagerError::ParsingFailed);
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Initialisation des variables
|
||||||
|
=========================================================*/
|
||||||
|
$names = array(); // Contiendra les correspondances numero/contact
|
||||||
|
$msms = array(); // Contiendra les personnes utilisant SMS/MMS
|
||||||
|
$call = array(); // Contiendra les personnes utilisant CALL
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] On traite les donnees pour chaque champ du xml
|
||||||
|
=========================================================*/
|
||||||
|
foreach($xml->Item as $log){
|
||||||
|
// On recupere le numero en string
|
||||||
|
$num = (string) $log['Number'];
|
||||||
|
|
||||||
|
// On formatte le numero
|
||||||
|
if( preg_match("/^(?:\+33|33|0)(.+)/", $num, $m) )
|
||||||
|
$num = '0'.$m[1];
|
||||||
|
// Si pas un numero, on sort de la boucle
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
/* (1) Si le type est MMS ou SMS */
|
||||||
|
if( $log['Type'] == 'SMS' || $log['Type'] == 'MMS' ){
|
||||||
|
|
||||||
|
// Si la personne n'est pas referencee, on l'ajoute
|
||||||
|
// Sinon on incremente son nombre d'apparition
|
||||||
|
if( isset($msms[$num]) )
|
||||||
|
$msms[$num]+= 1;
|
||||||
|
else
|
||||||
|
$msms[$num] = 1;
|
||||||
|
|
||||||
|
// On enregistre le nom si c'est pas fait
|
||||||
|
if( !isset($names[$num]) ) $names[$num] = $log['Name'];
|
||||||
|
|
||||||
|
|
||||||
|
/* (2) Si le type est PHONE */
|
||||||
|
}else if( $log['Type'] == 'PHONE' ){
|
||||||
|
|
||||||
|
// Si la personne n'est pas referencee, on l'ajoute
|
||||||
|
// Sinon on incremente son nombre d'apparition
|
||||||
|
if( isset($call[$num]) )
|
||||||
|
$call[$num]+= 1;
|
||||||
|
else
|
||||||
|
$call[$num] = 1;
|
||||||
|
|
||||||
|
// On enregistre le nom si c'est pas fait
|
||||||
|
if( !isset($names[$num]) ) $names[$num] = $log['Name'];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [4] On trie par nombre de contacts
|
||||||
|
=========================================================*/
|
||||||
|
$tmp = $msms;
|
||||||
|
/* (1) Tri des SMS/MMS */
|
||||||
|
$maxMSMS = array();
|
||||||
|
for( $i = 0 ; $i < 10 ; $i++ ){
|
||||||
|
$maxval = max($tmp);
|
||||||
|
$maxkey = array_search($maxval, $tmp);
|
||||||
|
array_push( $maxMSMS, array($maxkey, $maxval) );
|
||||||
|
unset($tmp[$maxkey]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$tmp = $call;
|
||||||
|
/* (2) Tri des appels */
|
||||||
|
$maxCalls = array();
|
||||||
|
for( $i = 0 ; $i < 10 ; $i++ ){
|
||||||
|
$maxval = max($tmp);
|
||||||
|
$maxkey = array_search($maxval, $tmp);
|
||||||
|
array_push( $maxCalls, array($maxkey, $maxval) );
|
||||||
|
unset($tmp[$maxkey]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Mise en forme de l'objet de retour
|
||||||
|
=========================================================*/
|
||||||
|
$object = array(
|
||||||
|
'SMS' => $maxMSMS,
|
||||||
|
'CALL' => $maxCalls,
|
||||||
|
'contact' => $names
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/* [5] Gestion du retour
|
||||||
|
=========================================================*/
|
||||||
|
return array(
|
||||||
|
'ModuleError' => ManagerError::Success,
|
||||||
|
'object' => $object
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* AJOUTE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function link($id_cluster, $id_machine){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_machine);
|
||||||
|
|
||||||
|
// 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_machine = new Repo('cluster/link', array($id_cluster, $id_machine, clusterRepo::MACHINE_CLASS));
|
||||||
|
|
||||||
|
return $link_machine;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RETIRE UNE MACHINE DONNEE A UN GROUPE DONNE
|
||||||
|
*
|
||||||
|
* @id_cluster<int> UID du groupe
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
*
|
||||||
|
* @return association<int> Renvoie l'UID de l'association cree
|
||||||
|
* Renvoie FALSE si une erreur occure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function unlink($id_cluster, $id_machine){
|
||||||
|
/* [1] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
$correct_param = Database::check('auto_increment_id', $id_cluster);
|
||||||
|
$correct_param = $correct_param && Database::check('auto_increment_id', $id_machine);
|
||||||
|
|
||||||
|
// 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_machine = new Repo('cluster/unlink', array($id_cluster, $id_machine, clusterRepo::MACHINE_CLASS));
|
||||||
|
|
||||||
|
return $link_machine;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE UNE MACHINE EN FONCTION D'UN MOT CLE
|
||||||
|
*
|
||||||
|
* @keyword<String> Element de recherche
|
||||||
|
*
|
||||||
|
* @return machines<Array> Retourne la liste des machines trouvees
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function search($keyword){
|
||||||
|
// On recupere les donnees
|
||||||
|
$machine = new Repo('machine/search', array($keyword));
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machines' => $machine->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA LISTE EXHAUSTIVE DES MACHINES
|
||||||
|
*
|
||||||
|
* @return machines<Array> Liste des machines
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getAll(){
|
||||||
|
// On recupere les donnees
|
||||||
|
$machines = new Repo('machine/getAll');
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machines' => $machines->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE D'UID DONNE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Machine d'UID donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getById($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getById', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machine' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LA MACHINE DE CODE DONNE
|
||||||
|
*
|
||||||
|
* @code<String> Code de la machine en question
|
||||||
|
*
|
||||||
|
* @return machine<Array> Machine de code donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getByCode($code){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getByCode', array($code));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'machine' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* RENVOIE LES GROUPES D'UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return clusters<Array> Groupes de la machine donne
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getClusters($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/getClusters', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
// Si aucun resultat, on retourne une erreur
|
||||||
|
if( $answer === false )
|
||||||
|
return array( 'ModuleError' => ManagerError::ModuleError );
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'clusters' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* MODIFIE UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine
|
||||||
|
* @code<String> Code RFID de la machine
|
||||||
|
* @name<String> Identifiant l'utilisateur
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function edit($id_machine=null, $code=null, $name=null){
|
||||||
|
// Si @id_machine n'est pas au bon format, on retourne une erreur
|
||||||
|
if( !Database::check('auto_increment_id', $id_machine) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] On verifie l'existence de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$machine_exists = new Repo('machine/getById', array($id_machine));
|
||||||
|
$machine_data = $machine_exists->answer();
|
||||||
|
|
||||||
|
// Si on a recupere aucune machine, on retourne une erreur
|
||||||
|
if( !is_array($machine_data) )
|
||||||
|
return array('ModuleError' => ManagerError::ModuleError);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [2] Normalisation + verification des donnees
|
||||||
|
=========================================================*/
|
||||||
|
|
||||||
|
/* (1) Verification des parametres (si correct et different)*/
|
||||||
|
$correct_param = array(
|
||||||
|
'code' => Database::check('machine.code', $code ) && $machine_data['code'] != $code,
|
||||||
|
'name' => Database::check('machine.name', $name ) && $machine_data['name'] != $name
|
||||||
|
);
|
||||||
|
|
||||||
|
/* (2) Gestion des parametres optionnels */
|
||||||
|
$opt_data = array(
|
||||||
|
'code' => ($correct_param['code']) ? $code : $machine_data['code'],
|
||||||
|
'name' => ($correct_param['name']) ? $name : $machine_data['name']
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/* [3] Modification de la machine
|
||||||
|
=========================================================*/
|
||||||
|
$request = new Repo('machine/edit', array(
|
||||||
|
$id_machine,
|
||||||
|
$opt_data['code'],
|
||||||
|
$opt_data['name']
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $request->answer()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* SUPPRIME UNE MACHINE DONNEE
|
||||||
|
*
|
||||||
|
* @id_machine<int> UID de la machine en question
|
||||||
|
*
|
||||||
|
* @return status<Boolean> Retourne si oui ou non tout s'est bien deroule
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function delete($id_machine){
|
||||||
|
// On recupere les donnees
|
||||||
|
$request = new Repo('machine/delete', array($id_machine));
|
||||||
|
$answer = $request->answer();
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'status' => $answer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?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#"
|
||||||
|
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"
|
||||||
|
width="31.999998"
|
||||||
|
height="32"
|
||||||
|
viewBox="0 0 31.999999 32.000001"
|
||||||
|
id="svg4275"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="checked.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4277" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="7.9195959"
|
||||||
|
inkscape:cx="-1.0679217"
|
||||||
|
inkscape:cy="3.3619821"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
units="px"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4280">
|
||||||
|
<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(-102.35483,-763.0069)">
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:4.76269341px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
d="m 104.7619,781.2107 9.27759,8.0108 17.91153,-20.40357"
|
||||||
|
id="path6211"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
14
todo.md
14
todo.md
|
@ -19,14 +19,14 @@
|
||||||
- [x] Charte graphique (couleurs, dimensions)
|
- [x] Charte graphique (couleurs, dimensions)
|
||||||
- [x] [css/constants] CSS
|
- [x] [css/constants] CSS
|
||||||
- [x] [doc/wireframe.png] Layout de base (positions)
|
- [x] [doc/wireframe.png] Layout de base (positions)
|
||||||
- [ ] Header User Icon
|
- [x] Header User Icon
|
||||||
- [ ] Header Search
|
- [x] Header Search
|
||||||
- [ ] Radio Button
|
- [x] Radio Button
|
||||||
- [ ] Checkbox
|
- [x] Checkbox
|
||||||
- [ ] Titles
|
- [x] Titles
|
||||||
|
- [x] Button carved
|
||||||
|
- [x] Button
|
||||||
- [ ] Select
|
- [ ] Select
|
||||||
- [ ] Button carved
|
|
||||||
- [ ] Button
|
|
||||||
- [ ] Implementation CSS
|
- [ ] Implementation CSS
|
||||||
- [x] [doc/wireframe.png] Components
|
- [x] [doc/wireframe.png] Components
|
||||||
- [ ] CSS
|
- [ ] CSS
|
||||||
|
|
9
view.php
9
view.php
|
@ -44,12 +44,13 @@
|
||||||
<!-- ZONE UTILISATEUR -->
|
<!-- ZONE UTILISATEUR -->
|
||||||
<span class='user-picture'></span>
|
<span class='user-picture'></span>
|
||||||
<span class='user-name'>John Doe</span>
|
<span class='user-name'>John Doe</span>
|
||||||
|
|
||||||
|
<!-- USER PANEL -->
|
||||||
<input type='checkbox' value='' id='toggle-user-panel'>
|
<input type='checkbox' value='' id='toggle-user-panel'>
|
||||||
<label for='toggle-user-panel' class='user-panel'>
|
<label for='toggle-user-panel' class='user-panel'>
|
||||||
<span class='profile'>User menu 1</span>
|
<span class='profile'>Mon Profil</span>
|
||||||
<span class='administration'>User menu 2</span>
|
<span class='administration'>Historique</span>
|
||||||
<span class='logout'>User menu 3</span>
|
<span class='logout'>Parametres</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,8 +15,23 @@
|
||||||
|
|
||||||
$sublink = $post[0];
|
$sublink = $post[0];
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
echo "dashboard";
|
|
||||||
|
|
||||||
?>
|
<section class='active'>
|
||||||
|
<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>
|
||||||
|
</section>
|
Loading…
Reference in New Issue