diff --git a/.gitignore b/.gitignore index b547abd..733bf17 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ sftp-config.json phpunit/coverage/ */tmp/* -/build/lightdb/storage/*/data +#/build/lightdb/storage/*/data diff --git a/build/api/module/input.php b/build/api/module/input.php index 2be0ad2..ad8bc5b 100644 --- a/build/api/module/input.php +++ b/build/api/module/input.php @@ -72,7 +72,11 @@ if( !isset($subject_set['relations']) ) $subject_set['relations'] = []; - /* (4) On récupère les noms des contacts */ + /* (4) Ajout de l'enquête */ + if( !in_array('phone', $subject_set['subject']['surveys']) ) + $subject_set['subject']['surveys'][] = 'phone'; + + /* (5) On récupère les noms des contacts */ $contactsById = []; // idContact -> nomContact foreach($subject_set['contacts'] as $contactId){ @@ -282,14 +286,14 @@ /* [6] On les données du sujet =========================================================*/ + $subjectdb->delete($subject_id); $subjectdb->insert($subject_id, $subject_set); - /* [7] On enregistre les données des contacts + /* [7] Ferme les bases de données =========================================================*/ - /* (1) On enregistre chaque contact */ - foreach($file['contacts'] as $c=>$contactData) - $contactdb->insert($contactData['id'], $contactData); + $subjectdb->close(); + $contactdb->close(); /* [7] On met à jour le nouvel ID unique @@ -300,7 +304,6 @@ fclose($funiq); - /* [9] Gestion du retour =========================================================*/ return [ @@ -662,10 +665,10 @@ * @return subject_id Retourne l'id sujet de l'enquête * */ - public static function xfacebook($params){ + public static function facebook($params){ extract($params); - /* [0] On récupère l'id unique actuel + /* [1] On récupère l'id unique actuel =========================================================*/ $funiq = fopen( __BUILD__.'/lightdb/storage/uniqid', 'r+' ); flock($funiq, LOCK_EX); // On verrouille le fichier @@ -678,154 +681,104 @@ $offset = intval($uniqid) + 1; // on enregistre l'id du sujet - $subject_id = $subject['subject_id']; + $subject_id = intval($subject['subject_id']); // Contiendra la valeur de l'id maximum $maxId = $offset; - - - // /* [1] On récupère les logs s'ils existent - // =========================================================*/ - // // Contiendra le contenu du fichier + /* [2] On initialise nos variables (lightdb + autres) + =========================================================*/ + /* (1) Fichiers de sortie */ $file = [ "subject" => "", - "contacts" => [], "relations" => [] ]; + /* (2) Bases de données */ + $subjectdb = new lightdb('subject'); + $contactdb = new lightdb('contact'); - - - - - /* [2] On enregistre les données du sujet + /* [3] Données du sujet =========================================================*/ - /* (1) On crée le sujet */ - $file['subject'] = [ 'id' => $subject_id ]; + $subject_set = $subjectdb->fetch($subject_id); - /* (2) On récupère ses contacts phone */ - // {2.1} On récupère les données du sujet // - $lphone = new lightdb('phone_db'); - $lphone = $lphone->fetch($subject_id); + /* (1) Si le sujet n'existe pas -> ERROR */ + if( $subject_set === false ) + return ['ModuleError'=>ManagerError::UnreachableResource]; - // {2.2} si n'existe pas, on a un tableau vide // - if( $lphone === false ) - $lphone = [ 'contacts' => [] ]; + /* (2) Initialisation des contacts si vide */ + if( !isset($subject_set['contacts']) ) + $subject_set['contacts'] = []; - if( !isset($lphone['contacts']) ) - $lphone['contacts'] = []; + /* (3) Initialisation des relations si vide */ + if( !isset($subject_set['relations']) ) + $subject_set['relations'] = []; + + /* (4) Ajout de l'enquête */ + if( !in_array('facebook', $subject_set['surveys']) ) + $subject_set['surveys'][] = 'facebook'; + + /* (5) On récupère les noms des contacts */ + $contactsById = []; // idContact -> nomContact + + foreach($subject_set['contacts'] as $contactId){ + $contactId = intval($contactId); + $contactData = $contactdb->fetch( $contactId ); + + $contactsById[$contactId] = $contactData['name']; + } - /* (3) On récupère ses contacts lab-surveys */ - // {3.1} On récupère les données du sujet // - $lsurvey = new lightdb('survey_db'); - $lsurvey = $lsurvey->fetch($subject_id); - - // {3.2} si n'existe pas, on a un tableau vide // - if( $lsurvey === false ) - $lsurvey = [ 'contacts' => [] ]; - - if( !isset($lsurvey['contacts']) ) - $lsurvey['contacts'] = []; - - - /* (4) On récupère uniquement la liste des contacts avec le type de fiche qu'ils ont */ - // {4.1} Contiendra les contacts exportés // - $exported = [ - 'fiche' => [], - 'mini' => [] - ]; - - // {4.2} Contiendra les username des contacts exportés // - $exportedU = []; - - // {4.3} On récupère les contacts facebook // - foreach($lphone['contacts'] as $c=>$data){ - - if( isset($data['studies2']) ){ - - $exported['fiche'][] = $data['id']; - $exportedU[$data['id']] = $data['name']; - - }else - - // S'il n'est pas déja dans les fiches - if( !in_array($data['id'], $exported['fiche']) ){ - - $exported['mini'][] = $data['id']; - $exportedU[$data['id']] = $data['name']; - } - - } - - // {4.4} On récupère les contacts lab-surveys // - foreach($lsurvey['contacts'] as $c=>$data){ - - if( isset($data['studies2']) ) - - // On ajoute le contact s'il n'y est pas déja - if( !in_array($data['id'], $exported['fiche']) ){ - - $exported['fiche'][] = $data['id']; - $exportedU['fiche'][] = $data['username']; - - } - - else - - // On ajoute le contact s'il n'y est pas déja (ni dans mini ni dans fiche) - if( !in_array($data['id'], $exported['mini']) && !in_array($data['id'], $exported['fiche']) ){ - $exported['mini'][] = $data['id']; - $exportedU['mini'][] = $data['username']; - } - } - - - - - - - /* [3] On enregistre les contacts des FICHES + /* [4] On saisit les fiches + les contacts des fiches =========================================================*/ $contactsDone = [ "existing" => [], // Contacts exportés déja enregistrés "username" => [] // Nouveaux contacts déja enregistrés ]; - + $finalid = []; // id_contact -> id_final_contact (existant ou nouveau) foreach($fiches as $f=>$ficheData){ /* (1) On récupère les données du contact associé */ - if( !isset($contacts[$ficheData['uid']]) ) - continue; + if( !isset($contacts[$ficheData['contact']]) ) + break; - $contact = $contacts[ $ficheData['uid'] ]; + $contact = $contacts[ $ficheData['contact'] ]; /* (2) Si le contact a été importé d'une autre enquête */ if( isset($contact['existing']) && is_numeric($contact['existing']) ){ + $newId = (int) $contact['existing']; - $uname = $exportedU[intval($contact['existing'])]; - // {2.1} S'il a déja une fiche ou qu'on a déja fait une fiche, on quitte // - if( in_array(intval($contact['existing']), $exported['fiche']) || in_array($contact['existing'], $contactsDone['existing']) ) - continue; + $uname = $contactsById[ intval($contact['existing']) ]; + + $existingData = $dbcontact->fetch( intval($contact['existing']) ); + + $finalid[ intval($contact['uid']) ] = $newId; + + // S'il a déja une fiche ou qu'on a déja fait une fiche, on quitte + if( is_array($existingData) && isset($existingData['studies2']) || in_array($contact['existing'], $contactsDone['existing']) ) + break; /* (3) Si nouveau contact */ }else{ - $newId = (int) ($offset+$ficheData['uid']); + + $newId = (int) ($offset+$contact['uid']); $uname = $contact['username']; - // {3.1} S'il a déja été saisi, on quitte // + + $finalid[ intval($contact['uid']) ] = $newId; + + // S'il a déja été saisi, on quitte if( in_array($contact['username'], $contactsDone['username']) ) - continue; + break; } /* (4) Update du @maxId */ if( $newId > $maxId ) $maxId = (int) $newId; - // On remplit les données qui iront dans le fichier pour ce contact - $file['contacts'][] = [ + /* (5) On enregistre les données du contact */ + $contactdb->insert($newId, [ 'id' => $newId, 'name' => $uname, 'sexe' => $ficheData['sexe'], @@ -844,13 +797,17 @@ 'freq' => $ficheData['freq'], 'connect' => $ficheData['connect'], 'connectExtra' => $ficheData['connectSpecial'] - ]; + ] ); + + // On ajoute le contact dans la liste des contacts du sujet (si pas déja) + if( !in_array($newId, $subject_set['contacts']) ) + $subject_set['contacts'][] = $newId; // On enregistre la relation avec EGO - $file['relations'][] = [ + $subject_set['relations'][] = [ 'idA' => $subject_id, 'idB' => $newId, - 'type' => ($f<20) ? 4 : 5 // 4->appels 5->sms + 'type' => ($f<20) ? 6 : 7 // 6->historique 7->messenger ]; @@ -863,32 +820,40 @@ } - /* [4] On enregistre les contacts des MINI + /* [5] On enregistre les mini + les contacts des mini =========================================================*/ foreach($mini as $miniData){ /* (1) On récupère les données du contact associé */ - if( !isset($contacts[$miniData['uid']]) ) - continue; + if( !isset($contacts[$miniData['contact']]) ) + break; - $contact = $contacts[ $miniData['uid'] ]; + $contact = $contacts[ $miniData['contact'] ]; /* (2) Si le contact a été importé d'une autre enquête */ if( isset($contact['existing']) && is_numeric($contact['existing']) ){ - $newId = (int) $contact['existing']; - $uname = $exportedU[intval($contact['existing'])]; - // {2.1} S'il a déja une fiche ou qu'on a déja fait une fiche (ou mini), on quitte // - if( in_array(intval($contact['existing']), $exported['fiche']) || in_array($contact['existing'], $contactsDone['existing']) ) - continue; + $newId = (int) $contact['existing']; + $uname = $contactsById[ intval($contact['existing']) ]; + + $existingData = $dbcontact->fetch( intval($contact['existing']) ); + + $finalid[ intval($contact['uid']) ] = $newId; + + // S'il a déja une fiche ou qu'on a déja fait une fiche (ou mini), on quitte + if( is_array($existingData) && isset($existingData['studies2']) || in_array($contact['existing'], $contactsDone['existing']) ) + break; /* (3) Si nouveau contact */ }else{ + $newId = (int) ($offset+$miniData['uid']); $uname = $contact['username']; - // {3.1} S'il a déja été saisi, on quitte // - if( in_array($contact['username'], $contactsDone['username']) ) - continue; + $finalid[ intval($contact['uid']) ] = $newId; + + // S'il a déja été saisi, on quitte + if( in_array($contact['username'], $contactsDone['username']) ) + break; } /* (4) Update du @maxId */ @@ -897,7 +862,7 @@ // On remplit les données qui iront dans le fichier pour ce contact - $file['contacts'][] = [ + $contactdb->insert($newId, [ 'id' => $newId, 'name' => $uname, 'sexe' => $miniData['sexe'], @@ -905,13 +870,17 @@ 'studies1' => $miniData['studies'], 'reltype' => ($miniData['reltype']==10) ? $miniData['reltypeSpecial'] : $miniData['reltype'], // si 'autre' -> valeur, sinon le code 'dist' => $miniData['loc'] - ]; + ] ); + + // On ajoute le contact dans la liste des contacts du sujet (si pas déja) + if( !in_array($newId, $subject_set['contacts']) ) + $subject_set['contacts'][] = $newId; // On enregistre la relation avec EGO - $file['relations'][] = [ + $subject_set['relations'][] = [ 'idA' => $subject_id, 'idB' => $newId, - 'type' => 2 // relation cellulaire mineure + 'type' => 3 // relation facebook mineure ]; @@ -925,16 +894,14 @@ } - - /* [5] On enregistre les relations de la MATRICE + /* [6] On enregistre les relations de la MATRICE =========================================================*/ - $clen = count($file['contacts']); - // var_dump($file['contacts']); + $clen = count($finalid); /* (1) On récupére les ids des contacts */ $cIdList = []; - foreach($file['contacts'] as $c=>$contact){ - $id = (int) $c; + foreach($finalid as $lastid=>$newid){ + $id = (int) $lastid; if( !in_array($id, $cIdList) ) $cIdList[$id] = null; @@ -942,22 +909,18 @@ ksort($cIdList); - /* (2) On remplit les relations */ foreach($cIdList as $y=>$yNull){ foreach($cIdList as $x=>$xNull) if( $x < $y ){ // On affiche que sous la diagonale - $idY = $file['contacts'][$y]['id'] - $offset; - $idX = $file['contacts'][$x]['id'] - $offset; - // Si relation alter-alter $relationXY = isset($matrice[$y]) && in_array($x, $matrice[$y]) || ( isset($matrice[$x]) && in_array($y, $matrice[$x]) ); - $file['relations'][] = [ - 'idA' => $offset + $x, - 'idB' => $offset + $y, + $subject_set['relations'][] = [ + 'idA' => $finalid[$x], + 'idB' => $finalid[$y], 'type' => $relationXY ? 1 : 0 // 0->aucune relation 1->relation alter alter ]; @@ -965,25 +928,25 @@ } - /* [6] On enregistre tout dans 'lightdb' + /* [6] On les données du sujet =========================================================*/ - $db = new lightdb('facebook_db'); - $db->insert( $subject_id, $file ); - $db->close(); + $subjectdb->insert($subject_id, $subject_set); + + + /* [7] On enregistre les données des contacts + =========================================================*/ + /* (1) On enregistre chaque contact */ + foreach($file['contacts'] as $c=>$contactData) + $contactdb->insert($contactData['id'], $contactData); + /* [7] On met à jour le nouvel ID unique =========================================================*/ - // $maxId += $offset; rewind($funiq); // On revient au début du fichier fwrite($funiq, $maxId); // On écrit la nouvelle valeur (forcément plus grande) flock($funiq, LOCK_UN); // On débloque le verrou fclose($funiq); - // /* [8] On supprime le fichier temporaire si existe - // =========================================================*/ - // if( file_exists($tmpfile) ) - // unlink($tmpfile); - /* [9] Gestion du retour =========================================================*/ diff --git a/build/api/module/subject.php b/build/api/module/subject.php index a1b6b26..a79fc0b 100644 --- a/build/api/module/subject.php +++ b/build/api/module/subject.php @@ -38,7 +38,7 @@ /* [1] On récupére la liste des sujets =========================================================*/ /* (1) On initialise et ouvre la bd */ - $db = new lightdb('survey_db'); + $db = new lightdb('subject'); $ids = array_keys( $db->index() ); /* (2) On récupère tous les sujets */ @@ -47,37 +47,18 @@ $sub['creation'] = date('d/m/Y H:i:s', $sub['creation']); $subjects[$id] = $sub; - } - $db->close(); - - /* [2] On récupére la liste des sujets pour PHONE - =========================================================*/ - /* (1) On initialise et ouvre la bd */ - $db = new lightdb('phone_db'); - $ids = array_keys( $db->index() ); - $db->close(); - - /* (2) Si un des sujets de 'survey' est dans PHONE, on ajoute la mention */ - foreach($subjects as $id=>$data) - if( in_array($id, $ids) ) // Si dans phone + /* (3) Si enquête PHONE passée */ + if( isset($sub['surveys']) && is_array($sub['surveys']) && in_array('phone', $sub['surveys']) ) $subjects[$id]['phone'] = true; - - - - /* [3] On récupére la liste des sujets pour FACEBOOK - =========================================================*/ - /* (1) On initialise et ouvre la bd */ - $db = new lightdb('facebook_db'); - $ids = array_keys( $db->index() ); - $db->close(); - - /* (2) Si un des sujets de 'survey' est dans FACBEOOK, on ajoute la mention */ - foreach($subjects as $id=>$data) - if( in_array($id, $ids) ) // Si dans facebook + /* (4) Si enquête FACEBOOK passée */ + if( isset($sub['surveys']) && is_array($sub['surveys']) && in_array('facebook', $sub['surveys']) ) $subjects[$id]['facebook'] = true; + } + $db->close(); + /* [4] Gestion du retour =========================================================*/ @@ -189,7 +170,8 @@ $data = [ 'subject' => [ 'id' => $newId, 'name' => $name, - 'creation' => time() + 'creation' => time(), + 'surveys' => [] ]]; /* [2] On crée le sujet dans SURVEYS @@ -256,7 +238,7 @@ /* [1] On récupére la liste des sujets =========================================================*/ /* (1) On initialise et ouvre la bd */ - $db = new lightdb('survey_db'); + $db = new lightdb('subject'); $ids = array_keys( $db->index() ); /* (2) On récupère tous les sujets */ @@ -266,41 +248,18 @@ $sub['creation'] = date('d/m/Y H:i:s', $sub['creation']); $subjects[$id] = $sub; + + /* (3) Si enquête PHONE passée */ + if( isset($sub['surveys']) && is_array($sub['surveys']) && in_array('phone', $sub['surveys']) ) + $subjects[$id]['phone'] = true; + + /* (4) Si enquête FACEBOOK passée */ + if( isset($sub['surveys']) && is_array($sub['surveys']) && in_array('facebook', $sub['surveys']) ) + $subjects[$id]['facebook'] = true; } } $db->close(); - - /* [2] On récupére la liste des sujets pour PHONE - =========================================================*/ - /* (1) On initialise et ouvre la bd */ - $db = new lightdb('phone_db'); - $ids = array_keys( $db->index() ); - $db->close(); - - /* (2) Si un des sujets de 'survey' est dans PHONE, on ajoute la mention */ - foreach($subjects as $id=>$data) - if( in_array($id, $ids) ) // Si dans phone - $subjects[$id]['phone'] = true; - - - - - /* [3] On récupére la liste des sujets pour FACEBOOK - =========================================================*/ - /* (1) On initialise et ouvre la bd */ - $db = new lightdb('facebook_db'); - $ids = array_keys( $db->index() ); - $db->close(); - - /* (2) Si un des sujets de 'survey' est dans FACBEOOK, on ajoute la mention */ - foreach($subjects as $id=>$data) - if( in_array($id, $ids) ) // Si dans facebook - $subjects[$id]['facebook'] = true; - - - - /* [4] Retour des données =========================================================*/ return [ diff --git a/build/lightdb/storage/contact/data b/build/lightdb/storage/contact/data new file mode 100644 index 0000000..e69de29 diff --git a/build/lightdb/storage/contact/index b/build/lightdb/storage/contact/index index 0637a08..fe51488 100644 --- a/build/lightdb/storage/contact/index +++ b/build/lightdb/storage/contact/index @@ -1 +1 @@ -[] \ No newline at end of file +[] diff --git a/build/lightdb/storage/facebook_db/data b/build/lightdb/storage/facebook_db/data index 1920a69..e69de29 100644 --- a/build/lightdb/storage/facebook_db/data +++ b/build/lightdb/storage/facebook_db/data @@ -1,2 +0,0 @@ -{"subject":{"id":"1"},"contacts":[{"id":1,"name":"Ismael","sexe":"0","age":"0","studies2":"0","reltype":"0","dist":"0","job":"10","famsit":"0","city":"10","cp":"10000","quartier":"0","duration":["0","10"],"context":"0","contextExtra":["","",""],"freq":["2","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":2,"name":"Rosa","sexe":"1","age":"1","studies2":"01","reltype":"1","dist":"1","job":"21","famsit":"0","city":"11","cp":"10001","quartier":"1","duration":["1","11"],"context":"1","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":3,"name":"Judith","sexe":"2","age":"2","studies2":"02","reltype":"2","dist":"2","job":"22","famsit":"0","city":"12","cp":"10002","quartier":"2","duration":["2","12"],"context":"2","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":4,"name":"Alex","sexe":"0","age":"3","studies2":"03","reltype":"3","dist":"3","job":"23","famsit":"0","city":"13","cp":"10003","quartier":"3","duration":["3","13"],"context":"3","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":5,"name":"Adri","sexe":"1","age":"4","studies2":"04","reltype":"4","dist":"0","job":"31","famsit":"0","city":"14","cp":"10004","quartier":"4","duration":["4","14"],"context":"4","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":6,"name":"Fred","sexe":"2","age":"5","studies2":"05","reltype":"5","dist":"1","job":"32","famsit":"0","city":"15","cp":"10005","quartier":"5","duration":["5","15"],"context":"5","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":7,"name":"Shanone","sexe":"0","age":"6","studies2":"06","reltype":"6","dist":"2","job":"36","famsit":"0","city":"16","cp":"10006","quartier":"6","duration":["6","16"],"context":"6","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":8,"name":"Manon","sexe":"1","age":"7","studies2":"07","reltype":"7","dist":"3","job":"41","famsit":"0","city":"17","cp":"10007","quartier":"7","duration":["7","17"],"context":"7","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":9,"name":"Java","sexe":"2","age":"8","studies2":"08","reltype":"autre","dist":"0","job":"46","famsit":"0","city":"18","cp":"10008","quartier":"8","duration":["8","18"],"context":"8","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":10,"name":"Thalees","sexe":"0","age":"9","studies2":"09","reltype":"0","dist":"1","job":"47","famsit":"0","city":"19","cp":"10009","quartier":"9","duration":["9","19"],"context":"9","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":11,"name":"Cr\u00e8me","sexe":"1","age":"10","studies2":"10","reltype":"1","dist":"2","job":"48","famsit":"0","city":"20","cp":"10010","quartier":"10","duration":["10","110"],"context":"10","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":12,"name":"Margaux","sexe":"2","age":"11","studies2":"11","reltype":"2","dist":"3","job":"51","famsit":"0","city":"21","cp":"10011","quartier":"11","duration":["11","111"],"context":"11","contextExtra":["internet","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":13,"name":"Anthony","sexe":"0","age":"12","studies2":"","reltype":"3","dist":"0","job":"54","famsit":"0","city":"22","cp":"10012","quartier":"12","duration":["12","112"],"context":"12","contextExtra":["","association",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":14,"name":"Lino","sexe":"1","age":"13","studies2":"01","reltype":"4","dist":"1","job":"55","famsit":"0","city":"23","cp":"10013","quartier":"13","duration":["13","113"],"context":"13","contextExtra":["","","autre"],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]}],"relations":[{"idA":"1","idB":1,"type":6},{"idA":"1","idB":2,"type":6},{"idA":"1","idB":3,"type":6},{"idA":"1","idB":4,"type":6},{"idA":"1","idB":5,"type":6},{"idA":"1","idB":6,"type":6},{"idA":"1","idB":7,"type":6},{"idA":"1","idB":8,"type":6},{"idA":"1","idB":9,"type":6},{"idA":"1","idB":10,"type":6},{"idA":"1","idB":11,"type":7},{"idA":"1","idB":12,"type":7},{"idA":"1","idB":13,"type":7},{"idA":"1","idB":14,"type":7},{"idA":2,"idB":1,"type":0},{"idA":3,"idB":1,"type":0},{"idA":3,"idB":2,"type":0},{"idA":4,"idB":1,"type":0},{"idA":4,"idB":2,"type":0},{"idA":4,"idB":3,"type":0},{"idA":5,"idB":1,"type":0},{"idA":5,"idB":2,"type":0},{"idA":5,"idB":3,"type":0},{"idA":5,"idB":4,"type":0},{"idA":6,"idB":1,"type":0},{"idA":6,"idB":2,"type":0},{"idA":6,"idB":3,"type":0},{"idA":6,"idB":4,"type":0},{"idA":6,"idB":5,"type":0},{"idA":7,"idB":1,"type":0},{"idA":7,"idB":2,"type":0},{"idA":7,"idB":3,"type":0},{"idA":7,"idB":4,"type":0},{"idA":7,"idB":5,"type":0},{"idA":7,"idB":6,"type":0},{"idA":8,"idB":1,"type":0},{"idA":8,"idB":2,"type":0},{"idA":8,"idB":3,"type":0},{"idA":8,"idB":4,"type":0},{"idA":8,"idB":5,"type":0},{"idA":8,"idB":6,"type":0},{"idA":8,"idB":7,"type":0},{"idA":9,"idB":1,"type":0},{"idA":9,"idB":2,"type":0},{"idA":9,"idB":3,"type":0},{"idA":9,"idB":4,"type":0},{"idA":9,"idB":5,"type":0},{"idA":9,"idB":6,"type":0},{"idA":9,"idB":7,"type":0},{"idA":9,"idB":8,"type":0},{"idA":10,"idB":1,"type":0},{"idA":10,"idB":2,"type":0},{"idA":10,"idB":3,"type":0},{"idA":10,"idB":4,"type":0},{"idA":10,"idB":5,"type":0},{"idA":10,"idB":6,"type":0},{"idA":10,"idB":7,"type":0},{"idA":10,"idB":8,"type":0},{"idA":10,"idB":9,"type":0},{"idA":11,"idB":1,"type":0},{"idA":11,"idB":2,"type":0},{"idA":11,"idB":3,"type":0},{"idA":11,"idB":4,"type":0},{"idA":11,"idB":5,"type":0},{"idA":11,"idB":6,"type":0},{"idA":11,"idB":7,"type":0},{"idA":11,"idB":8,"type":0},{"idA":11,"idB":9,"type":0},{"idA":11,"idB":10,"type":0},{"idA":12,"idB":1,"type":0},{"idA":12,"idB":2,"type":0},{"idA":12,"idB":3,"type":0},{"idA":12,"idB":4,"type":0},{"idA":12,"idB":5,"type":0},{"idA":12,"idB":6,"type":0},{"idA":12,"idB":7,"type":0},{"idA":12,"idB":8,"type":0},{"idA":12,"idB":9,"type":0},{"idA":12,"idB":10,"type":0},{"idA":12,"idB":11,"type":0},{"idA":13,"idB":1,"type":0},{"idA":13,"idB":2,"type":0},{"idA":13,"idB":3,"type":0},{"idA":13,"idB":4,"type":0},{"idA":13,"idB":5,"type":0},{"idA":13,"idB":6,"type":0},{"idA":13,"idB":7,"type":0},{"idA":13,"idB":8,"type":0},{"idA":13,"idB":9,"type":0},{"idA":13,"idB":10,"type":0},{"idA":13,"idB":11,"type":0},{"idA":13,"idB":12,"type":0},{"idA":14,"idB":1,"type":0},{"idA":14,"idB":2,"type":0},{"idA":14,"idB":3,"type":0},{"idA":14,"idB":4,"type":0},{"idA":14,"idB":5,"type":0},{"idA":14,"idB":6,"type":0},{"idA":14,"idB":7,"type":0},{"idA":14,"idB":8,"type":0},{"idA":14,"idB":9,"type":0},{"idA":14,"idB":10,"type":0},{"idA":14,"idB":11,"type":0},{"idA":14,"idB":12,"type":0},{"idA":14,"idB":13,"type":0}]} -{"subject":{"id":"3"},"contacts":[{"id":1032,"name":"","sexe":"1","age":"6","studies2":"01","reltype":"7","dist":"1","job":"82","famsit":"0","city":"35","cp":"10025","quartier":"25","duration":["25","125"],"context":"11","contextExtra":["internet","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1033,"name":"contact-1","sexe":"0","age":"6","studies2":"06","reltype":"6","dist":"2","job":"36","famsit":"0","city":"16","cp":"10006","quartier":"6","duration":["6","16"],"context":"6","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1034,"name":"contact-2","sexe":"1","age":"7","studies2":"07","reltype":"7","dist":"3","job":"41","famsit":"0","city":"17","cp":"10007","quartier":"7","duration":["7","17"],"context":"7","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1035,"name":"contact-3","sexe":"2","age":"8","studies2":"08","reltype":"autre","dist":"0","job":"46","famsit":"0","city":"18","cp":"10008","quartier":"8","duration":["8","18"],"context":"8","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1036,"name":"contact-4","sexe":"0","age":"9","studies2":"09","reltype":"0","dist":"1","job":"47","famsit":"0","city":"19","cp":"10009","quartier":"9","duration":["9","19"],"context":"9","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1037,"name":"contact-5","sexe":"1","age":"10","studies2":"10","reltype":"1","dist":"2","job":"48","famsit":"0","city":"20","cp":"10010","quartier":"10","duration":["10","110"],"context":"10","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1038,"name":"contact-6","sexe":"2","age":"11","studies2":"11","reltype":"2","dist":"3","job":"51","famsit":"0","city":"21","cp":"10011","quartier":"11","duration":["11","111"],"context":"11","contextExtra":["internet","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1039,"name":"contact-7","sexe":"0","age":"12","studies2":"","reltype":"3","dist":"0","job":"54","famsit":"0","city":"22","cp":"10012","quartier":"12","duration":["12","112"],"context":"12","contextExtra":["","association",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1040,"name":"contact-8","sexe":"1","age":"13","studies2":"01","reltype":"4","dist":"1","job":"55","famsit":"0","city":"23","cp":"10013","quartier":"13","duration":["13","113"],"context":"13","contextExtra":["","","autre"],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1041,"name":"contact-9","sexe":"2","age":"14","studies2":"02","reltype":"5","dist":"2","job":"56","famsit":"0","city":"24","cp":"10014","quartier":"14","duration":["14","114"],"context":"0","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1042,"name":"contact-10","sexe":"0","age":"15","studies2":"03","reltype":"6","dist":"3","job":"61","famsit":"0","city":"25","cp":"10015","quartier":"15","duration":["15","115"],"context":"1","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1043,"name":"contact-11","sexe":"1","age":"16","studies2":"04","reltype":"7","dist":"0","job":"66","famsit":"0","city":"26","cp":"10016","quartier":"16","duration":["16","116"],"context":"2","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1044,"name":"contact-12","sexe":"2","age":"17","studies2":"05","reltype":"autre","dist":"1","job":"69","famsit":"0","city":"27","cp":"10017","quartier":"17","duration":["17","117"],"context":"3","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1045,"name":"contact-13","sexe":"0","age":"18","studies2":"06","reltype":"0","dist":"2","job":"71","famsit":"0","city":"28","cp":"10018","quartier":"18","duration":["18","118"],"context":"4","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1046,"name":"contact-14","sexe":"1","age":"0","studies2":"07","reltype":"1","dist":"3","job":"72","famsit":"0","city":"29","cp":"10019","quartier":"19","duration":["19","119"],"context":"5","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1047,"name":"contact-15","sexe":"2","age":"1","studies2":"08","reltype":"2","dist":"0","job":"73","famsit":"0","city":"30","cp":"10020","quartier":"20","duration":["20","120"],"context":"6","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1048,"name":"contact-16","sexe":"0","age":"2","studies2":"09","reltype":"3","dist":"1","job":"74","famsit":"0","city":"31","cp":"10021","quartier":"21","duration":["21","121"],"context":"7","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1049,"name":"contact-17","sexe":"1","age":"3","studies2":"10","reltype":"4","dist":"2","job":"75","famsit":"0","city":"32","cp":"10022","quartier":"22","duration":["22","122"],"context":"8","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1050,"name":"contact-18","sexe":"2","age":"4","studies2":"11","reltype":"5","dist":"3","job":"76","famsit":"0","city":"33","cp":"10023","quartier":"23","duration":["23","123"],"context":"9","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":1051,"name":"contact-19","sexe":"0","age":"5","studies2":"","reltype":"6","dist":"0","job":"81","famsit":"0","city":"34","cp":"10024","quartier":"24","duration":["24","124"],"context":"10","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]}],"relations":[{"idA":"3","idB":1032,"type":4},{"idA":"3","idB":1033,"type":4},{"idA":"3","idB":1034,"type":4},{"idA":"3","idB":1035,"type":4},{"idA":"3","idB":1036,"type":4},{"idA":"3","idB":1037,"type":4},{"idA":"3","idB":1038,"type":4},{"idA":"3","idB":1039,"type":4},{"idA":"3","idB":1040,"type":4},{"idA":"3","idB":1041,"type":4},{"idA":"3","idB":1042,"type":4},{"idA":"3","idB":1043,"type":4},{"idA":"3","idB":1044,"type":4},{"idA":"3","idB":1045,"type":4},{"idA":"3","idB":1046,"type":4},{"idA":"3","idB":1047,"type":4},{"idA":"3","idB":1048,"type":4},{"idA":"3","idB":1049,"type":4},{"idA":"3","idB":1050,"type":4},{"idA":"3","idB":1051,"type":4},{"idA":1032,"idB":1033,"type":1},{"idA":1032,"idB":1034,"type":0},{"idA":1033,"idB":1034,"type":0},{"idA":1032,"idB":1035,"type":0},{"idA":1033,"idB":1035,"type":0},{"idA":1034,"idB":1035,"type":0},{"idA":1032,"idB":1036,"type":1},{"idA":1033,"idB":1036,"type":0},{"idA":1034,"idB":1036,"type":0},{"idA":1035,"idB":1036,"type":0},{"idA":1032,"idB":1037,"type":0},{"idA":1033,"idB":1037,"type":0},{"idA":1034,"idB":1037,"type":0},{"idA":1035,"idB":1037,"type":0},{"idA":1036,"idB":1037,"type":0},{"idA":1032,"idB":1038,"type":0},{"idA":1033,"idB":1038,"type":0},{"idA":1034,"idB":1038,"type":0},{"idA":1035,"idB":1038,"type":0},{"idA":1036,"idB":1038,"type":0},{"idA":1037,"idB":1038,"type":0},{"idA":1032,"idB":1039,"type":1},{"idA":1033,"idB":1039,"type":0},{"idA":1034,"idB":1039,"type":0},{"idA":1035,"idB":1039,"type":0},{"idA":1036,"idB":1039,"type":0},{"idA":1037,"idB":1039,"type":0},{"idA":1038,"idB":1039,"type":0},{"idA":1032,"idB":1040,"type":0},{"idA":1033,"idB":1040,"type":0},{"idA":1034,"idB":1040,"type":0},{"idA":1035,"idB":1040,"type":0},{"idA":1036,"idB":1040,"type":0},{"idA":1037,"idB":1040,"type":0},{"idA":1038,"idB":1040,"type":0},{"idA":1039,"idB":1040,"type":0},{"idA":1032,"idB":1041,"type":0},{"idA":1033,"idB":1041,"type":0},{"idA":1034,"idB":1041,"type":0},{"idA":1035,"idB":1041,"type":0},{"idA":1036,"idB":1041,"type":0},{"idA":1037,"idB":1041,"type":0},{"idA":1038,"idB":1041,"type":0},{"idA":1039,"idB":1041,"type":0},{"idA":1040,"idB":1041,"type":0},{"idA":1032,"idB":1042,"type":0},{"idA":1033,"idB":1042,"type":0},{"idA":1034,"idB":1042,"type":0},{"idA":1035,"idB":1042,"type":0},{"idA":1036,"idB":1042,"type":0},{"idA":1037,"idB":1042,"type":0},{"idA":1038,"idB":1042,"type":0},{"idA":1039,"idB":1042,"type":0},{"idA":1040,"idB":1042,"type":0},{"idA":1041,"idB":1042,"type":0},{"idA":1032,"idB":1043,"type":0},{"idA":1033,"idB":1043,"type":0},{"idA":1034,"idB":1043,"type":0},{"idA":1035,"idB":1043,"type":0},{"idA":1036,"idB":1043,"type":0},{"idA":1037,"idB":1043,"type":0},{"idA":1038,"idB":1043,"type":0},{"idA":1039,"idB":1043,"type":0},{"idA":1040,"idB":1043,"type":0},{"idA":1041,"idB":1043,"type":0},{"idA":1042,"idB":1043,"type":0},{"idA":1032,"idB":1044,"type":0},{"idA":1033,"idB":1044,"type":0},{"idA":1034,"idB":1044,"type":0},{"idA":1035,"idB":1044,"type":0},{"idA":1036,"idB":1044,"type":0},{"idA":1037,"idB":1044,"type":0},{"idA":1038,"idB":1044,"type":0},{"idA":1039,"idB":1044,"type":0},{"idA":1040,"idB":1044,"type":0},{"idA":1041,"idB":1044,"type":0},{"idA":1042,"idB":1044,"type":0},{"idA":1043,"idB":1044,"type":0},{"idA":1032,"idB":1045,"type":0},{"idA":1033,"idB":1045,"type":0},{"idA":1034,"idB":1045,"type":0},{"idA":1035,"idB":1045,"type":0},{"idA":1036,"idB":1045,"type":0},{"idA":1037,"idB":1045,"type":0},{"idA":1038,"idB":1045,"type":0},{"idA":1039,"idB":1045,"type":0},{"idA":1040,"idB":1045,"type":0},{"idA":1041,"idB":1045,"type":0},{"idA":1042,"idB":1045,"type":0},{"idA":1043,"idB":1045,"type":0},{"idA":1044,"idB":1045,"type":0},{"idA":1032,"idB":1046,"type":0},{"idA":1033,"idB":1046,"type":0},{"idA":1034,"idB":1046,"type":0},{"idA":1035,"idB":1046,"type":0},{"idA":1036,"idB":1046,"type":0},{"idA":1037,"idB":1046,"type":0},{"idA":1038,"idB":1046,"type":0},{"idA":1039,"idB":1046,"type":0},{"idA":1040,"idB":1046,"type":0},{"idA":1041,"idB":1046,"type":0},{"idA":1042,"idB":1046,"type":0},{"idA":1043,"idB":1046,"type":0},{"idA":1044,"idB":1046,"type":0},{"idA":1045,"idB":1046,"type":0},{"idA":1032,"idB":1047,"type":0},{"idA":1033,"idB":1047,"type":0},{"idA":1034,"idB":1047,"type":0},{"idA":1035,"idB":1047,"type":0},{"idA":1036,"idB":1047,"type":0},{"idA":1037,"idB":1047,"type":0},{"idA":1038,"idB":1047,"type":0},{"idA":1039,"idB":1047,"type":0},{"idA":1040,"idB":1047,"type":0},{"idA":1041,"idB":1047,"type":0},{"idA":1042,"idB":1047,"type":0},{"idA":1043,"idB":1047,"type":0},{"idA":1044,"idB":1047,"type":0},{"idA":1045,"idB":1047,"type":0},{"idA":1046,"idB":1047,"type":0},{"idA":1032,"idB":1048,"type":1},{"idA":1033,"idB":1048,"type":0},{"idA":1034,"idB":1048,"type":0},{"idA":1035,"idB":1048,"type":0},{"idA":1036,"idB":1048,"type":0},{"idA":1037,"idB":1048,"type":0},{"idA":1038,"idB":1048,"type":0},{"idA":1039,"idB":1048,"type":0},{"idA":1040,"idB":1048,"type":0},{"idA":1041,"idB":1048,"type":0},{"idA":1042,"idB":1048,"type":0},{"idA":1043,"idB":1048,"type":0},{"idA":1044,"idB":1048,"type":0},{"idA":1045,"idB":1048,"type":0},{"idA":1046,"idB":1048,"type":0},{"idA":1047,"idB":1048,"type":0},{"idA":1032,"idB":1049,"type":0},{"idA":1033,"idB":1049,"type":0},{"idA":1034,"idB":1049,"type":0},{"idA":1035,"idB":1049,"type":0},{"idA":1036,"idB":1049,"type":0},{"idA":1037,"idB":1049,"type":0},{"idA":1038,"idB":1049,"type":0},{"idA":1039,"idB":1049,"type":0},{"idA":1040,"idB":1049,"type":0},{"idA":1041,"idB":1049,"type":0},{"idA":1042,"idB":1049,"type":0},{"idA":1043,"idB":1049,"type":0},{"idA":1044,"idB":1049,"type":0},{"idA":1045,"idB":1049,"type":0},{"idA":1046,"idB":1049,"type":0},{"idA":1047,"idB":1049,"type":0},{"idA":1048,"idB":1049,"type":0},{"idA":1032,"idB":1050,"type":1},{"idA":1033,"idB":1050,"type":0},{"idA":1034,"idB":1050,"type":0},{"idA":1035,"idB":1050,"type":0},{"idA":1036,"idB":1050,"type":0},{"idA":1037,"idB":1050,"type":0},{"idA":1038,"idB":1050,"type":0},{"idA":1039,"idB":1050,"type":0},{"idA":1040,"idB":1050,"type":0},{"idA":1041,"idB":1050,"type":0},{"idA":1042,"idB":1050,"type":0},{"idA":1043,"idB":1050,"type":0},{"idA":1044,"idB":1050,"type":0},{"idA":1045,"idB":1050,"type":0},{"idA":1046,"idB":1050,"type":0},{"idA":1047,"idB":1050,"type":0},{"idA":1048,"idB":1050,"type":0},{"idA":1049,"idB":1050,"type":0},{"idA":1032,"idB":1051,"type":0},{"idA":1033,"idB":1051,"type":0},{"idA":1034,"idB":1051,"type":0},{"idA":1035,"idB":1051,"type":0},{"idA":1036,"idB":1051,"type":0},{"idA":1037,"idB":1051,"type":0},{"idA":1038,"idB":1051,"type":0},{"idA":1039,"idB":1051,"type":0},{"idA":1040,"idB":1051,"type":0},{"idA":1041,"idB":1051,"type":0},{"idA":1042,"idB":1051,"type":0},{"idA":1043,"idB":1051,"type":0},{"idA":1044,"idB":1051,"type":0},{"idA":1045,"idB":1051,"type":0},{"idA":1046,"idB":1051,"type":0},{"idA":1047,"idB":1051,"type":0},{"idA":1048,"idB":1051,"type":0},{"idA":1049,"idB":1051,"type":0},{"idA":1050,"idB":1051,"type":0}]} diff --git a/build/lightdb/storage/facebook_db/index b/build/lightdb/storage/facebook_db/index index 82e0d05..0637a08 100644 --- a/build/lightdb/storage/facebook_db/index +++ b/build/lightdb/storage/facebook_db/index @@ -1 +1 @@ -{"1":{"line":0,"hash":"ae55953b70b63b6665ea13aef65aef8da8b8c834"},"3":{"line":1,"hash":"e264f35e79e354f1dcadc0bc6b9c2b07dc214ee2"}} \ No newline at end of file +[] \ No newline at end of file diff --git a/build/lightdb/storage/phone_db/data b/build/lightdb/storage/phone_db/data index a1b22d3..e69de29 100644 --- a/build/lightdb/storage/phone_db/data +++ b/build/lightdb/storage/phone_db/data @@ -1,2 +0,0 @@ -{"subject":{"id":"3"},"contacts":[{"id":567,"name":"contact-x","sexe":"1","age":"6","studies2":"01","reltype":"7","dist":"1","job":"82","famsit":"0","city":"35","cp":"10025","quartier":"25","duration":["25","125"],"context":"11","contextExtra":["internet","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":568,"name":"contact-1","sexe":"0","age":"6","studies2":"06","reltype":"6","dist":"2","job":"36","famsit":"0","city":"16","cp":"10006","quartier":"6","duration":["6","16"],"context":"6","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":569,"name":"contact-2","sexe":"1","age":"7","studies2":"07","reltype":"7","dist":"3","job":"41","famsit":"0","city":"17","cp":"10007","quartier":"7","duration":["7","17"],"context":"7","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":570,"name":"contact-3","sexe":"2","age":"8","studies2":"08","reltype":"autre","dist":"0","job":"46","famsit":"0","city":"18","cp":"10008","quartier":"8","duration":["8","18"],"context":"8","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":571,"name":"contact-4","sexe":"0","age":"9","studies2":"09","reltype":"0","dist":"1","job":"47","famsit":"0","city":"19","cp":"10009","quartier":"9","duration":["9","19"],"context":"9","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":572,"name":"contact-5","sexe":"1","age":"10","studies2":"10","reltype":"1","dist":"2","job":"48","famsit":"0","city":"20","cp":"10010","quartier":"10","duration":["10","110"],"context":"10","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":573,"name":"contact-6","sexe":"2","age":"11","studies2":"11","reltype":"2","dist":"3","job":"51","famsit":"0","city":"21","cp":"10011","quartier":"11","duration":["11","111"],"context":"11","contextExtra":["internet","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":574,"name":"contact-7","sexe":"0","age":"12","studies2":"","reltype":"3","dist":"0","job":"54","famsit":"0","city":"22","cp":"10012","quartier":"12","duration":["12","112"],"context":"12","contextExtra":["","association",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":575,"name":"contact-8","sexe":"1","age":"13","studies2":"01","reltype":"4","dist":"1","job":"55","famsit":"0","city":"23","cp":"10013","quartier":"13","duration":["13","113"],"context":"13","contextExtra":["","","autre"],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":576,"name":"contact-9","sexe":"2","age":"14","studies2":"02","reltype":"5","dist":"2","job":"56","famsit":"0","city":"24","cp":"10014","quartier":"14","duration":["14","114"],"context":"0","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":577,"name":"contact-10","sexe":"0","age":"15","studies2":"03","reltype":"6","dist":"3","job":"61","famsit":"0","city":"25","cp":"10015","quartier":"15","duration":["15","115"],"context":"1","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":578,"name":"contact-11","sexe":"1","age":"16","studies2":"04","reltype":"7","dist":"0","job":"66","famsit":"0","city":"26","cp":"10016","quartier":"16","duration":["16","116"],"context":"2","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":579,"name":"contact-12","sexe":"2","age":"17","studies2":"05","reltype":"autre","dist":"1","job":"69","famsit":"0","city":"27","cp":"10017","quartier":"17","duration":["17","117"],"context":"3","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":580,"name":"contact-13","sexe":"0","age":"18","studies2":"06","reltype":"0","dist":"2","job":"71","famsit":"0","city":"28","cp":"10018","quartier":"18","duration":["18","118"],"context":"4","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":581,"name":"contact-14","sexe":"1","age":"0","studies2":"07","reltype":"1","dist":"3","job":"72","famsit":"0","city":"29","cp":"10019","quartier":"19","duration":["19","119"],"context":"5","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":582,"name":"contact-15","sexe":"2","age":"1","studies2":"08","reltype":"2","dist":"0","job":"73","famsit":"0","city":"30","cp":"10020","quartier":"20","duration":["20","120"],"context":"6","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":583,"name":"contact-16","sexe":"0","age":"2","studies2":"09","reltype":"3","dist":"1","job":"74","famsit":"0","city":"31","cp":"10021","quartier":"21","duration":["21","121"],"context":"7","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":584,"name":"contact-17","sexe":"1","age":"3","studies2":"10","reltype":"4","dist":"2","job":"75","famsit":"0","city":"32","cp":"10022","quartier":"22","duration":["22","122"],"context":"8","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":585,"name":"contact-18","sexe":"2","age":"4","studies2":"11","reltype":"5","dist":"3","job":"76","famsit":"0","city":"33","cp":"10023","quartier":"23","duration":["23","123"],"context":"9","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]},{"id":586,"name":"contact-19","sexe":"0","age":"5","studies2":"","reltype":"6","dist":"0","job":"81","famsit":"0","city":"34","cp":"10024","quartier":"24","duration":["24","124"],"context":"10","contextExtra":["","",""],"freq":["4","9","14","19","24"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""]}],"relations":[{"idA":"3","idB":567,"type":4},{"idA":"3","idB":568,"type":4},{"idA":"3","idB":569,"type":4},{"idA":"3","idB":570,"type":4},{"idA":"3","idB":571,"type":4},{"idA":"3","idB":572,"type":4},{"idA":"3","idB":573,"type":4},{"idA":"3","idB":574,"type":4},{"idA":"3","idB":575,"type":4},{"idA":"3","idB":576,"type":4},{"idA":"3","idB":577,"type":4},{"idA":"3","idB":578,"type":4},{"idA":"3","idB":579,"type":4},{"idA":"3","idB":580,"type":4},{"idA":"3","idB":581,"type":4},{"idA":"3","idB":582,"type":4},{"idA":"3","idB":583,"type":4},{"idA":"3","idB":584,"type":4},{"idA":"3","idB":585,"type":4},{"idA":"3","idB":586,"type":4},{"idA":567,"idB":568,"type":1},{"idA":567,"idB":569,"type":0},{"idA":568,"idB":569,"type":0},{"idA":567,"idB":570,"type":0},{"idA":568,"idB":570,"type":0},{"idA":569,"idB":570,"type":0},{"idA":567,"idB":571,"type":1},{"idA":568,"idB":571,"type":0},{"idA":569,"idB":571,"type":0},{"idA":570,"idB":571,"type":0},{"idA":567,"idB":572,"type":0},{"idA":568,"idB":572,"type":0},{"idA":569,"idB":572,"type":0},{"idA":570,"idB":572,"type":0},{"idA":571,"idB":572,"type":0},{"idA":567,"idB":573,"type":0},{"idA":568,"idB":573,"type":0},{"idA":569,"idB":573,"type":0},{"idA":570,"idB":573,"type":0},{"idA":571,"idB":573,"type":0},{"idA":572,"idB":573,"type":0},{"idA":567,"idB":574,"type":1},{"idA":568,"idB":574,"type":0},{"idA":569,"idB":574,"type":0},{"idA":570,"idB":574,"type":0},{"idA":571,"idB":574,"type":0},{"idA":572,"idB":574,"type":0},{"idA":573,"idB":574,"type":0},{"idA":567,"idB":575,"type":0},{"idA":568,"idB":575,"type":0},{"idA":569,"idB":575,"type":0},{"idA":570,"idB":575,"type":0},{"idA":571,"idB":575,"type":0},{"idA":572,"idB":575,"type":0},{"idA":573,"idB":575,"type":0},{"idA":574,"idB":575,"type":0},{"idA":567,"idB":576,"type":0},{"idA":568,"idB":576,"type":0},{"idA":569,"idB":576,"type":0},{"idA":570,"idB":576,"type":0},{"idA":571,"idB":576,"type":0},{"idA":572,"idB":576,"type":0},{"idA":573,"idB":576,"type":0},{"idA":574,"idB":576,"type":0},{"idA":575,"idB":576,"type":0},{"idA":567,"idB":577,"type":0},{"idA":568,"idB":577,"type":0},{"idA":569,"idB":577,"type":0},{"idA":570,"idB":577,"type":0},{"idA":571,"idB":577,"type":0},{"idA":572,"idB":577,"type":0},{"idA":573,"idB":577,"type":0},{"idA":574,"idB":577,"type":0},{"idA":575,"idB":577,"type":0},{"idA":576,"idB":577,"type":0},{"idA":567,"idB":578,"type":0},{"idA":568,"idB":578,"type":0},{"idA":569,"idB":578,"type":0},{"idA":570,"idB":578,"type":0},{"idA":571,"idB":578,"type":0},{"idA":572,"idB":578,"type":0},{"idA":573,"idB":578,"type":0},{"idA":574,"idB":578,"type":0},{"idA":575,"idB":578,"type":0},{"idA":576,"idB":578,"type":0},{"idA":577,"idB":578,"type":0},{"idA":567,"idB":579,"type":0},{"idA":568,"idB":579,"type":0},{"idA":569,"idB":579,"type":0},{"idA":570,"idB":579,"type":0},{"idA":571,"idB":579,"type":0},{"idA":572,"idB":579,"type":0},{"idA":573,"idB":579,"type":0},{"idA":574,"idB":579,"type":0},{"idA":575,"idB":579,"type":0},{"idA":576,"idB":579,"type":0},{"idA":577,"idB":579,"type":0},{"idA":578,"idB":579,"type":0},{"idA":567,"idB":580,"type":0},{"idA":568,"idB":580,"type":0},{"idA":569,"idB":580,"type":0},{"idA":570,"idB":580,"type":0},{"idA":571,"idB":580,"type":0},{"idA":572,"idB":580,"type":0},{"idA":573,"idB":580,"type":0},{"idA":574,"idB":580,"type":0},{"idA":575,"idB":580,"type":0},{"idA":576,"idB":580,"type":0},{"idA":577,"idB":580,"type":0},{"idA":578,"idB":580,"type":0},{"idA":579,"idB":580,"type":0},{"idA":567,"idB":581,"type":0},{"idA":568,"idB":581,"type":0},{"idA":569,"idB":581,"type":0},{"idA":570,"idB":581,"type":0},{"idA":571,"idB":581,"type":0},{"idA":572,"idB":581,"type":0},{"idA":573,"idB":581,"type":0},{"idA":574,"idB":581,"type":0},{"idA":575,"idB":581,"type":0},{"idA":576,"idB":581,"type":0},{"idA":577,"idB":581,"type":0},{"idA":578,"idB":581,"type":0},{"idA":579,"idB":581,"type":0},{"idA":580,"idB":581,"type":0},{"idA":567,"idB":582,"type":0},{"idA":568,"idB":582,"type":0},{"idA":569,"idB":582,"type":0},{"idA":570,"idB":582,"type":0},{"idA":571,"idB":582,"type":0},{"idA":572,"idB":582,"type":0},{"idA":573,"idB":582,"type":0},{"idA":574,"idB":582,"type":0},{"idA":575,"idB":582,"type":0},{"idA":576,"idB":582,"type":0},{"idA":577,"idB":582,"type":0},{"idA":578,"idB":582,"type":0},{"idA":579,"idB":582,"type":0},{"idA":580,"idB":582,"type":0},{"idA":581,"idB":582,"type":0},{"idA":567,"idB":583,"type":1},{"idA":568,"idB":583,"type":0},{"idA":569,"idB":583,"type":0},{"idA":570,"idB":583,"type":0},{"idA":571,"idB":583,"type":0},{"idA":572,"idB":583,"type":0},{"idA":573,"idB":583,"type":0},{"idA":574,"idB":583,"type":0},{"idA":575,"idB":583,"type":0},{"idA":576,"idB":583,"type":0},{"idA":577,"idB":583,"type":0},{"idA":578,"idB":583,"type":0},{"idA":579,"idB":583,"type":0},{"idA":580,"idB":583,"type":0},{"idA":581,"idB":583,"type":0},{"idA":582,"idB":583,"type":0},{"idA":567,"idB":584,"type":0},{"idA":568,"idB":584,"type":0},{"idA":569,"idB":584,"type":0},{"idA":570,"idB":584,"type":0},{"idA":571,"idB":584,"type":0},{"idA":572,"idB":584,"type":0},{"idA":573,"idB":584,"type":0},{"idA":574,"idB":584,"type":0},{"idA":575,"idB":584,"type":0},{"idA":576,"idB":584,"type":0},{"idA":577,"idB":584,"type":0},{"idA":578,"idB":584,"type":0},{"idA":579,"idB":584,"type":0},{"idA":580,"idB":584,"type":0},{"idA":581,"idB":584,"type":0},{"idA":582,"idB":584,"type":0},{"idA":583,"idB":584,"type":0},{"idA":567,"idB":585,"type":1},{"idA":568,"idB":585,"type":0},{"idA":569,"idB":585,"type":0},{"idA":570,"idB":585,"type":0},{"idA":571,"idB":585,"type":0},{"idA":572,"idB":585,"type":0},{"idA":573,"idB":585,"type":0},{"idA":574,"idB":585,"type":0},{"idA":575,"idB":585,"type":0},{"idA":576,"idB":585,"type":0},{"idA":577,"idB":585,"type":0},{"idA":578,"idB":585,"type":0},{"idA":579,"idB":585,"type":0},{"idA":580,"idB":585,"type":0},{"idA":581,"idB":585,"type":0},{"idA":582,"idB":585,"type":0},{"idA":583,"idB":585,"type":0},{"idA":584,"idB":585,"type":0},{"idA":567,"idB":586,"type":0},{"idA":568,"idB":586,"type":0},{"idA":569,"idB":586,"type":0},{"idA":570,"idB":586,"type":0},{"idA":571,"idB":586,"type":0},{"idA":572,"idB":586,"type":0},{"idA":573,"idB":586,"type":0},{"idA":574,"idB":586,"type":0},{"idA":575,"idB":586,"type":0},{"idA":576,"idB":586,"type":0},{"idA":577,"idB":586,"type":0},{"idA":578,"idB":586,"type":0},{"idA":579,"idB":586,"type":0},{"idA":580,"idB":586,"type":0},{"idA":581,"idB":586,"type":0},{"idA":582,"idB":586,"type":0},{"idA":583,"idB":586,"type":0},{"idA":584,"idB":586,"type":0},{"idA":585,"idB":586,"type":0}]} -{"subject":{"id":"1"},"contacts":[],"relations":[]} diff --git a/build/lightdb/storage/phone_db/index b/build/lightdb/storage/phone_db/index index 7f35ef3..0637a08 100644 --- a/build/lightdb/storage/phone_db/index +++ b/build/lightdb/storage/phone_db/index @@ -1 +1 @@ -{"3":{"line":0,"hash":"e9aff02e50eb56a848c3580c8a119a5cbe0ec64b"},"1":{"line":1,"hash":"99e868e35cdf0e36df88a54a7f03f6eff8966cf0"}} \ No newline at end of file +[] \ No newline at end of file diff --git a/build/lightdb/storage/subject/data b/build/lightdb/storage/subject/data new file mode 100644 index 0000000..3fd1a07 --- /dev/null +++ b/build/lightdb/storage/subject/data @@ -0,0 +1,7 @@ +{"subject":{"id":1,"name":"Caroline", "surveys": [], "creation":1464788890}} +{"subject":{"id":2,"name":"Cl\u00e9ment", "surveys": [], "creation":1464788893}} +{"subject":{"id":3,"name":"Coralie", "surveys": [], "creation":1464788897}} +{"subject":{"id":4,"name":"Laurent", "surveys": [], "creation":1464788899}} +{"subject":{"id":5,"name":"Emilie", "surveys": [], "creation":1464788903}} +{"subject":{"id":6,"name":"C\u00e9line", "surveys": [], "creation":1464788905}} +{"subject":{"id":7,"name":"Pierre", "surveys": [], "creation":1464788908}} diff --git a/build/lightdb/storage/subject/index b/build/lightdb/storage/subject/index index fe51488..2b3c59d 100644 --- a/build/lightdb/storage/subject/index +++ b/build/lightdb/storage/subject/index @@ -1 +1 @@ -[] +{"2":{"line":0,"hash":"8192621a7f0013e137e63edffdadea6ab7f69565"},"3":{"line":1,"hash":"a7b9d5cf6cfb41c0b100d91d053032bdad3a80da"},"4":{"line":2,"hash":"ef73002b8217c3c3b87a62b8ae4c69b3994c114f"},"5":{"line":3,"hash":"5cf77d4e920f1b418bf78484bc1766fb84baabb9"},"6":{"line":4,"hash":"356e841ad04cb0f553fe47eab88bf550d6853c60"},"7":{"line":5,"hash":"7d070210aed5df40ee7e2ca4b54f29c672d32a89"},"8":{"line":6,"hash":"9e4936de2cf03d46135bbac3589a1e3ce68fb406"}} \ No newline at end of file diff --git a/build/lightdb/storage/survey_db/data b/build/lightdb/storage/survey_db/data index a8009da..e69de29 100644 --- a/build/lightdb/storage/survey_db/data +++ b/build/lightdb/storage/survey_db/data @@ -1,8 +0,0 @@ -{"subject":{"id":1,"name":"Caroline","creation":1464788890}} -{"subject":{"id":2,"name":"Cl\u00e9ment","creation":1464788893}} -{"subject":{"id":3,"name":"Coralie","creation":1464788897}} -{"subject":{"id":4,"name":"Laurent","creation":1464788899}} -{"subject":{"id":5,"name":"Emilie","creation":1464788903}} -{"subject":{"id":6,"name":"C\u00e9line","creation":1464788905}} -{"subject":{"id":7,"name":"Pierre","creation":1464788908}} -{"subject":{"id":8,"name":"Boris","creation":1464788910}} diff --git a/build/lightdb/storage/survey_db/index b/build/lightdb/storage/survey_db/index index 654c55c..0637a08 100644 --- a/build/lightdb/storage/survey_db/index +++ b/build/lightdb/storage/survey_db/index @@ -1 +1 @@ -{"1":{"line":0,"hash":"9798c2b945e222c48bff804d9819c0d98e88d257"},"2":{"line":1,"hash":"8192621a7f0013e137e63edffdadea6ab7f69565"},"3":{"line":2,"hash":"a7b9d5cf6cfb41c0b100d91d053032bdad3a80da"},"4":{"line":3,"hash":"ef73002b8217c3c3b87a62b8ae4c69b3994c114f"},"5":{"line":4,"hash":"5cf77d4e920f1b418bf78484bc1766fb84baabb9"},"6":{"line":5,"hash":"356e841ad04cb0f553fe47eab88bf550d6853c60"},"7":{"line":6,"hash":"7d070210aed5df40ee7e2ca4b54f29c672d32a89"},"8":{"line":7,"hash":"9e4936de2cf03d46135bbac3589a1e3ce68fb406"}} \ No newline at end of file +[] \ No newline at end of file diff --git a/build/lightdb/storage/uniqid b/build/lightdb/storage/uniqid index 434727c..8630f55 100644 --- a/build/lightdb/storage/uniqid +++ b/build/lightdb/storage/uniqid @@ -1 +1 @@ -3903 \ No newline at end of file +4163 \ No newline at end of file diff --git a/public_html/view/js/input.js b/public_html/view/js/input.js index 8d619fd..a6c19b9 100644 --- a/public_html/view/js/input.js +++ b/public_html/view/js/input.js @@ -36,6 +36,8 @@ var tmpSubjectSearchListener = function(e){ /* (2) On effectue la requête */ api.send(request, function(response){ + console.warn(response); + // Si erreur if( response.ModuleError != 0 ){ Notification.error('Erreur', 'La recherche a échoué.') diff --git a/public_html/view/js/min/input.js b/public_html/view/js/min/input.js index 08f2601..6da0b04 100644 --- a/public_html/view/js/min/input.js +++ b/public_html/view/js/min/input.js @@ -1,5 +1,5 @@ var sField,sSubmit,sList,pSubjectManager=null,pContactManager=null,pMiniManager=null,pFicheManager=null,pMatriceManager=null,fSubjectManager=null,fContactManager=null,fMiniManager=null,fFicheManager=null,fMatriceManager=null,input_ts=Date.now();sField=$("#search-field");sSubmit=$("#search-subject");sList=$('section[data-sublink="survey"] ul[data-list]'); -var tmpSubjectSearchListener=function(a){api.send({path:"subject/search",name:sField.value},function(a){if(0!=a.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(a);var c=[],g;for(g in a.results)c.push("
  • "),c.push("
    SUJET
    "),c.push("
    "),c.push("
    "+ +var tmpSubjectSearchListener=function(a){api.send({path:"subject/search",name:sField.value},function(a){console.warn(a);if(0!=a.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(a);var c=[],g;for(g in a.results)c.push("
  • "),c.push("
    SUJET
    "),c.push("
    "),c.push("
    "+ a.results[g].name+"
    "),c.push("
    "+a.results[g].creation+"
    "),c.push("
    "),c.push("
    "),c.push("
    "),c.push("
    "),c.push("
  • ");sList.innerHTML= c.join("")})};sSubmit.addEventListener("click",tmpSubjectSearchListener,!1);sField.addEventListener("keypress",function(a){13===a.keyCode&&tmpSubjectSearchListener(a)},!1);tmpSubjectSearchListener(); var pAlready=0,pLoaded=[0,0,0,0,0],phoneRoutine=function(){!Math.min.apply(Math,pLoaded)|pAlready||(pAlready=1,console.groupEnd(),console.group("[phone] Initialization"),pSubjectManager=new inputPhoneSubject($('[data-sublink="phone"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="phone"] article.subject-panel [data-name="submit"]')),pSubjectManager.attach(pDynamicUpdate),pContactManager=new inputPhoneContact($('[data-sublink="phone"] article.contact-panel'),$('[data-sublink="phone"] #p_nav-contact')),