diff --git a/README.md b/README.md
index 422b6e9..6b6ac64 100755
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
-# stef
-Personal STEF project
+# SOCIOVIEW
+Plateforme d'acquisition et mise en relation de donnees relationnelles.
\ No newline at end of file
diff --git a/automate.php b/automate.php
index 1945d69..07f8e12 100755
--- a/automate.php
+++ b/automate.php
@@ -6,6 +6,8 @@
use \manager\ManagerError;
use \manager\Repo;
+ use \manager\module\callLog;
+
debug();
@@ -20,110 +22,48 @@
/* [1] On recupere le journal d'appel
=========================================================*/
- $filename = 'calllog.xml';
- $file = simplexml_load_file( $filename );
-
- /* [2] On parcours chaque ligne
+ $file_content = file_get_contents('calllog.xml');
+
+ /* [2] On cree la requete
=========================================================*/
- $names = array(); // Contiendra les correspondances num/names
- $msms = array(); // Contiendra les personnes utilisant SMS/MMS
- $call = array(); // Contiendra les personnes utilisant CALL
+ $request = new ModuleRequest('callLog/unserialize', array($file_content));
+ $answer = $request->dispatch(); // on l'execute
-
-
- /* [3] On parcours chaque ligne
+ /* [3] Si erreur
=========================================================*/
- foreach($file->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'];
-
- }
-
- // var_dump( $log );
+ if( $answer->error != ManagerError::Success ){
+ // on l'explicite
+ var_dump( ManagerError::explicit($answer->error) );
+ // on quitte
+ return;
}
- /* [4] On trie par nombre de contacts
+ /* [4] Sinon on recupere le resultat
=========================================================*/
- $tmp = $msms;
- /* (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]);
- }
+ $obj = $answer->get('object');
/* [5] On debug les donnees recues
=========================================================*/
- echo "Il y a ".count($names)." personnes :
";
- echo "- ".count($msms)." par SMS/MMS
";
- echo "- ".count($call)." par telephone
";
-
+ var_dump( "Il y a ".count($obj['contact'])." personnes :" );
+ var_dump( "- ".count($obj['SMS'])." par SMS/MMS" );
+ var_dump( "- ".count($obj['CALL'])." par telephone" );
+ echo "
";
echo "TOP 10 DES APPELS
";
echo "=================
";
- foreach($maxCalls as $v)
- var_dump( $v[0] ." (".$names[$v[0]].") \t\t\t". $v[1] ." appels");
+ foreach($obj['CALL'] as $v)
+ var_dump( $v[0] ." (".$obj['contact'][$v[0]].") \t\t\t". $v[1] ." appels");
- echo "TOP 10 DES MMS/SMS
";
- echo "==================
";
- foreach($maxMSMS as $v)
- var_dump( $v[0] ." (".$names[$v[0]].") \t\t\t". $v[1] ." appels");
+ echo "TOP 10 DES MMS/SMS
";
+ echo "==================
";
+ foreach($obj['SMS'] as $v)
+ var_dump( $v[0] ." (".$obj['contact'][$v[0]].") \t\t\t". $v[1] ." appels");
+
- // var_dump( $call );
-
- return 0;
+ var_dump("\n\n\nOBJET COMPLET");
+ var_dump( $obj );
}
-
-
parseCallLog();
?>
\ No newline at end of file
diff --git a/config/modules.json b/config/modules.json
index 0a3fcb1..e087254 100755
--- a/config/modules.json
+++ b/config/modules.json
@@ -1,4 +1,11 @@
{
+
+ "callLog": [
+
+ "unserialize"
+
+ ],
+
"userDefault" :[
"create",
diff --git a/css/container.css b/css/container.css
index 34cbf9b..f1d7ebe 100755
--- a/css/container.css
+++ b/css/container.css
@@ -1,2 +1,2 @@
-#WRAPPER>#CONTAINER>section{display:none;flex-grow:1}#WRAPPER>#CONTAINER>section.active{display:block}#WRAPPER>#CONTAINER>section.active.list{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap}#WRAPPER>#CONTAINER>section.active.list .inline-box{flex:0 0 1}#WRAPPER>#CONTAINER>section.active.list .searchbar{display:inline-block;position:relative;flex:calc( 100% - 2*1em - 2*1em );height:1em;margin:1em;padding:.5em 1em;padding-left:2em;border-radius:3px;border:1px solid #b1b1b1;background:#fff url("/f/svg/search/st/sub-menu-side/b1b1b1") 0.5em center no-repeat;background-size:1em;transition:border .4s ease-in-out}#WRAPPER>#CONTAINER>section.active.list .searchbar:hover,#WRAPPER>#CONTAINER>section.active.list .searchbar:focus{border-color:#5630ed}#WRAPPER>#CONTAINER>section.active.list .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 #d52918;background:#d52918;color:#fff;text-shadow:1px 1px #a72013}#WRAPPER>#CONTAINER>section>.inline-box{display:inline-block;position:relative;flex:calc( 50% - 2*1em - 2*1em );margin:1em;padding:1em;border-radius:3px;box-shadow:0 0 1px #b7b7b7;background-color:#fff}#WRAPPER>#CONTAINER>section>.inline-box.hidden{display:none}#WRAPPER>#CONTAINER>section>.inline-box a{text-decoration:none;color:inherit}#WRAPPER>#CONTAINER>section>.inline-box .title{display:inline-block;font-size:1.15em;font-weight:bold;color:#bf2515;white-space:nowrap}#WRAPPER>#CONTAINER>section>.inline-box .title>span{font-size:.8em;color:#333}#WRAPPER>#CONTAINER>section>.inline-box .code,#WRAPPER>#CONTAINER>section>.inline-box .mail{display:block;margin:1em;color:#333;white-space:nowrap}#WRAPPER>#CONTAINER>section>.inline-box .code svg,#WRAPPER>#CONTAINER>section>.inline-box .mail svg{display:inline-block;position:relative;margin-left:.5em;margin-right:.5em;margin-bottom:-.6em;width:1.5em;height:2em;pointer-events:none}#WRAPPER>#CONTAINER>section>.inline-box .code svg path,#WRAPPER>#CONTAINER>section>.inline-box .mail svg path{fill:#333 !important;pointer-events:none}#WRAPPER>#CONTAINER>section>.inline-box .groups{display:block;margin:1em;color:#333;white-space:nowrap}#WRAPPER>#CONTAINER>section>.inline-box .groups svg{display:inline-block;position:relative;margin-left:.5em;margin-right:.5em;margin-bottom:-.6em;width:1.5em;height:2em;pointer-events:none}#WRAPPER>#CONTAINER>section>.inline-box .groups svg path{fill:#333 !important;pointer-events:none}#WRAPPER>#CONTAINER>section>.inline-box .groups 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}#WRAPPER>#CONTAINER>section>.inline-box .groups span: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}#WRAPPER>#CONTAINER>section>.inline-box .groups span:hover:before{color:#d52918}#WRAPPER>#CONTAINER>section>.inline-box .link_edit,#WRAPPER>#CONTAINER>section>.inline-box .link_remove{display:inline-block;float:right;position:relative;width:1em;height:1em;margin-left:1em;cursor:pointer}#WRAPPER>#CONTAINER>section>.inline-box .link_edit>svg,#WRAPPER>#CONTAINER>section>.inline-box .link_remove>svg{width:100%;height:100%;fill:#ddd !important;transition:fill .4s ease-in-out;pointer-events:none}#WRAPPER>#CONTAINER>section>.inline-box .link_edit:hover>svg,#WRAPPER>#CONTAINER>section>.inline-box .link_remove:hover>svg{fill:#2193e6 !important}#WRAPPER>#CONTAINER>section>.inline-box .link_remove:hover>svg{fill:#d52918 !important}#WRAPPER>#CONTAINER>section>form{display:inline-block;position:relative;left:50%;margin:.3em 0;padding:1em;border-radius:3px;border-color:#d52918;box-shadow:0 0 1px #b7b7b7;background-color:#fff;transform:translateX(-50%)}#WRAPPER>#CONTAINER>section>form.valid{border-color:#27a560}#WRAPPER>#CONTAINER>section>form.neutral{border-color:#2193e6}#WRAPPER>#CONTAINER>section>form.search{border-color:#2193e6}#WRAPPER>#CONTAINER>section>form .edit_search_view,#WRAPPER>#CONTAINER>section>form .remove_search_view{display:inline-block;width:100%;text-align:center;color:#aaaaaa}#WRAPPER>#CONTAINER>section>form .edit_search_view span,#WRAPPER>#CONTAINER>section>form .remove_search_view span{color:#888888}#WRAPPER>#CONTAINER>section>form input[type=text],#WRAPPER>#CONTAINER>section>form input[type=mail],#WRAPPER>#CONTAINER>section>form input[type=password],#WRAPPER>#CONTAINER>section>form.invalid>input[type=text],#WRAPPER>#CONTAINER>section>form.invalid>input[type=mail],#WRAPPER>#CONTAINER>section>form.invalid>input[type=password],#WRAPPER>#CONTAINER>section>form input.invalid[type=text],#WRAPPER>#CONTAINER>section>form input.invalid[type=mail],#WRAPPER>#CONTAINER>section>form 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}#WRAPPER>#CONTAINER>section>form input[type=text]:focus,#WRAPPER>#CONTAINER>section>form input[type=text]:hover,#WRAPPER>#CONTAINER>section>form input[type=mail]:focus,#WRAPPER>#CONTAINER>section>form input[type=mail]:hover,#WRAPPER>#CONTAINER>section>form input[type=password]:focus,#WRAPPER>#CONTAINER>section>form input[type=password]:hover,#WRAPPER>#CONTAINER>section>form.invalid>input[type=text]:focus,#WRAPPER>#CONTAINER>section>form.invalid>input[type=text]:hover,#WRAPPER>#CONTAINER>section>form.invalid>input[type=mail]:focus,#WRAPPER>#CONTAINER>section>form.invalid>input[type=mail]:hover,#WRAPPER>#CONTAINER>section>form.invalid>input[type=password]:focus,#WRAPPER>#CONTAINER>section>form.invalid>input[type=password]:hover,#WRAPPER>#CONTAINER>section>form input.invalid[type=text]:focus,#WRAPPER>#CONTAINER>section>form input.invalid[type=text]:hover,#WRAPPER>#CONTAINER>section>form input.invalid[type=mail]:focus,#WRAPPER>#CONTAINER>section>form input.invalid[type=mail]:hover,#WRAPPER>#CONTAINER>section>form input.invalid[type=password]:focus,#WRAPPER>#CONTAINER>section>form input.invalid[type=password]:hover{border-color:#d52918}#WRAPPER>#CONTAINER>section>form.valid>input[type=text]:focus,#WRAPPER>#CONTAINER>section>form.valid>input[type=text]:hover,#WRAPPER>#CONTAINER>section>form.valid>input[type=mail]:focus,#WRAPPER>#CONTAINER>section>form.valid>input[type=mail]:hover,#WRAPPER>#CONTAINER>section>form.valid>input[type=password]:focus,#WRAPPER>#CONTAINER>section>form.valid>input[type=password]:hover,#WRAPPER>#CONTAINER>section>form input.valid[type=text]:focus,#WRAPPER>#CONTAINER>section>form input.valid[type=text]:hover,#WRAPPER>#CONTAINER>section>form input.valid[type=mail]:focus,#WRAPPER>#CONTAINER>section>form input.valid[type=mail]:hover,#WRAPPER>#CONTAINER>section>form input.valid[type=password]:focus,#WRAPPER>#CONTAINER>section>form input.valid[type=password]:hover{border-color:#27a560}#WRAPPER>#CONTAINER>section>form.neutral>input[type=text]:focus,#WRAPPER>#CONTAINER>section>form.neutral>input[type=text]:hover,#WRAPPER>#CONTAINER>section>form.neutral>input[type=mail]:focus,#WRAPPER>#CONTAINER>section>form.neutral>input[type=mail]:hover,#WRAPPER>#CONTAINER>section>form.neutral>input[type=password]:focus,#WRAPPER>#CONTAINER>section>form.neutral>input[type=password]:hover,#WRAPPER>#CONTAINER>section>form input.neutral[type=text]:focus,#WRAPPER>#CONTAINER>section>form input.neutral[type=text]:hover,#WRAPPER>#CONTAINER>section>form input.neutral[type=mail]:focus,#WRAPPER>#CONTAINER>section>form input.neutral[type=mail]:hover,#WRAPPER>#CONTAINER>section>form input.neutral[type=password]:focus,#WRAPPER>#CONTAINER>section>form input.neutral[type=password]:hover{border-color:#2193e6}#WRAPPER>#CONTAINER>section>form.search>input[type=text]:focus,#WRAPPER>#CONTAINER>section>form.search>input[type=text]:hover,#WRAPPER>#CONTAINER>section>form.search>input[type=mail]:focus,#WRAPPER>#CONTAINER>section>form.search>input[type=mail]:hover,#WRAPPER>#CONTAINER>section>form.search>input[type=password]:focus,#WRAPPER>#CONTAINER>section>form.search>input[type=password]:hover,#WRAPPER>#CONTAINER>section>form input.search[type=text]:focus,#WRAPPER>#CONTAINER>section>form input.search[type=text]:hover,#WRAPPER>#CONTAINER>section>form input.search[type=mail]:focus,#WRAPPER>#CONTAINER>section>form input.search[type=mail]:hover,#WRAPPER>#CONTAINER>section>form input.search[type=password]:focus,#WRAPPER>#CONTAINER>section>form input.search[type=password]:hover{border-color:#5630ed}#WRAPPER>#CONTAINER>section>form button,#WRAPPER>#CONTAINER>section>form button.invalid,#WRAPPER>#CONTAINER>section>form.invalid>button{display:inline-block;position:relative;left:50%;padding:.7em 1em;border-radius:3px;border:1px solid #d52918;background:#d52918 center center no-repeat;color:#fff;transition:background .4s ease-in-out;transform:translateX(-50%)}#WRAPPER>#CONTAINER>section>form button:hover,#WRAPPER>#CONTAINER>section>form button:focus,#WRAPPER>#CONTAINER>section>form button:disabled,#WRAPPER>#CONTAINER>section>form button.invalid:hover,#WRAPPER>#CONTAINER>section>form button.invalid:focus,#WRAPPER>#CONTAINER>section>form button.invalid:disabled,#WRAPPER>#CONTAINER>section>form.invalid>button:hover,#WRAPPER>#CONTAINER>section>form.invalid>button:focus,#WRAPPER>#CONTAINER>section>form.invalid>button:disabled{background-color:#fff;color:#d52918}#WRAPPER>#CONTAINER>section>form button.valid,#WRAPPER>#CONTAINER>section>form.valid>button{border-color:#27a560;background-color:#27a560}#WRAPPER>#CONTAINER>section>form button.valid:hover,#WRAPPER>#CONTAINER>section>form button.valid:focus,#WRAPPER>#CONTAINER>section>form button.valid:disabled,#WRAPPER>#CONTAINER>section>form.valid>button:hover,#WRAPPER>#CONTAINER>section>form.valid>button:focus,#WRAPPER>#CONTAINER>section>form.valid>button:disabled{background-color:#fff;color:#27a560}#WRAPPER>#CONTAINER>section>form button.neutral,#WRAPPER>#CONTAINER>section>form.neutral>button{border-color:#2193e6;background-color:#2193e6}#WRAPPER>#CONTAINER>section>form button.neutral:hover,#WRAPPER>#CONTAINER>section>form button.neutral:focus,#WRAPPER>#CONTAINER>section>form button.neutral:disabled,#WRAPPER>#CONTAINER>section>form.neutral>button:hover,#WRAPPER>#CONTAINER>section>form.neutral>button:focus,#WRAPPER>#CONTAINER>section>form.neutral>button:disabled{background-color:#fff;color:#2193e6}#WRAPPER>#CONTAINER>section>form button.search,#WRAPPER>#CONTAINER>section>form.search>button{border-color:#5630ed;background-color:#5630ed}#WRAPPER>#CONTAINER>section>form button.search:hover,#WRAPPER>#CONTAINER>section>form button.search:focus,#WRAPPER>#CONTAINER>section>form button.search:disabled,#WRAPPER>#CONTAINER>section>form.search>button:hover,#WRAPPER>#CONTAINER>section>form.search>button:focus,#WRAPPER>#CONTAINER>section>form.search>button:disabled{background-color:#fff;color:#5630ed}#WRAPPER>#CONTAINER>section>form.invalid>button.active,#WRAPPER>#CONTAINER>section>form button.invalid.active,#WRAPPER>#CONTAINER>section>form button.active{background-color:#fff;background-image:url("/f/svg/active/st/container/d52918") !important;background-size:1em auto;color:transparent !important}#WRAPPER>#CONTAINER>section>form button.valid.active,#WRAPPER>#CONTAINER>section>form.valid>button.active{background-image:url("/f/svg/active/st/container/27a560") !important}#WRAPPER>#CONTAINER>section>form button.neutral.active,#WRAPPER>#CONTAINER>section>form.neutral>button.active{background-image:url("/f/svg/active/st/container/2193e6") !important}#WRAPPER>#CONTAINER>section>form button.search.active,#WRAPPER>#CONTAINER>section>form.search>button.active{background-image:url("/f/svg/active/st/container/5630ed") !important}#WRAPPER>#CONTAINER>section>form hr.OR[data-label]{display:block;position:relative;width:100%;height:0;border:0;border-bottom:1px dashed #d52918}#WRAPPER>#CONTAINER>section>form hr.OR[data-label]:before{content:attr(data-label);display:inline-block;position:relative;top:50%;left:50%;padding:0 1em;background-color:#fff;color:#d52918;transform:translateX(-50%) translatey(-50%)}#WRAPPER>#CONTAINER>section>form .valid>hr.OR,#WRAPPER>#CONTAINER>section>form hr.OR.valid{border-bottom:1px dashed #27a560}#WRAPPER>#CONTAINER>section>form .valid>hr.OR:before,#WRAPPER>#CONTAINER>section>form hr.OR.valid:before{color:#27a560}#WRAPPER>#CONTAINER>section>form .neutral>hr.OR,#WRAPPER>#CONTAINER>section>form hr.OR.neutral{border-bottom:1px dashed #2193e6}#WRAPPER>#CONTAINER>section>form .neutral>hr.OR:before,#WRAPPER>#CONTAINER>section>form hr.OR.neutral:before{color:#2193e6}#WRAPPER>#CONTAINER>section>form .search>hr.OR,#WRAPPER>#CONTAINER>section>form hr.OR.search{border-bottom:1px dashed #5630ed}#WRAPPER>#CONTAINER>section>form .search>hr.OR:before,#WRAPPER>#CONTAINER>section>form hr.OR.search:before{color:#5630ed}
+#WRAPPER>#CONTAINER>section{display:block;position:relative;flex-grow:1;padding:1.5em;border-radius:5px;background-color:#fff;color:#000;font-size:1.2em}#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 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;padding:.5em;border-radius:5px;border:3px solid #515151;font-weight:bold;color:#515151;background-color:#fff;transition:background .2s ease-in-out, color .2s ease-in-out}#WRAPPER>#CONTAINER>section input[type="button"]:hover{background-color:#eaeaea}#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}
/*# sourceMappingURL=container.css.map */
diff --git a/css/container.css.map b/css/container.css.map
index 670416f..6daa4f5 100755
--- a/css/container.css.map
+++ b/css/container.css.map
@@ -1,6 +1,6 @@
{
"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,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K,CAAE,qBAAqB,CAC5B,MAAM,CAAE,qBAAqB,CAE9B,aAAa,CAAE,SAAS,CACxB,MAAM,CAAE,oBAA6B,CAErC,UAAU,CAAE,4BAA4B,CACxC,gBAAgB,CAAE,IAAI,CACtB,eAAe,CAAE,QAAQ,CAEzB,UAAU,CAAE,0BAA0B,CAEtC,MAAM,CAAE,OAAO,CAKjB,sJACoD,CACnD,gBAAgB,CCnFA,OAAO,CDoFvB,gBAAgB,CAAE,kCAAkC,CAKrD,oEAA4C,CAC3C,aAAa,CAAE,GAAG,CASnB,gDAAsB,CACrB,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,IAAI,CAEb,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,iBAAmB,CAE3B,WAAW,CAAE,IAAI,CACjB,KAAK,CC5GW,OAAO,CD8GvB,gBAAgB,CAAE,IAAI,CAEtB,UAAU,CAAE,iDAAiD,CAG7D,sDAAO,CACN,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"],
"names": [],
"file": "container.css"
diff --git a/css/container.scss b/css/container.scss
index ec7a74f..e11f42a 100755
--- a/css/container.scss
+++ b/css/container.scss
@@ -5,532 +5,142 @@
/* [1] Section (contenu)
=========================================================*/
& > section{
- display: none;
- flex-grow: 1;
- }
-
- // @active
- & > section.active{
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;
- // width: calc( 50% - 2*1em - 2*1em );
- flex: calc( 50% - 2*1em - 2*1em );
- margin: 1em;
- padding: 1em;
+ flex-grow: 1;
- border-radius: 3px;
- box-shadow: 0 0 1px #b7b7b7;
+ padding: 1.5em;
- background-color: #fff;
-
- // 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;
+ border-radius: 5px;
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:' -';}
+ }
+
+
+
-
- &.valid{
- border-color: $form-valid-color;
- }
-
- &.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;
- }
+ /* [3][4] Boutons radio + Checkboxes
+ =========================================================*/
+ & input[type="radio"],
+ & input[type="checkbox"]{
+ display: none;
}
+
+ // 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 */
- 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;
-
+ // Receptacle
&:before{
- content: attr(data-label);
+ content: '';
display: inline-block;
position: relative;
- top: 50%;
- left: 50%;
- padding: 0 1em;
-
+ top: .1em;
+ left: -.8em;
+ 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;
- color: $form-invalid-color;
-
- transform: translateX(-50%) translatey(-50%);
+
+ /* (3) Animation de @hover pour bouton primaire */
+ &: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;
- }
-
- }
}
}
\ No newline at end of file
diff --git a/css/header.css b/css/header.css
index 5882b29..234042e 100755
--- a/css/header.css
+++ b/css/header.css
@@ -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 */
diff --git a/css/header.css.map b/css/header.css.map
index 199661b..5ad9c0e 100755
--- a/css/header.css.map
+++ b/css/header.css.map
@@ -1,6 +1,6 @@
{
"version": 3,
-"mappings": "AAOC,2BAAc,CACb,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,G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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,CAQxB,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,QAAQ,CACjB,YAAY,CAAE,GAAG,CAEjB,MAAM,CAAE,OAAO,CATf,kDAAkB,CACjB,aAAa,CAAE,cAAc,CAW9B,uCAAO,CACN,gBAAgB,CAAE,IAAI,CAMxB,mCAAQ,CACP,OAAO,CAAE,EAAE,CACX,OAAO,CAAE,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"],
"names": [],
"file": "header.css"
diff --git a/css/header.scss b/css/header.scss
index 4072674..818ad94 100755
--- a/css/header.scss
+++ b/css/header.scss
@@ -43,13 +43,9 @@
background: $theme-bg 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;
-
}
/* (2) Username de l'utilisateur */
@@ -74,17 +70,18 @@
& > .user-panel{
display: block;
position: absolute;
- top: $header-height;
+ top: calc( #{$header-height} - 1em );
right: 0;
- margin: 1em;
+ margin: .5em;
border-radius: 5px;
border: 1px solid darken($theme-bg, 10);
- // box-shadow: 0 0 5px darken($theme-bg, 20);
background-color: #fff;
+ transition: left .3s ease-in-out;
+
/* (1) Pour chaque element du menu */
& > span{
@@ -115,8 +112,8 @@
content: '';
display: block;
position: absolute;
- top: -4em;
- left: -4.2em;
+ top: -2.5em;
+ left: -3.2em;
width: 1em;
height: 1em;
diff --git a/js/action-script.js b/js/action-script.js
index 6efc235..8371cd4 100755
--- a/js/action-script.js
+++ b/js/action-script.js
@@ -109,14 +109,4 @@
-
-
-
-
-
- /* [3] Gestion du toggle de l'admin panel
- =========================================================*/
- var adminPanelSwitch = document.querySelector('')
-
-
// }
\ No newline at end of file
diff --git a/manager/ManagerError.php b/manager/ManagerError.php
index c85d962..f26f8f6 100755
--- a/manager/ManagerError.php
+++ b/manager/ManagerError.php
@@ -72,7 +72,7 @@
switch($error){
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::UnreachableResource: return "La ressource n'existe pas (404)"; break;
diff --git a/manager/module/callLog.php b/manager/module/callLog.php
new file mode 100644
index 0000000..9e2953c
--- /dev/null
+++ b/manager/module/callLog.php
@@ -0,0 +1,396 @@
+ Le contenu du journal d'appel a deserialiser
+ *
+ * @return object 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 UID du groupe
+ * @id_machine UID de la machine
+ *
+ * @return association 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 UID du groupe
+ * @id_machine UID de la machine
+ *
+ * @return association 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 Element de recherche
+ *
+ * @return machines 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 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 UID de la machine en question
+ *
+ * @return machine 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 Code de la machine en question
+ *
+ * @return machine 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 UID de la machine en question
+ *
+ * @return clusters 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 UID de la machine
+ * @code Code RFID de la machine
+ * @name Identifiant l'utilisateur
+ *
+ * @return status 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 UID de la machine en question
+ *
+ * @return status 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
+ );
+ }
+
+
+
+
+
+ }
+
+
+?>
\ No newline at end of file
diff --git a/src/static/container/checked.svg b/src/static/container/checked.svg
new file mode 100644
index 0000000..d6f1535
--- /dev/null
+++ b/src/static/container/checked.svg
@@ -0,0 +1,69 @@
+
+
+
+
diff --git a/todo.md b/todo.md
index 721a7c1..f8a4d72 100755
--- a/todo.md
+++ b/todo.md
@@ -19,14 +19,14 @@
- [x] Charte graphique (couleurs, dimensions)
- [x] [css/constants] CSS
- [x] [doc/wireframe.png] Layout de base (positions)
- - [ ] Header User Icon
- - [ ] Header Search
- - [ ] Radio Button
- - [ ] Checkbox
- - [ ] Titles
+ - [x] Header User Icon
+ - [x] Header Search
+ - [x] Radio Button
+ - [x] Checkbox
+ - [x] Titles
+ - [x] Button carved
+ - [x] Button
- [ ] Select
- - [ ] Button carved
- - [ ] Button
- [ ] Implementation CSS
- [x] [doc/wireframe.png] Components
- [ ] CSS
diff --git a/view.php b/view.php
index 5f27b92..e0eb9fe 100755
--- a/view.php
+++ b/view.php
@@ -44,12 +44,13 @@
John Doe
-
+
+
diff --git a/view/dashboard.php b/view/dashboard.php
index 8e8f865..13e039a 100755
--- a/view/dashboard.php
+++ b/view/dashboard.php
@@ -15,8 +15,23 @@
$sublink = $post[0];
+?>
- echo "dashboard";
-?>
\ No newline at end of file
+
\ No newline at end of file