From 0a1258abac86330433d38040265ad86993a4ae5d Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 12 May 2016 08:28:54 +0200 Subject: [PATCH 1/2] minmod (html-data) --- doc/phone_log.json | 2 +- js/includes/input-html-data-min.js | 4 ++-- js/includes/input-html-data.js | 9 +++++---- manager/module/call_log.php | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/phone_log.json b/doc/phone_log.json index 6866e59..a0dcea4 100644 --- a/doc/phone_log.json +++ b/doc/phone_log.json @@ -17,7 +17,7 @@ { "contact":"15", "date":"2014-02-15T21:08:34", "duration":"349", "direction":"OUTGOING", "type":"PHONE" }, { "contact":"16", "date":"2014-02-15T20:51:38", "duration":"0", "direction":"OUTGOING", "type":"PHONE" }, { "contact":"17", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" }, - { "contact":"18", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" }, + { "contact":"18", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"MISSED", "type":"PHONE" }, { "contact":"19", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" }, { "contact":"20", "date":"2014-02-15T19:06:33", "duration":"657", "direction":"OUTGOING", "type":"PHONE" }, { "contact":"21", "date":"2014-02-15T17:24:18", "duration":"276", "direction":"OUTGOING", "type":"PHONE" }, diff --git a/js/includes/input-html-data-min.js b/js/includes/input-html-data-min.js index 41b41b3..218aa14 100644 --- a/js/includes/input-html-data-min.js +++ b/js/includes/input-html-data-min.js @@ -1,3 +1,3 @@ var contactBuilder=new HTMLBuilder;contactBuilder.setLayout("

\n\t\n\t\n\t\n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t\n

\n\n"); -var miniFicheBuilder=new HTMLBuilder;miniFicheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n
"); -var ficheBuilder=new HTMLBuilder;ficheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tSituation familiale:
\n\t\t
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

O\u00f9 habite t-elle/il\u00a0?

\n\t
\n\t\t\n\t\t\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\tDepuis quand connaissez-vous cette personne ?

\n\t\tmois\n\t\tet    ans.\n\t
\n\t

Contexte de rencontre

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

Avec quelle fr\u00e9quence discutez-vous avec cette personne\u00a0?

\n\t
\n\t\tFace \u00e0 face
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tT\u00e9l\u00e9phone ou skype et \u00e9quivalent
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSMS, et \u00e9quivalents
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tCourrier \u00e9lectronique
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tFacebook ou autre r\u00e9seau social
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t

Comment \u00eates-vous \u00ab\u00a0connect\u00e9\u00a0\u00bb \u00e0 cette personne\u00a0?

\n\t
\n\t\tSes coordonn\u00e9es sont dans votre carnet d\u2019adresse
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSon num\u00e9ro de mobile est enregistr\u00e9 sur votre mobile (ou vous-m\u00eames \u00eates sur le sien)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif r\u00e9guli\u00e8rement
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau social : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n
\n"); +var miniFicheBuilder=new HTMLBuilder;miniFicheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

O\u00f9 habite t-elle/il\u00a0?

\n\t
\n\t\t\u00c0 combien de temps est-ce de chez vous ?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n
"); +var ficheBuilder=new HTMLBuilder;ficheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tSituation familiale:
\n\t\t
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

O\u00f9 habite t-elle/il\u00a0?

\n\t
\n\t\t\n\t\t\n\t
\n\t
\n\t\t\u00c0 combien de temps est-ce de chez vous ?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\tDepuis quand connaissez-vous cette personne ?

\n\t\tmois\n\t\tet    ans.\n\t
\n\t

Contexte de rencontre

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

Avec quelle fr\u00e9quence discutez-vous avec cette personne\u00a0?

\n\t
\n\t\tFace \u00e0 face
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tT\u00e9l\u00e9phone ou skype et \u00e9quivalent
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSMS, et \u00e9quivalents
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tCourrier \u00e9lectronique
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tFacebook ou autre r\u00e9seau social
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t

Comment \u00eates-vous \u00ab\u00a0connect\u00e9\u00a0\u00bb \u00e0 cette personne\u00a0?

\n\t
\n\t\tSes coordonn\u00e9es sont dans votre carnet d\u2019adresse
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSon num\u00e9ro de mobile est enregistr\u00e9 sur votre mobile (ou vous-m\u00eames \u00eates sur le sien)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif r\u00e9guli\u00e8rement
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau social : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n
\n"); diff --git a/js/includes/input-html-data.js b/js/includes/input-html-data.js index 3680cce..73cff19 100644 --- a/js/includes/input-html-data.js +++ b/js/includes/input-html-data.js @@ -137,9 +137,10 @@ miniFicheBuilder.setLayout( "\t\n"+ + "\t

Où habite t-elle/il ?

\n"+ "\t
\n"+ - "\t\tOù habite t-elle/il ?
\n"+ - "\t\t   
\n"+ + "\t\tÀ combien de temps est-ce de chez vous ?
\n"+ + "\t\t   
\n"+ "\t\t   
\n"+ "\t\t   
\n"+ "\t\t   
\n"+ @@ -342,8 +343,8 @@ ficheBuilder.setLayout( "\t
\n"+ - "\t\tOù habite t-elle/il ?
\n"+ - "\t\t   
\n"+ + "\t\tÀ combien de temps est-ce de chez vous ?
\n"+ + "\t\t   
\n"+ "\t\t   
\n"+ "\t\t   
\n"+ "\t\t   
\n"+ diff --git a/manager/module/call_log.php b/manager/module/call_log.php index 05e40fd..55a124a 100644 --- a/manager/module/call_log.php +++ b/manager/module/call_log.php @@ -74,7 +74,6 @@ /* (2) On enregistre le contact dans l'annuaire s'il y est pas déjà */ if( !isset($phone_directory[$number]) ) $phone_directory[$number] = array( - 'name' => strlen($log['Name']) ? (string) $log['Name'] : null, 'calls' => 0, 'sms' => 0 From ee50d61a7ee6f5e6db7da55f9560b955fbff1180 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 12 May 2016 10:30:54 +0200 Subject: [PATCH 2/2] Prototype du dictionnaire de phone_log --- doc/phone_log.json | 44 +++++++++++++++++++------------------- doc/phone_log_dict.json | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 doc/phone_log_dict.json diff --git a/doc/phone_log.json b/doc/phone_log.json index a0dcea4..9792bd1 100644 --- a/doc/phone_log.json +++ b/doc/phone_log.json @@ -25,28 +25,28 @@ ], "contacts": [ - { "contact":"1", "number":"0502030405", "name":"", "sexe":"0", "age":"5", "studies":"1", "reltype":"inconnu", "dist":"5" }, - { "contact":"2", "number":"0502030561", "name":"", "sexe":"0", "age":"10", "studies":"2", "reltype":"inconnu", "dist":"5+" }, - { "contact":"3", "number":"0502030717", "name":"", "sexe":"0", "age":"15", "studies":"3", "reltype":"inconnu", "dist":"5+" }, - { "contact":"4", "number":"0502030873", "name":"", "sexe":"0", "age":"20", "studies":"4", "reltype":"inconnu", "dist":"5+" }, - { "contact":"5", "number":"0502031029", "name":"", "sexe":"0", "age":"25", "studies":"5", "reltype":"inconnu", "dist":"5" }, - { "contact":"6", "number":"0502031185", "name":"", "sexe":"0", "age":"30", "studies":"6", "reltype":"inconnu", "dist":"15" }, - { "contact":"7", "number":"0502031341", "name":"", "sexe":"0", "age":"35", "studies":"7", "reltype":"inconnu", "dist":"15" }, - { "contact":"8", "number":"0502031497", "name":"", "sexe":"0", "age":"40", "studies":"8", "reltype":"inconnu", "dist":"15" }, - { "contact":"9", "number":"0502031653", "name":"", "sexe":"0", "age":"45", "studies":"9", "reltype":"inconnu", "dist":"5" }, - { "contact":"10", "number":"0502031809", "name":"", "sexe":"0", "age":"50", "studies":"10", "reltype":"inconnu", "dist":"5" }, - { "contact":"11", "number":"0502031965", "name":"", "sexe":"0", "age":"55", "studies":"11", "reltype":"inconnu", "dist":"15+" }, - { "contact":"12", "number":"0502032121", "name":"", "sexe":"0", "age":"60", "studies":"12", "reltype":"inconnu", "dist":"15+" }, - { "contact":"13", "number":"0502032277", "name":"", "sexe":"0", "age":"65", "studies":"13", "reltype":"inconnu", "dist":"15+" }, - { "contact":"14", "number":"0502032433", "name":"", "sexe":"0", "age":"70", "studies":"14", "reltype":"inconnu", "dist":"60+" }, - { "contact":"15", "number":"0502032589", "name":"", "sexe":"0", "age":"75", "studies":"15", "reltype":"inconnu", "dist":"60+" }, - { "contact":"16", "number":"0502032745", "name":"", "sexe":"0", "age":"80", "studies":"16", "reltype":"inconnu", "dist":"60+" }, - { "contact":"17", "number":"0502032901", "name":"", "sexe":"0", "age":"85", "studies":"17", "reltype":"inconnu", "dist":"60+" }, - { "contact":"18", "number":"0502033057", "name":"", "sexe":"0", "age":"90", "studies":"18", "reltype":"inconnu", "dist":"60+" }, - { "contact":"19", "number":"0502033213", "name":"", "sexe":"0", "age":"95", "studies":"19", "reltype":"inconnu", "dist":"5" }, - { "contact":"20", "number":"0502033369", "name":"", "sexe":"0", "age":"100", "studies":"20", "reltype":"inconnu", "dist":"5" }, - { "contact":"21", "number":"0502033525", "name":"", "sexe":"0", "age":"105", "studies":"21", "reltype":"inconnu", "dist":"5" }, - { "contact":"22", "number":"0502033681", "name":"", "sexe":"0", "age":"110", "studies":"22", "reltype":"inconnu", "dist":"5" } + { "contact":"1", "number":"0502030405", "name":"", "sexe":"0", "age":"1", "studies":"1", "reltype":"1", "dist":"0" }, + { "contact":"2", "number":"0502030561", "name":"", "sexe":"0", "age":"2", "studies":"2", "reltype":"2", "dist":"1" }, + { "contact":"3", "number":"0502030717", "name":"", "sexe":"0", "age":"3", "studies":"3", "reltype":"3", "dist":"2" }, + { "contact":"4", "number":"0502030873", "name":"", "sexe":"0", "age":"4", "studies":"4", "reltype":"4", "dist":"3" }, + { "contact":"5", "number":"0502031029", "name":"", "sexe":"0", "age":"5", "studies":"5", "reltype":"5", "dist":"4" }, + { "contact":"6", "number":"0502031185", "name":"", "sexe":"0", "age":"6", "studies":"6", "reltype":"6", "dist":"5" }, + { "contact":"7", "number":"0502031341", "name":"", "sexe":"0", "age":"7", "studies":"7", "reltype":"7", "dist":"6" }, + { "contact":"8", "number":"0502031497", "name":"", "sexe":"0", "age":"8", "studies":"8", "reltype":"8", "dist":"7" }, + { "contact":"9", "number":"0502031653", "name":"", "sexe":"0", "age":"9", "studies":"9", "reltype":"9", "dist":"8" }, + { "contact":"10", "number":"0502031809", "name":"", "sexe":"0", "age":"10", "studies":"10", "reltype":"10", "dist":"9" }, + { "contact":"11", "number":"0502031965", "name":"", "sexe":"0", "age":"11", "studies":"11", "reltype":"11", "dist":"10" }, + { "contact":"12", "number":"0502032121", "name":"", "sexe":"0", "age":"12", "studies":"12", "reltype":"12", "dist":"11" }, + { "contact":"13", "number":"0502032277", "name":"", "sexe":"0", "age":"13", "studies":"13", "reltype":"13", "dist":"12" }, + { "contact":"14", "number":"0502032433", "name":"", "sexe":"0", "age":"14", "studies":"14", "reltype":"14", "dist":"13" }, + { "contact":"15", "number":"0502032589", "name":"", "sexe":"0", "age":"15", "studies":"15", "reltype":"15", "dist":"14" }, + { "contact":"16", "number":"0502032745", "name":"", "sexe":"0", "age":"16", "studies":"16", "reltype":"16", "dist":"15" }, + { "contact":"17", "number":"0502032901", "name":"", "sexe":"0", "age":"17", "studies":"17", "reltype":"17", "dist":"16" }, + { "contact":"18", "number":"0502033057", "name":"", "sexe":"0", "age":"18", "studies":"18", "reltype":"18", "dist":"17" }, + { "contact":"19", "number":"0502033213", "name":"", "sexe":"0", "age":"19", "studies":"19", "reltype":"19", "dist":"18" }, + { "contact":"20", "number":"0502033369", "name":"", "sexe":"0", "age":"20", "studies":"20", "reltype":"20", "dist":"19" }, + { "contact":"21", "number":"0502033525", "name":"", "sexe":"0", "age":"21", "studies":"21", "reltype":"21", "dist":"20" }, + { "contact":"22", "number":"0502033681", "name":"", "sexe":"0", "age":"22", "studies":"22", "reltype":"22", "dist":"21" } ] diff --git a/doc/phone_log_dict.json b/doc/phone_log_dict.json new file mode 100644 index 0000000..9946c51 --- /dev/null +++ b/doc/phone_log_dict.json @@ -0,0 +1,47 @@ +{ + + + "call_log": { + "direction": { "0": "INCOMING", "1": "OUTCOMING", "2": "MISSED" }, + "type": { "0": "PHONE", "1": "SMS" } + + }, + + + + + "contacts": { + "sexe": { "0":"Homme", "1":"Femme" }, + "age": { + "0": "5 à 10", "1": "10 à 15", "2": "15 à 20", "3": "20 à 25", "4": "25 à 30", + "5": "30 à 35", "6": "35 à 40", "7": "40 à 45", "8": "45 à 50", "9": "50 à 55", + "10": "55 à 60", "11": "60 à 65", "12": "65 à 70", "13": "70 à 75", "14": "75 à 80", + "15": "80 à 85", "16": "85 à 90", "17": "90 à 95", "18": "95 à 100" + }, + "studies": { + + }, + + "reltype": { + "0": "Père, mère ou équivalent", + "1": "Frère ou soeur", + "2": "Autre membre de la famille", + "3": "Relation amoureuse", + "4": "Collègue", + "5": "Voisin", + "6": "Ami", + "7": "Ami proche", + "8": "Relation de service (médecin, ...)", + "9": "Inconnu" + }, + + "dist": { + "0": "- de 5 minutes", + "1": "de 5 à 15 minutes", + "2": "de 15 à 60 minutes", + "3": "+ d'une heure" + } + + } + +}