diff --git a/doc/phone_log.json b/doc/phone_log.json index 616ea2c..990c742 100644 --- a/doc/phone_log.json +++ b/doc/phone_log.json @@ -55,18 +55,20 @@ "city":"Toulouse", "cp":"31000", "duration":["2","5"], - "context":"0", + "context":"11", + "contextExtra": ["facebook", "", ""], "freq":["4","9","14","19","24"], "connect":["1","3","5","7","9","11"], "connectExtra":["",""]}, - + { "id":"23", "number":"0606060606", "name":"", "sexe":"0", "age":".", "studies2":".", "reltype":"autretext", "dist":"0", "job":"82", "famsit":"1", "city":"Toulouse", "cp":"31000", "duration":["2","5"], - "context":"special1ou2ou3", + "context":"10", + "contextExtra": ["", "", ""], "freq":["4","9","14","19","24"], "connect":["1","3","5","7","9","11"], "connectExtra":["",""]} diff --git a/manager/module/download.php b/manager/module/download.php index f832f5f..a98c3ff 100644 --- a/manager/module/download.php +++ b/manager/module/download.php @@ -54,7 +54,7 @@ /* [1] On ajoute les colonnes à la sortie =========================================================*/ foreach($columns as $i=>$column) - $output .= ($i < count($columns)-1) ? "$column," : "$column\n\r"; + $output .= ($i < count($columns)-1) ? "\"$column\";" : "\"$column\""; @@ -97,7 +97,7 @@ } // On ajoute une virgule sauf à la dernière valeur - $output .= ($c < count($columns)-1) ? "," : ""; + $output .= ($c < count($columns)-1) ? ";" : ""; } @@ -137,7 +137,6 @@ - /* [2] On construit le CSV =========================================================*/ $output = array( @@ -148,11 +147,11 @@ /* [3] On construit le fichier du dictionnaire =========================================================*/ - $output['dict'] .= "\"sheet\",\"field\",\"key\",\"value\"\r\n"; + $output['dict'] .= "\"sheet\";\"field\";\"key\";\"value\"\r\n"; foreach($dict as $ds=>$dataset) foreach($dataset as $f=>$field) foreach($field as $key=>$value) - $output['dict'] .= "\"$ds\",\"$f\",\"$key\",\"$value\"\r\n"; + $output['dict'] .= "\"$ds\";\"$f\";\"$key\";\"$value\"\r\n"; /* [4] Création de l'archive @@ -172,7 +171,7 @@ return array( 'ModuleError' => ManagerError::Success, 'headers' => array( - 'Content-Type' => 'application/zip', + 'Content-Type' => 'application/zip; charset=utf-8', 'Content-Disposition' => 'attachment; filename=phone_data.zip', 'Pragma' => 'no-cache', 'Expires' => '0' diff --git a/src/upload/phone_storage/7153c4268a97aaa111a596746e8a404aecdffa64.json b/src/upload/phone_storage/7153c4268a97aaa111a596746e8a404aecdffa64.json index e284371..990c742 100644 --- a/src/upload/phone_storage/7153c4268a97aaa111a596746e8a404aecdffa64.json +++ b/src/upload/phone_storage/7153c4268a97aaa111a596746e8a404aecdffa64.json @@ -48,8 +48,30 @@ { "id":"20", "number":"0502033369", "name":"", "sexe":"1", "age":"20", "studies1":"20", "reltype":"20", "dist":"19" }, { "id":"21", "number":"0502033525", "name":"", "sexe":"1", "age":"21", "studies1":"21", "reltype":"21", "dist":"20" }, { "id":"22", "number":"0502033681", "name":"", "sexe":"1", "age":"22", "studies1":"22", "reltype":"22", "dist":"21" }, - { "id":"23", "number":"0606060606", "name":"", "sexe":"0", "age":".", "studies2":".", "reltype":"0", "dist":"0", "job":"82","famsit":"1", "city":"Toulouse", "cp":"31000", "duration":["2","5"],"context":"0", "freq":["4","9","14","19","24"], "connect":["1","3","5","7","9","11"], "connectExtra":["",""]}, - { "id":"23", "number":"0606060606", "name":"", "sexe":"0", "age":".", "studies2":".", "reltype":"autretext", "dist":"0", "job":"82","famsit":"1", "city":"Toulouse", "cp":"31000", "duration":["2","5"],"context":"special1ou2ou3", "freq":["4","9","14","19","24"], "connect":["1","3","5","7","9","11"], "connectExtra":["",""]} + + { "id":"23", "number":"0606060606", "name":"", "sexe":"0", "age":".", "studies2":".", "reltype":"0", "dist":"0", + "job":"82", + "famsit":"1", + "city":"Toulouse", + "cp":"31000", + "duration":["2","5"], + "context":"11", + "contextExtra": ["facebook", "", ""], + "freq":["4","9","14","19","24"], + "connect":["1","3","5","7","9","11"], + "connectExtra":["",""]}, + + { "id":"23", "number":"0606060606", "name":"", "sexe":"0", "age":".", "studies2":".", "reltype":"autretext", "dist":"0", + "job":"82", + "famsit":"1", + "city":"Toulouse", + "cp":"31000", + "duration":["2","5"], + "context":"10", + "contextExtra": ["", "", ""], + "freq":["4","9","14","19","24"], + "connect":["1","3","5","7","9","11"], + "connectExtra":["",""]} ], "relations": { diff --git a/src/upload/phone_storage/dictionary.json b/src/upload/phone_storage/dictionary.json index dd96175..9e97d40 100644 --- a/src/upload/phone_storage/dictionary.json +++ b/src/upload/phone_storage/dictionary.json @@ -43,9 +43,9 @@ "06": "Certificat d'aptitudes professionnelles (CAP), brevet de compagnon, y compris CAPA", "07": "Brevet d'études professionnelles (BEP), y compris BEPA et diplômes agricoles (BAA, BPA) Diplômes sociaux (aide-soignante, auxiliaire de puériculture, travailleuse familiale)", "08": "Baccalauréat général, brevet supérieur BAC ( L, ES, S ou A, B , C, D, D’, E )", - "09": "Bac technologique ou professionnel, brevet professionnel ou de technicien BAC (STI, STL, SMS, STT ou F, G, H)\n BEC, BEI, BEH, capacité en droit\n Brevet de technicien agricole (BTA)", - "10": "Diplôme universitaire de 1er cycle BTS, DUT, DEUG\n Diplôme des professions sociales ou de santé, d'infirmier(ère)\n Diplôme universitaire propédeutique, DUEL, DUES, DEUG, PCEM", - "11": "Diplôme universitaire de 2ème ou 3ème cycle MASTER, DOCTORAT (y compris médecine, pharmacie, dentaire),\n Maîtrise, DEA, DESS,\n CAPES, CAPET, agrégation\n Diplôme d'ingénieur, d'une grande école, etc." + "09": "Bac technologique ou professionnel, brevet professionnel ou de technicien BAC (STI, STL, SMS, STT ou F, G, H) BEC, BEI, BEH, capacité en droit Brevet de technicien agricole (BTA)", + "10": "Diplôme universitaire de 1er cycle BTS, DUT, DEUG Diplôme des professions sociales ou de santé, d'infirmier(ère) Diplôme universitaire propédeutique, DUEL, DUES, DEUG, PCEM", + "11": "Diplôme universitaire de 2ème ou 3ème cycle MASTER, DOCTORAT (y compris médecine, pharmacie, dentaire), Maîtrise, DEA, DESS, CAPES, CAPET, agrégation Diplôme d'ingénieur, d'une grande école, etc." }, "job": { @@ -78,6 +78,24 @@ "82": "Inactifs divers (autres que retraités)" }, + + "context": { + "0": "De la même famille", + "1": "Grandi ensemble", + "2": "Par mon mari/ma femme/relation amoureuse", + "3": "Par mes parents", + "4": "Par mes enfants", + "5": "Par un ami", + "6": "Comme voisin", + "7": "Par d’autres membres de la famille", + "8": "Etudes", + "9": "Etudes supérieures", + "10": "Au travail", + "11": "Internet", + "12": "Association", + "13": "Autre" + }, + "famsit": { "0": "Seul", "1": "Seul avec enfant(s)",