Compare commits

..

1 Commits

388 changed files with 23432 additions and 8459 deletions

11
.gitignore vendored
View File

@ -1,11 +0,0 @@
.ftpconfig
sftp-config.json
phpunit/coverage/
/public_html/tmp/*
<<<<<<< HEAD
/build/lightdb/storage/*
/config/server.json
=======
/build/lightdb/storage/*/data
**.swp
>>>>>>> 255af4d6b03408ab9f840db1fea74a35b7bc28c4

View File

@ -1,17 +0,0 @@
<?php
/**************************
* Builder *
* 05-11-16 *
***************************
* Designed & Developed by *
* xdrm-brackets *
***************************
* https://xdrm.io/ *
**************************/
class Builder{
}

View File

@ -1,506 +0,0 @@
<?php
namespace api\module;
use \database\core\DatabaseDriver;
use \manager\sessionManager;
use \api\core\ModuleRequest;
use \manager\ManagerError;
use \database\core\Repo;
use \lightdb\core\lightdb;
class download{
/* CONSTRUIT UN CONTENU CSV A PARTIR DES DONNEES @DATA ET DU DICTIONNAIRE @DICT
*
* @data<Array> Tableau contenant les valeurs
* @dict<Array> Tableau contenant le dictionnaire des valeurs
* @displayColumns<Boolean> VRAI s'il faut afficher les colonnes
*
* @return csvContent<String> Retourne le contenu CSV associé
*
*/
private static function parseCSV($data, $dict, $displayColumns=true){
$output = ''; // Contiendra le résultat
$dictKeys = array_keys($dict); // Contient les clés de @dict
/* [0] On récupère toutes les colonnes
=========================================================*/
$columns = []; // Contiendra les colonnes
/* (1) Pour chaque set de @data */
foreach($data as $dataset){
$keys = [];
/* (2) Pour chaque champ de chaque set de @data, on ajoute les clés */
foreach($dataset as $key=>$value){
// {1} Si c'est un tableau -> on ajoute les sous-clés //
if( is_array($value) )
foreach($value as $subIndex=>$subValue)
array_push( $keys, "${key}_$subIndex" );
// {2} Si c'est une valeur simple -> on ajoute la clé //
else
array_push( $keys, $key );
}
/* (3) On ajoute à chaque fois les clés du set à la liste des colonnes */
$columns = array_unique( array_merge( $columns, $keys ) );
}
/* [1] On ajoute les colonnes à la sortie
=========================================================*/
if( $displayColumns )
foreach($columns as $i=>$column)
$output .= ($i < count($columns)-1) ? "\"$column\";" : "\"$column\"\r\n";
/* [2] On récupère les valeurs et on les ajoute à la sortie
=========================================================*/
/* (1) Pour chaque set de @data */
foreach($data as $dataset){
/* (2) Pour chaque colonne */
foreach($columns as $c=>$column){
/* (3) On décompose la colonne (ne change que si elle l'est) */
$col = explode('_', $column);
$composed = true;
// Si il n'existe pas une 2me partie numérique, on annule la décomposition
if( !isset($col[1]) || !is_numeric($col[1]) ){
$col = [ $column ];
$composed = false;
}
/* (4) Si la colonne existe dans le set actuel */
if( isset($dataset[$col[0]]) ){
/* (5) Si c'est une valeur composée, on récupère la valeur */
if( $composed && isset($dataset[$col[0]][$col[1]]) )
// {1} Si valeur dans le dictionnaire, on fait modulo le nombre de choix possibles //
if( isset($dict[$col[0]]) )
$output .= "\"".( $dataset[$col[0]][$col[1]] % count($dict[$col[0]]) )."\"";
// {2} Si pas dans le dictionnaire, on laisse la valeur //
else
$output .= "\"".$dataset[$col[0]][$col[1]]."\"";
/* (6) Si la valeur n'est pas composée, on récupère la valeur */
elseif( !$composed && !is_array($dataset[$col[0]]) )
$output .= "\"".$dataset[$col[0]]."\"";
}
// On ajoute une virgule sauf à la dernière valeur
$output .= ($c < count($columns)-1) ? ";" : "";
}
$output .= "\r\n";
}
return $output;
}
/* DOWNLOAD D'UN FICHIER CONTENANT LES DONNEES SELECTIONNEES
*
* @subjects<Array> Liste des identifiants des sujets à prendre en compte
* @all<Boolean> Si TRUE, prend en compte tous les sujets (annule @subjects)
*
* @return data<File> Retourne une archive .zip contenant toutes les données sélectionnées
*
*/
public static function multiple($params){
extract($params);
/* (0) Gestion du formattage des paramètres */
$subjects = !is_array($subjects) ? [] : $subjects;
$all = !is_bool($all) ? false : $all;
/* [0] On récupère le dictionnaire
=========================================================*/
$dict = file_get_contents(__BUILD__.'/lightdb/storage/dictionary.json');
/* (2) Si une erreur pour le fichier de conf */
if( $dict === false )
return [ 'ModuleError' => ManagerError::UnreachableResource ];
/* (3) On récupère la config sous forme de tableau */
$dict = json_decode( $dict, true );
/* (4) Si erreur de PARSAGE */
if( !is_array($dict) )
return [ 'ModuleError' => ManagerError::ParsingFailed ];
/* [1] Initialisation
=========================================================*/
/* (1) Fichiers de sortie */
$output = [
'contacts.fiche' => '', // contiendra les contacts et leurs données fiches
'contacts.mini' => '', // contiendra les contacts et leurs données mini
'relations' => '', // contiendra les relations
'dict' => '' // contiendra le dictionnaire de valeurs
];
/* (2) Base de données */
$subjectdb = new lightdb('subject');
$contactdb = new lightdb('contact');
/* [2] On construit la liste des sujets
=========================================================*/
$subjectindexes = array_keys($subjectdb->index());
$subjectids = [];
/* (1) On récupère tous les sujets si c'est spécifié */
if( $all )
$subjectids = $subjectindexes;
/* (2) Sinon on retire les ids incorrects */
else
foreach($subjects as $i=>$id)
if( in_array($id, $subjectindexes) )
$subjectids[] = intval($id);
/* (3) Si aucun sujet restant -> error */
if( count($subjectids) === 0 )
return ['ModuleError' => ManagerError::ParamError];
/* [3] Export contacts/relations des sujets selectionnés
=========================================================*/
foreach($subjectids as $subid){
/* (1) On récupère les données du sujet */
$subject = $subjectdb->fetch($subid);
// si pas trouvé -> suivant
if( $subject === false )
continue;
/* (2) Si aucun contact -> suivant */
if( !isset($subject['contacts']) || !is_array($subject['contacts']) )
continue;
/* (3) Pour chaque contact */
foreach($subject['contacts'] as $c=>$contactid){
// {3.1} On récupère le contact //
$contact = $contactdb->fetch($contactid);
// si pas trouvé -> suivant
if( $contact === false )
continue;
// {3.2} On ajoute le contact au fichier des FICHES //
if( array_key_exists('studies2', $contact) )
// On affiche les colonnes pour le premier contact uniquement
$output['contacts.fiche'] .= self::parseCSV([$contact], $dict['contacts'], strlen($output['contacts.fiche']) == 0 );
// {3.3} On ajoute le contact au fichier des MINI //
if( array_key_exists('studies1', $contact) )
// On affiche les colonnes pour le premier contact uniquement
$output['contacts.mini'] .= self::parseCSV([$contact], $dict['contacts'], strlen($output['contacts.mini']) == 0 );
}
// On ajoute le sujet à la liste des contacts
$output['contacts.mini'] .= self::parseCSV([[
'id' => $subid,
'name' => $subject['subject']['name']
]], [], strlen($output['contacts.mini']) == 0);
/* (4) Si aucune relation -> suivant */
if( !isset($subject['relations']) || !is_array($subject['relations']) )
continue;
/* (5) On ajoute les relations */
$output['relations'] .= self::parseCSV($subject['relations'], [], strlen($output['relations']) == 0 );
}
/* [5] On ajoute le dictionnaire
=========================================================*/
$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";
/* [6] Création de l'archive
=========================================================*/
$zip = new \ZipArchive();
$fname = __TMP__.'/'.time().'.zip';
$zip->open($fname, \ZipArchive::CREATE);
foreach($output as $file=>$content)
if( strlen($content) > 0 )
$zip->addFromString($file.'.csv', $content);
$zip->close();
/* [5] On lance le téléchargement
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'headers' => [
'Content-Type' => 'application/zip; charset=utf-8',
'Content-Disposition' => 'attachment; filename=export'.date('_d_m_Y', time()).'.zip',
'Pragma' => 'no-cache',
'Expires' => '0'
],
'body' => file_get_contents($fname)
];
}
/* EXPORT POUR GEPHI OU AUTRE LOGICIEL SUR LE PRINCIPE NODES+EDGES
*
* @subjects<Array> Liste des identifiants des sujets à prendre en compte
* @all<Boolean> Si TRUE, prend en compte tous les sujets (annule @subjects)
*
* @return data<File> Retourne une archive .zip contenant toutes les données sélectionnées
*/
public static function chart($params){
extract($params);
/* (0) Gestion du formattage des paramètres */
$subjects = !is_array($subjects) ? [] : $subjects;
$all = !is_bool($all) ? false : $all;
/* [0] On récupère le dictionnaire
=========================================================*/
$dict = file_get_contents(__BUILD__.'/lightdb/storage/dictionary.json');
/* (2) Si une erreur pour le fichier de conf */
if( $dict === false )
return [ 'ModuleError' => ManagerError::UnreachableResource ];
/* (3) On récupère la config sous forme de tableau */
$dict = json_decode( $dict, true );
/* (4) Si erreur de PARSAGE */
if( !is_array($dict) )
return [ 'ModuleError' => ManagerError::ParsingFailed ];
/* [1] Initialisation
=========================================================*/
/* (1) Fichiers de sortie */
$output = [
'gephi.nodes' => '', // contiendra les contacts et leurs données
'gephi.edges' => '', // contiendra les relations
'dict' => '' // contiendra le dictionnaire de valeurs
];
/* (2) Base de données */
$subjectdb = new lightdb('subject');
$contactdb = new lightdb('contact');
/* [2] On construit la liste des sujets
=========================================================*/
$subjectindexes = array_keys($subjectdb->index());
$subjectids = [];
/* (1) On récupère tous les sujets si c'est spécifié */
if( $all )
$subjectids = $subjectindexes;
/* (2) Sinon on retire les ids incorrects */
else
foreach($subjects as $i=>$id)
if( in_array($id, $subjectindexes) )
$subjectids[] = intval($id);
/* (3) Si aucun sujet restant -> error */
if( count($subjectids) === 0 )
return ['ModuleError' => ManagerError::ParamError];
/* [3] Export contacts/relations des sujets selectionnés
=========================================================*/
foreach($subjectids as $subid){
/* (1) On récupère les données du sujet */
$subject = $subjectdb->fetch($subid);
// si pas trouvé -> suivant
if( $subject === false )
continue;
/* (2) Si aucun contact -> suivant */
if( !isset($subject['contacts']) || !is_array($subject['contacts']) )
continue;
/* (3) Pour chaque contact */
foreach($subject['contacts'] as $c=>$contactid){
// {3.1} On récupère le contact //
$contact = $contactdb->fetch($contactid);
// si pas trouvé -> suivant
if( $contact === false )
continue;
// {3.2} On ajoute le contact au fichier des FICHES //
if( array_key_exists('studies2', $contact) ){
// On affiche les colonnes pour le premier contact uniquement
$contact['type'] = 'fiche';
$output['gephi.nodes'] .= self::parseCSV([$contact], $dict['contacts'], strlen($output['gephi.nodes']) == 0 );
// {3.3} On ajoute le contact au fichier des MINI //
}elseif( array_key_exists('studies1', $contact) ){
// On affiche les colonnes pour le premier contact uniquement
$contact['type'] = 'mini';
$output['gephi.nodes'] .= self::parseCSV([$contact], $dict['contacts'], strlen($output['gephi.nodes']) == 0 );
}
}
// On ajoute le sujet à la liste des contacts
$output['gephi.nodes'] .= self::parseCSV([[
'id' => $subid,
'name' => $subject['subject']['name']
]], [], strlen($output['gephi.nodes']) == 0);
/* (4) Si aucune relation -> suivant */
if( !isset($subject['relations']) || !is_array($subject['relations']) )
continue;
/* (5) On ajoute les relations */
foreach($subject['relations'] as $r=>$rel)
$output['gephi.edges'] .= self::parseCSV(
[[
'source' => $rel['idA'],
'target' => $rel['idB'],
'weight' => ($rel['idA']==$subid) ? .5 : 1,
'type' => 'Undirected'
]],
[],
strlen($output['gephi.edges']) == 0
);
}
/* [5] On ajoute le dictionnaire
=========================================================*/
$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";
/* [6] Création de l'archive
=========================================================*/
$zip = new \ZipArchive();
$fname = __TMP__.'/'.time().'.zip';
$zip->open($fname, \ZipArchive::CREATE);
foreach($output as $file=>$content)
if( strlen($content) > 0 )
$zip->addFromString($file.'.csv', $content);
$zip->close();
/* [5] On lance le téléchargement
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'headers' => [
'Content-Type' => 'application/zip; charset=utf-8',
'Content-Disposition' => 'attachment; filename=graphics'.date('_d_m_Y', time()).'.zip',
'Pragma' => 'no-cache',
'Expires' => '0'
],
'body' => file_get_contents($fname)
];
}
/* RENVOIE LE CONTENU DU MENU
*
*/
public static function menu($params){
extract($params);
$menu_json = json_decode( file_get_contents(__CONFIG__.'/menu.json'), true );
// si erreur
if( $menu_json == null )
return ['ModuleError' => ManagerError::ParsingFailed];
// si tout bon
return [
'ModuleError' => ManagerError::Success,
'menu' => $menu_json
];
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +0,0 @@
<?php
namespace http\core;
class HttpRequest{
/* [0] Constants
=========================================================*/
/* (1) Content-Type */
const CT_BINARY = 0; // unknown
const CT_TEXT = 1;
const CT_JSON = 2;
const CT_YAML = 3;
const CT_MULTIPART_FORM_DATA = 4;
const CT_X_WWW_FORM_URLENCODED = 5;
/* [1] Attributes
=========================================================*/
private $uri;
private $headers;
private $method;
private $postdata;
private $getdata;
private $type;
private $body;
/* [2] Constructs an HTTP Request based on environment
*
* @return instance<HttpRequest> auto-filled HTTP Request
*
=========================================================*/
public function __construct(){
/* [1] Define URI & Status Code & method
=========================================================*/
$this->uri = $_SERVER['REQUEST_URI'];
$this->method = $_SERVER['REQUEST_METHOD'];
/* [2] Define headers
=========================================================*/
$this->headers = \getallheaders();
/* [3] Define default datasets (GET, POST)
=========================================================*/
$this->getdata = $_GET;
$this->postdata = $_POST;
/* [4] Define BODY & its type
=========================================================*/
/* (1) Default: set plain/text body */
$this->body = \file_get_contents('php://input');
/* (2) Fetch content type */
$this->type = self::getContentType($this->headers['Content-Type']);
/* [5] Parse BODY data -> POST
=========================================================*/
$this->parseBody();
}
/* GET CONSTANT CT_* FROM `Content-Type` HEADER
*
* @pContentType<String> `Content-Type` header value
*
* @return type<int> Constant value
*
*/
private static function getContentType($pContentType=null){
/* [1] Checks argv
=========================================================*/
if( is_null($pContentType) )
$pContentType = $_SERVER['CONTENT_TYPE'];
/* [2] Checks types
=========================================================*/
/* (1) Form Data Types
---------------------------------------------------------*/
/* (1) multipart/form-data */
if( preg_match('/^multipart\/form\-data; boundary=(.+)$/i', $pContentType) )
return self::CT_MULTIPART_FORM_DATA;
/* (2) application/x-www-form-urlencoded */
if( preg_match('/^application\/x\-www\-form\-urlencoded/i', $pContentType) )
return self::CT_X_WWW_FORM_URLENCODED;
/* (2) Data types
---------------------------------------------------------*/
/* (1) Basic JSON content type */
if( preg_match('/^application\/json/i', $pContentType) )
return self::CT_JSON;
/* (2) Basic YAML content type */
if( preg_match('/^application\/yaml/i', $pContentType) )
return self::CT_YAML;
/* (3) Basic TEXT content type */
if( preg_match('/text\/[a-z]+/', $pContentType) )
return self::CT_TEXT;
/* (3) Default Type
---------------------------------------------------------*/
return self::CT_BINARY;
}
/* PARSES BODY DATA
*
*/
private function parseBody(){
/* [1] If empty body -> do nothing
=========================================================*/
if( strlen($this->body) === 0 )
return true;
/* [2] Management for each ContentType
=========================================================*/
switch($this->type){
/* (1) multipart/form-data -> parse for not-POST methods
---------------------------------------------------------*/
case self::CT_MULTIPART_FORM_DATA:
/* (1) Fetch the boundary */
if( !preg_match('/boundary=(.+)$/i', $this->headers['Content-Type'], $match) )
return false;
$boundary = $match[1];
/* (2) Break body into parts */
$splitter = "/(?:\n|\r\n|--)*$boundary(?:\n|\r\n|--)?/im";
$parts = preg_split($splitter, $this->body);
/* (3) Process parts */
foreach($parts as $part)
if( preg_match('/^Content\-Disposition: form\-data; name=\"([^"]+)\"(?:\n|\r\n){2}(.+)$/mi', $part, $match) )
$this->postdata[$match[1]] = $match[2];
/* (4) Erases body */
$this->body = '';
break;
/* (2) application/x-www-form-urlencoded -> parse for not-POST methods
---------------------------------------------------------*/
case self::CT_X_WWW_FORM_URLENCODED:
/* Auto parse builtin-php function */
parse_str($this->body, $this->postdata);
/* Erases body */
$this->body = '';
break;
/* (3) application/json -> parse if no error
---------------------------------------------------------*/
case self::CT_JSON:
/* (1) Decode body content */
$decoded = json_decode($this->body, true);
/* (2) If error -> do nothing */
if( is_null($decoded) )
return;
/* (3) Parse body into body */
$this->body = $decoded;
break;
/* (4) application/yaml -> parse if no error
---------------------------------------------------------*/
case self::CT_YAML:
break;
}
}
public function BODY(){ return $this->body; }
public function POST(){ return $this->postdata; }
public function GET(){ return $this->getdata; }
public function HEADERS(){ return $this->headers; }
public function METHOD(){ return $this->method; }
public function URI(){ return $this->uri; }
}

View File

@ -1,86 +0,0 @@
{"id":16,"name":"contact-x","sexe":"1","age":"6","studies2":"1","reltype":"1","dist":"1","job":"12","famsit":"1","city":"35","cp":"10025","quartier":"25","duration":["25","125"],"context":"11","contextExtra":["internet","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"0","irlfreq":["1","6","11","16","21"],"relmark":"0","medrel":"1"}
{"id":17,"name":"contact-1","sexe":"0","age":"6","studies2":"6","reltype":"6","dist":"2","job":"6","famsit":"2","city":"16","cp":"10006","quartier":"6","duration":["6","16"],"context":"6","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"1","irlfreq":["2","7","12","17","22"],"relmark":"1","medrel":"0"}
{"id":18,"name":"contact-2","sexe":"1","age":"7","studies2":"7","reltype":"autre","dist":"3","job":"7","famsit":"3","city":"17","cp":"10007","quartier":"7","duration":["7","17"],"context":"7","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"2","irlfreq":["3","8","13","18","23"],"relmark":"2","medrel":"1"}
{"id":19,"name":"contact-3","sexe":"2","age":"8","studies2":"0","reltype":"0","dist":"0","job":"8","famsit":"0","city":"18","cp":"10008","quartier":"8","duration":["8","18"],"context":"8","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"3","irlfreq":["0","5","10","15","20"],"relmark":"3","medrel":"2"}
{"id":20,"name":"contact-4","sexe":"0","age":"9","studies2":"1","reltype":"1","dist":"1","job":"9","famsit":"1","city":"19","cp":"10009","quartier":"9","duration":["9","19"],"context":"9","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"4","irlfreq":["1","6","11","16","21"],"relmark":"4","medrel":"0"}
{"id":21,"name":"contact-5","sexe":"1","age":"10","studies2":"2","reltype":"2","dist":"2","job":"10","famsit":"2","city":"20","cp":"10010","quartier":"10","duration":["10","110"],"context":"10","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"0","irlfreq":["2","7","12","17","22"],"relmark":"0","medrel":"1"}
{"id":22,"name":"contact-6","sexe":"2","age":"11","studies2":"3","reltype":"3","dist":"3","job":"11","famsit":"3","city":"21","cp":"10011","quartier":"11","duration":["11","111"],"context":"11","contextExtra":["internet","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"1","irlfreq":["3","8","13","18","23"],"relmark":"1","medrel":"2"}
{"id":23,"name":"contact-7","sexe":"0","age":"12","studies2":"4","reltype":"4","dist":"0","job":"12","famsit":"0","city":"22","cp":"10012","quartier":"12","duration":["12","112"],"context":"12","contextExtra":["","association",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"2","irlfreq":["0","5","10","15","20"],"relmark":"2","medrel":"0"}
{"id":24,"name":"contact-8","sexe":"1","age":"13","studies2":"5","reltype":"5","dist":"1","job":"0","famsit":"1","city":"23","cp":"10013","quartier":"13","duration":["13","113"],"context":"13","contextExtra":["","","autre"],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"3","irlfreq":["1","6","11","16","21"],"relmark":"3","medrel":"1"}
{"id":25,"name":"contact-9","sexe":"2","age":"14","studies2":"6","reltype":"6","dist":"2","job":"1","famsit":"2","city":"24","cp":"10014","quartier":"14","duration":["14","114"],"context":"0","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"4","irlfreq":["2","7","12","17","22"],"relmark":"4","medrel":"2"}
{"id":26,"name":"contact-10","sexe":"0","age":"15","studies2":"7","reltype":"autre","dist":"3","job":"2","famsit":"3","city":"25","cp":"10015","quartier":"15","duration":["15","115"],"context":"1","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"0","irlfreq":["3","8","13","18","23"],"relmark":"0","medrel":"0"}
{"id":27,"name":"contact-11","sexe":"1","age":"16","studies2":"0","reltype":"0","dist":"0","job":"3","famsit":"0","city":"26","cp":"10016","quartier":"16","duration":["16","116"],"context":"2","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"1","irlfreq":["0","5","10","15","20"],"relmark":"1","medrel":"1"}
{"id":28,"name":"contact-12","sexe":"2","age":"17","studies2":"1","reltype":"1","dist":"1","job":"4","famsit":"1","city":"27","cp":"10017","quartier":"17","duration":["17","117"],"context":"3","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"2","irlfreq":["1","6","11","16","21"],"relmark":"2","medrel":"2"}
{"id":29,"name":"contact-13","sexe":"0","age":"18","studies2":"2","reltype":"2","dist":"2","job":"5","famsit":"2","city":"28","cp":"10018","quartier":"18","duration":["18","118"],"context":"4","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"3","irlfreq":["2","7","12","17","22"],"relmark":"3","medrel":"0"}
{"id":30,"name":"contact-14","sexe":"1","age":"0","studies2":"3","reltype":"3","dist":"3","job":"6","famsit":"3","city":"29","cp":"10019","quartier":"19","duration":["19","119"],"context":"5","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"4","irlfreq":["3","8","13","18","23"],"relmark":"4","medrel":"1"}
{"id":31,"name":"contact-15","sexe":"2","age":"1","studies2":"4","reltype":"4","dist":"0","job":"7","famsit":"0","city":"30","cp":"10020","quartier":"20","duration":["20","120"],"context":"6","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"0","irlfreq":["0","5","10","15","20"],"relmark":"0","medrel":"2"}
{"id":32,"name":"contact-16","sexe":"0","age":"2","studies2":"5","reltype":"5","dist":"1","job":"8","famsit":"1","city":"31","cp":"10021","quartier":"21","duration":["21","121"],"context":"7","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"1","irlfreq":["1","6","11","16","21"],"relmark":"1","medrel":"0"}
{"id":33,"name":"contact-17","sexe":"1","age":"3","studies2":"6","reltype":"6","dist":"2","job":"9","famsit":"2","city":"32","cp":"10022","quartier":"22","duration":["22","122"],"context":"8","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"2","irlfreq":["2","7","12","17","22"],"relmark":"2","medrel":"1"}
{"id":34,"name":"contact-18","sexe":"2","age":"4","studies2":"7","reltype":"autre","dist":"3","job":"10","famsit":"3","city":"33","cp":"10023","quartier":"23","duration":["23","123"],"context":"9","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"3","irlfreq":["3","8","13","18","23"],"relmark":"3","medrel":"2"}
{"id":35,"name":"contact-19","sexe":"0","age":"5","studies2":"0","reltype":"0","dist":"0","job":"11","famsit":"0","city":"34","cp":"10024","quartier":"24","duration":["24","124"],"context":"10","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"4","irlfreq":["0","5","10","15","20"],"relmark":"4","medrel":"0"}
{"id":37,"name":"contact-21","sexe":"2","age":"7","studies2":"2","reltype":"2","dist":"2","job":"0","famsit":"2","city":"36","cp":"10026","quartier":"26","duration":["26","126"],"context":"12","contextExtra":["","association",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"1","irlfreq":["2","7","12","17","22"],"relmark":"1","medrel":"2"}
{"id":38,"name":"contact-22","sexe":"0","age":"8","studies2":"3","reltype":"3","dist":"3","job":"1","famsit":"3","city":"37","cp":"10027","quartier":"27","duration":["27","127"],"context":"13","contextExtra":["","","autre"],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"2","irlfreq":["3","8","13","18","23"],"relmark":"2","medrel":"0"}
{"id":39,"name":"contact-23","sexe":"1","age":"9","studies2":"4","reltype":"4","dist":"0","job":"2","famsit":"0","city":"38","cp":"10028","quartier":"28","duration":["28","128"],"context":"0","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"3","irlfreq":["0","5","10","15","20"],"relmark":"3","medrel":"1"}
{"id":40,"name":"contact-24","sexe":"2","age":"10","studies2":"5","reltype":"5","dist":"1","job":"3","famsit":"1","city":"39","cp":"10029","quartier":"29","duration":["29","129"],"context":"1","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"4","irlfreq":["1","6","11","16","21"],"relmark":"4","medrel":"2"}
{"id":41,"name":"contact-25","sexe":"0","age":"11","studies2":"6","reltype":"6","dist":"2","job":"4","famsit":"2","city":"40","cp":"10030","quartier":"30","duration":["30","130"],"context":"2","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"0","irlfreq":["2","7","12","17","22"],"relmark":"0","medrel":"0"}
{"id":42,"name":"contact-26","sexe":"1","age":"12","studies2":"7","reltype":"autre","dist":"3","job":"5","famsit":"3","city":"41","cp":"10031","quartier":"31","duration":["31","131"],"context":"3","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"1","irlfreq":["3","8","13","18","23"],"relmark":"1","medrel":"1"}
{"id":43,"name":"contact-27","sexe":"2","age":"13","studies2":"0","reltype":"0","dist":"0","job":"6","famsit":"0","city":"42","cp":"10032","quartier":"32","duration":["32","132"],"context":"4","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"2","irlfreq":["0","5","10","15","20"],"relmark":"2","medrel":"2"}
{"id":44,"name":"contact-28","sexe":"0","age":"14","studies2":"1","reltype":"1","dist":"1","job":"7","famsit":"1","city":"43","cp":"10033","quartier":"33","duration":["33","133"],"context":"5","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"3","irlfreq":["1","6","11","16","21"],"relmark":"3","medrel":"0"}
{"id":45,"name":"contact-29","sexe":"1","age":"15","studies2":"2","reltype":"2","dist":"2","job":"8","famsit":"2","city":"44","cp":"10034","quartier":"34","duration":["34","134"],"context":"6","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"4","irlfreq":["2","7","12","17","22"],"relmark":"4","medrel":"1"}
{"id":46,"name":"contact-30","sexe":"2","age":"16","studies2":"3","reltype":"3","dist":"3","job":"9","famsit":"3","city":"45","cp":"10035","quartier":"35","duration":["35","135"],"context":"7","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"0","irlfreq":["3","8","13","18","23"],"relmark":"0","medrel":"2"}
{"id":47,"name":"contact-31","sexe":"0","age":"17","studies2":"4","reltype":"4","dist":"0","job":"10","famsit":"0","city":"46","cp":"10036","quartier":"36","duration":["36","136"],"context":"8","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"1","irlfreq":["0","5","10","15","20"],"relmark":"1","medrel":"0"}
{"id":48,"name":"contact-32","sexe":"1","age":"18","studies2":"5","reltype":"5","dist":"1","job":"11","famsit":"1","city":"47","cp":"10037","quartier":"37","duration":["37","137"],"context":"9","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"2","irlfreq":["1","6","11","16","21"],"relmark":"2","medrel":"1"}
{"id":49,"name":"contact-33","sexe":"2","age":"0","studies2":"6","reltype":"6","dist":"2","job":"12","famsit":"2","city":"48","cp":"10038","quartier":"38","duration":["38","138"],"context":"10","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"3","irlfreq":["2","7","12","17","22"],"relmark":"3","medrel":"2"}
{"id":50,"name":"contact-34","sexe":"0","age":"1","studies2":"7","reltype":"autre","dist":"3","job":"0","famsit":"3","city":"49","cp":"10039","quartier":"39","duration":["39","139"],"context":"11","contextExtra":["internet","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"4","irlfreq":["3","8","13","18","23"],"relmark":"4","medrel":"0"}
{"id":51,"name":"contact-35","sexe":"1","age":"2","studies2":"0","reltype":"0","dist":"0","job":"1","famsit":"0","city":"50","cp":"10040","quartier":"40","duration":["40","140"],"context":"12","contextExtra":["","association",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"0","irlfreq":["0","5","10","15","20"],"relmark":"0","medrel":"1"}
{"id":52,"name":"contact-36","sexe":"2","age":"3","studies2":"1","reltype":"1","dist":"1","job":"2","famsit":"1","city":"51","cp":"10041","quartier":"41","duration":["41","141"],"context":"13","contextExtra":["","","autre"],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"1","irlfreq":["1","6","11","16","21"],"relmark":"1","medrel":"2"}
{"id":53,"name":"contact-37","sexe":"0","age":"4","studies2":"2","reltype":"2","dist":"2","job":"3","famsit":"2","city":"52","cp":"10042","quartier":"42","duration":["42","142"],"context":"0","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"2","irlfreq":["2","7","12","17","22"],"relmark":"2","medrel":"0"}
{"id":54,"name":"contact-38","sexe":"1","age":"5","studies2":"3","reltype":"3","dist":"3","job":"4","famsit":"3","city":"53","cp":"10043","quartier":"43","duration":["43","143"],"context":"1","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"3","irlfreq":["3","8","13","18","23"],"relmark":"3","medrel":"1"}
{"id":55,"name":"contact-39","sexe":"2","age":"6","studies2":"4","reltype":"4","dist":"0","job":"5","famsit":"0","city":"54","cp":"10044","quartier":"44","duration":["44","144"],"context":"2","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"4","irlfreq":["0","5","10","15","20"],"relmark":"4","medrel":"2"}
{"id":57,"name":"contact-41","sexe":"1","age":"","studies1":"2","reltype":"1","dist":"0"}
{"id":58,"name":"contact-42","sexe":"0","age":"2","studies1":"3","reltype":"2","dist":"1"}
{"id":59,"name":"contact-43","sexe":"1","age":"3","studies1":"4","reltype":"3","dist":"2"}
{"id":60,"name":"contact-44","sexe":"0","age":"4","studies1":"5","reltype":"4","dist":"3"}
{"id":63,"name":"contact-x","sexe":"1","age":"6","studies2":"1","reltype":"1","dist":"1","job":"12","famsit":"1","city":"35","cp":"10025","quartier":"25","duration":["25","125"],"context":"11","contextExtra":["internet","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"0","irlfreq":["1","6","11","16","21"],"relmark":"0","medrel":"1"}
{"id":64,"name":"contact-1","sexe":"0","age":"6","studies2":"6","reltype":"6","dist":"2","job":"6","famsit":"2","city":"16","cp":"10006","quartier":"6","duration":["6","16"],"context":"6","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"1","irlfreq":["2","7","12","17","22"],"relmark":"1","medrel":"0"}
{"id":65,"name":"contact-2","sexe":"1","age":"7","studies2":"7","reltype":"autre","dist":"3","job":"7","famsit":"3","city":"17","cp":"10007","quartier":"7","duration":["7","17"],"context":"7","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"2","irlfreq":["3","8","13","18","23"],"relmark":"2","medrel":"1"}
{"id":66,"name":"contact-3","sexe":"2","age":"8","studies2":"0","reltype":"0","dist":"0","job":"8","famsit":"0","city":"18","cp":"10008","quartier":"8","duration":["8","18"],"context":"8","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"3","irlfreq":["0","5","10","15","20"],"relmark":"3","medrel":"2"}
{"id":67,"name":"contact-4","sexe":"0","age":"9","studies2":"1","reltype":"1","dist":"1","job":"9","famsit":"1","city":"19","cp":"10009","quartier":"9","duration":["9","19"],"context":"9","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"4","irlfreq":["1","6","11","16","21"],"relmark":"4","medrel":"0"}
{"id":68,"name":"contact-5","sexe":"1","age":"10","studies2":"2","reltype":"2","dist":"2","job":"10","famsit":"2","city":"20","cp":"10010","quartier":"10","duration":["10","110"],"context":"10","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"0","irlfreq":["2","7","12","17","22"],"relmark":"0","medrel":"1"}
{"id":69,"name":"contact-6","sexe":"2","age":"11","studies2":"3","reltype":"3","dist":"3","job":"11","famsit":"3","city":"21","cp":"10011","quartier":"11","duration":["11","111"],"context":"11","contextExtra":["internet","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"1","irlfreq":["3","8","13","18","23"],"relmark":"1","medrel":"2"}
{"id":70,"name":"contact-7","sexe":"0","age":"12","studies2":"4","reltype":"4","dist":"0","job":"12","famsit":"0","city":"22","cp":"10012","quartier":"12","duration":["12","112"],"context":"12","contextExtra":["","association",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"2","irlfreq":["0","5","10","15","20"],"relmark":"2","medrel":"0"}
{"id":71,"name":"contact-8","sexe":"1","age":"13","studies2":"5","reltype":"5","dist":"1","job":"0","famsit":"1","city":"23","cp":"10013","quartier":"13","duration":["13","113"],"context":"13","contextExtra":["","","autre"],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"3","irlfreq":["1","6","11","16","21"],"relmark":"3","medrel":"1"}
{"id":72,"name":"contact-9","sexe":"2","age":"14","studies2":"6","reltype":"6","dist":"2","job":"1","famsit":"2","city":"24","cp":"10014","quartier":"14","duration":["14","114"],"context":"0","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"4","irlfreq":["2","7","12","17","22"],"relmark":"4","medrel":"2"}
{"id":73,"name":"contact-10","sexe":"0","age":"15","studies2":"7","reltype":"autre","dist":"3","job":"2","famsit":"3","city":"25","cp":"10015","quartier":"15","duration":["15","115"],"context":"1","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"0","irlfreq":["3","8","13","18","23"],"relmark":"0","medrel":"0"}
{"id":74,"name":"contact-11","sexe":"1","age":"16","studies2":"0","reltype":"0","dist":"0","job":"3","famsit":"0","city":"26","cp":"10016","quartier":"16","duration":["16","116"],"context":"2","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"1","irlfreq":["0","5","10","15","20"],"relmark":"1","medrel":"1"}
{"id":75,"name":"contact-12","sexe":"2","age":"17","studies2":"1","reltype":"1","dist":"1","job":"4","famsit":"1","city":"27","cp":"10017","quartier":"17","duration":["17","117"],"context":"3","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"2","irlfreq":["1","6","11","16","21"],"relmark":"2","medrel":"2"}
{"id":76,"name":"contact-13","sexe":"0","age":"18","studies2":"2","reltype":"2","dist":"2","job":"5","famsit":"2","city":"28","cp":"10018","quartier":"18","duration":["18","118"],"context":"4","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"3","irlfreq":["2","7","12","17","22"],"relmark":"3","medrel":"0"}
{"id":77,"name":"contact-14","sexe":"1","age":"0","studies2":"3","reltype":"3","dist":"3","job":"6","famsit":"3","city":"29","cp":"10019","quartier":"19","duration":["19","119"],"context":"5","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"4","irlfreq":["3","8","13","18","23"],"relmark":"4","medrel":"1"}
{"id":78,"name":"contact-15","sexe":"2","age":"1","studies2":"4","reltype":"4","dist":"0","job":"7","famsit":"0","city":"30","cp":"10020","quartier":"20","duration":["20","120"],"context":"6","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"0","irlfreq":["0","5","10","15","20"],"relmark":"0","medrel":"2"}
{"id":79,"name":"contact-16","sexe":"0","age":"2","studies2":"5","reltype":"5","dist":"1","job":"8","famsit":"1","city":"31","cp":"10021","quartier":"21","duration":["21","121"],"context":"7","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"1","irlfreq":["1","6","11","16","21"],"relmark":"1","medrel":"0"}
{"id":80,"name":"contact-17","sexe":"1","age":"3","studies2":"6","reltype":"6","dist":"2","job":"9","famsit":"2","city":"32","cp":"10022","quartier":"22","duration":["22","122"],"context":"8","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"2","irlfreq":["2","7","12","17","22"],"relmark":"2","medrel":"1"}
{"id":81,"name":"contact-18","sexe":"2","age":"4","studies2":"7","reltype":"autre","dist":"3","job":"10","famsit":"3","city":"33","cp":"10023","quartier":"23","duration":["23","123"],"context":"9","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"3","irlfreq":["3","8","13","18","23"],"relmark":"3","medrel":"2"}
{"id":82,"name":"contact-19","sexe":"0","age":"5","studies2":"0","reltype":"0","dist":"0","job":"11","famsit":"0","city":"34","cp":"10024","quartier":"24","duration":["24","124"],"context":"10","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"4","irlfreq":["0","5","10","15","20"],"relmark":"4","medrel":"0"}
{"id":84,"name":"contact-21","sexe":"2","age":"7","studies2":"2","reltype":"2","dist":"2","job":"0","famsit":"2","city":"36","cp":"10026","quartier":"26","duration":["26","126"],"context":"12","contextExtra":["","association",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"1","irlfreq":["2","7","12","17","22"],"relmark":"1","medrel":"2"}
{"id":85,"name":"contact-22","sexe":"0","age":"8","studies2":"3","reltype":"3","dist":"3","job":"1","famsit":"3","city":"37","cp":"10027","quartier":"27","duration":["27","127"],"context":"13","contextExtra":["","","autre"],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"2","irlfreq":["3","8","13","18","23"],"relmark":"2","medrel":"0"}
{"id":86,"name":"contact-23","sexe":"1","age":"9","studies2":"4","reltype":"4","dist":"0","job":"2","famsit":"0","city":"38","cp":"10028","quartier":"28","duration":["28","128"],"context":"0","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"3","irlfreq":["0","5","10","15","20"],"relmark":"3","medrel":"1"}
{"id":87,"name":"contact-24","sexe":"2","age":"10","studies2":"5","reltype":"5","dist":"1","job":"3","famsit":"1","city":"39","cp":"10029","quartier":"29","duration":["29","129"],"context":"1","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"4","irlfreq":["1","6","11","16","21"],"relmark":"4","medrel":"2"}
{"id":88,"name":"contact-25","sexe":"0","age":"11","studies2":"6","reltype":"6","dist":"2","job":"4","famsit":"2","city":"40","cp":"10030","quartier":"30","duration":["30","130"],"context":"2","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"0","irlfreq":["2","7","12","17","22"],"relmark":"0","medrel":"0"}
{"id":89,"name":"contact-26","sexe":"1","age":"12","studies2":"7","reltype":"autre","dist":"3","job":"5","famsit":"3","city":"41","cp":"10031","quartier":"31","duration":["31","131"],"context":"3","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"1","irlfreq":["3","8","13","18","23"],"relmark":"1","medrel":"1"}
{"id":90,"name":"contact-27","sexe":"2","age":"13","studies2":"0","reltype":"0","dist":"0","job":"6","famsit":"0","city":"42","cp":"10032","quartier":"32","duration":["32","132"],"context":"4","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"2","irlfreq":["0","5","10","15","20"],"relmark":"2","medrel":"2"}
{"id":91,"name":"contact-28","sexe":"0","age":"14","studies2":"1","reltype":"1","dist":"1","job":"7","famsit":"1","city":"43","cp":"10033","quartier":"33","duration":["33","133"],"context":"5","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"3","irlfreq":["1","6","11","16","21"],"relmark":"3","medrel":"0"}
{"id":92,"name":"contact-29","sexe":"1","age":"15","studies2":"2","reltype":"2","dist":"2","job":"8","famsit":"2","city":"44","cp":"10034","quartier":"34","duration":["34","134"],"context":"6","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"4","irlfreq":["2","7","12","17","22"],"relmark":"4","medrel":"1"}
{"id":93,"name":"contact-30","sexe":"2","age":"16","studies2":"3","reltype":"3","dist":"3","job":"9","famsit":"3","city":"45","cp":"10035","quartier":"35","duration":["35","135"],"context":"7","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"0","irlfreq":["3","8","13","18","23"],"relmark":"0","medrel":"2"}
{"id":94,"name":"contact-31","sexe":"0","age":"17","studies2":"4","reltype":"4","dist":"0","job":"10","famsit":"0","city":"46","cp":"10036","quartier":"36","duration":["36","136"],"context":"8","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"1","irlfreq":["0","5","10","15","20"],"relmark":"1","medrel":"0"}
{"id":95,"name":"contact-32","sexe":"1","age":"18","studies2":"5","reltype":"5","dist":"1","job":"11","famsit":"1","city":"47","cp":"10037","quartier":"37","duration":["37","137"],"context":"9","contextExtra":["","",""],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"2","irlfreq":["1","6","11","16","21"],"relmark":"2","medrel":"1"}
{"id":96,"name":"contact-33","sexe":"2","age":"0","studies2":"6","reltype":"6","dist":"2","job":"12","famsit":"2","city":"48","cp":"10038","quartier":"38","duration":["38","138"],"context":"10","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"3","irlfreq":["2","7","12","17","22"],"relmark":"3","medrel":"2"}
{"id":97,"name":"contact-34","sexe":"0","age":"1","studies2":"7","reltype":"autre","dist":"3","job":"0","famsit":"3","city":"49","cp":"10039","quartier":"39","duration":["39","139"],"context":"11","contextExtra":["internet","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"4","irlfreq":["3","8","13","18","23"],"relmark":"4","medrel":"0"}
{"id":98,"name":"contact-35","sexe":"1","age":"2","studies2":"0","reltype":"0","dist":"0","job":"1","famsit":"0","city":"50","cp":"10040","quartier":"40","duration":["40","140"],"context":"12","contextExtra":["","association",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"0","irlfreq":["0","5","10","15","20"],"relmark":"0","medrel":"1"}
{"id":99,"name":"contact-36","sexe":"2","age":"3","studies2":"1","reltype":"1","dist":"1","job":"2","famsit":"1","city":"51","cp":"10041","quartier":"41","duration":["41","141"],"context":"13","contextExtra":["","","autre"],"freq":["1","6","11","16","21"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"1","interest":"1","irlfreq":["1","6","11","16","21"],"relmark":"1","medrel":"2"}
{"id":100,"name":"contact-37","sexe":"0","age":"4","studies2":"2","reltype":"2","dist":"2","job":"3","famsit":"2","city":"52","cp":"10042","quartier":"42","duration":["42","142"],"context":"0","contextExtra":["","",""],"freq":["2","7","12","17","22"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"2","interest":"2","irlfreq":["2","7","12","17","22"],"relmark":"2","medrel":"0"}
{"id":101,"name":"contact-38","sexe":"1","age":"5","studies2":"3","reltype":"3","dist":"3","job":"4","famsit":"3","city":"53","cp":"10043","quartier":"43","duration":["43","143"],"context":"1","contextExtra":["","",""],"freq":["3","8","13","18","23"],"connect":["1","3","5","7","9","11"],"connectExtra":["",""],"medsoc":"3","interest":"3","irlfreq":["3","8","13","18","23"],"relmark":"3","medrel":"1"}
{"id":102,"name":"contact-39","sexe":"2","age":"6","studies2":"4","reltype":"4","dist":"0","job":"5","famsit":"0","city":"54","cp":"10044","quartier":"44","duration":["44","144"],"context":"2","contextExtra":["","",""],"freq":["0","5","10","15","20"],"connect":["0","2","4","6","8","10"],"connectExtra":["",""],"medsoc":"0","interest":"4","irlfreq":["0","5","10","15","20"],"relmark":"4","medrel":"2"}
{"id":104,"name":"contact-41","sexe":"1","age":"","studies1":"2","reltype":"1","dist":"0"}
{"id":105,"name":"contact-42","sexe":"0","age":"2","studies1":"3","reltype":"2","dist":"1"}
{"id":106,"name":"contact-43","sexe":"1","age":"3","studies1":"4","reltype":"3","dist":"2"}
{"id":107,"name":"contact-44","sexe":"0","age":"4","studies1":"5","reltype":"4","dist":"3"}

View File

@ -1 +0,0 @@
{"16":{"line":0},"17":{"line":1},"18":{"line":2},"19":{"line":3},"20":{"line":4},"21":{"line":5},"22":{"line":6},"23":{"line":7},"24":{"line":8},"25":{"line":9},"26":{"line":10},"27":{"line":11},"28":{"line":12},"29":{"line":13},"30":{"line":14},"31":{"line":15},"32":{"line":16},"33":{"line":17},"34":{"line":18},"35":{"line":19},"37":{"line":20},"38":{"line":21},"39":{"line":22},"40":{"line":23},"41":{"line":24},"42":{"line":25},"43":{"line":26},"44":{"line":27},"45":{"line":28},"46":{"line":29},"47":{"line":30},"48":{"line":31},"49":{"line":32},"50":{"line":33},"51":{"line":34},"52":{"line":35},"53":{"line":36},"54":{"line":37},"55":{"line":38},"57":{"line":39},"58":{"line":40},"59":{"line":41},"60":{"line":42},"63":{"line":43},"64":{"line":44},"65":{"line":45},"66":{"line":46},"67":{"line":47},"68":{"line":48},"69":{"line":49},"70":{"line":50},"71":{"line":51},"72":{"line":52},"73":{"line":53},"74":{"line":54},"75":{"line":55},"76":{"line":56},"77":{"line":57},"78":{"line":58},"79":{"line":59},"80":{"line":60},"81":{"line":61},"82":{"line":62},"84":{"line":63},"85":{"line":64},"86":{"line":65},"87":{"line":66},"88":{"line":67},"89":{"line":68},"90":{"line":69},"91":{"line":70},"92":{"line":71},"93":{"line":72},"94":{"line":73},"95":{"line":74},"96":{"line":75},"97":{"line":76},"98":{"line":77},"99":{"line":78},"100":{"line":79},"101":{"line":80},"102":{"line":81},"104":{"line":82},"105":{"line":83},"106":{"line":84},"107":{"line":85}}

View File

@ -1,218 +0,0 @@
{
"logs": {
"direction": { "0": "INCOMING", "1": "OUTGOING", "2": "MISSED" },
"type": { "0": "PHONE", "1": "SMS" }
},
"questions": {
"sexe": { "x": "Civilité" },
"age": { "x": "Age" },
"studies1": { "x": "Niveau d'études maximal (fiche rapide)" },
"studies2": { "x": "Niveau d'études maximal (fiche complète)" },
"job": { "x": "Dernière profession exercée" },
"city": { "x": "Où habite t-elle/il ? (ville)" },
"cp": { "x": "Où habite t-elle/il ? (code postal)" },
"quartier": { "x": "Où habite t-elle/il ? (quartier)" },
"context": { "x": "Contexte de rencontre" },
"contextExtra": { "0": "Internet (quel contexte ? préciser)",
"1": "Par une association (quel type ? préciser)",
"2": "Autre" },
"famsit": { "x": "Situation familiale" },
"reltype": { "x": "Type de relation" },
"dist": { "x": "À combien de temps est-ce de chez vous (en voiture) ? (si deux domiciles, le plus proche)" },
"duration": { "0": "Depuis quand connaissez-vous cette personne ? (mois)",
"1": "Depuis quand connaissez-vous cette personne ? (années)" },
"freq": { "0": "Avec quelle fréquence discutez-vous avec cette personne face à face ?",
"1": "Avec quelle fréquence discutez-vous avec cette personne via téléphone ou skype et équivalent ?",
"2": "Avec quelle fréquence discutez-vous avec cette personne via SMS et équivalents ?",
"3": "Avec quelle fréquence discutez-vous avec cette personne via courrier éléctronique ?",
"4": "Avec quelle fréquence discutez-vous avec cette personne via facebook ou autre réseau social ?" },
"irlfreq": { "0": "Selon vous, à quelle fréquence cette personne publie des commentaires personnels ou réagit aux publications des autres ?",
"1": "Selon vous, à quelle fréquence cette personne publie des photos personnelles (profil, voyages, etc.) ?",
"2": "Selon vous, à quelle fréquence cette personne partage de la musique ou des clips musicaux ?",
"3": "Selon vous, à quelle fréquence cette personne partage des informations culturelles (concert, exposition, etc.) ?",
"4": "Selon vous, à quelle fréquence cette personne partage des articles, des informations, des contenus avec une portée politique ?" },
"connect": { "0": "Ses coordonnées sont dans votre carnet d'adresse",
"1": "Son numéro de mobile est enregistré sur votre mobile (ou vous-mêmes êtes sur le sien)",
"2": "Elle figure parmi vos amis facebook (idem)",
"3": "Elle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif régulièrement (idem)",
"4": "Vous le suivez sur Twitter (ou elle vous suit)",
"5": "Vous communiquez avec cette personne sur Twitter (idem)" },
"connectExtra": { "0": "Vous communiquez dans autre réseau",
"1": "Vous communiquez dans un autre dispositif (blogs, jeu vidéo ou autre)" },
"medsoc": { "x": "Comment cette personne utilise-t-elle les médias sociaux de votre point de vue ?" },
"medrel": { "x": "Considérez-vous que vos échange avec cette personne à travers les médias sociaux" },
"interest": { "x": "Sur une échelle de 1 à 5, préciser l'intérêt que vous accordez aux contenue qu'elle partage via les médias sociaux" },
"relmark": { "x": "Sur une échelle de 1 à 5, comment jugez-vous votre relation à cette personne ?" }
},
"contacts": {
"sexe": { "0":"Homme", "1":"Femme", "2":"Indéterminé" },
"age": {
".": "NA",
"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"
},
"studies1": {
".": "NA",
"0": "Inconnu",
"1": "< BAC",
"2": "BAC",
"3": "BAC+2",
"4": "BAC+3",
"5": "BAC+4 et plus"
},
"studies2": {
".": "NA",
"0": "Aucun diplôme, CEP, BEPC",
"1": "CAP, CAPA, BEP, BEPA, Brevet de compagnon, Diplômes sociaux (aide-soignante, auxiliaire de puériculture, travailleuse familiale)",
"2": "Bac technologique ou professionnel, brevet professionnel ou de technicien",
"3": "Baccalauréat général, brevet supérieur",
"4": "Diplôme universitaire de 1er cycle: Licence, BTS, DUT",
"5": "Diplôme universitaire de 2ème cycle : MASTER, Maîtrise ou DEA, CAPES",
"6": "Doctorat (y compris médecine, pharmacie, dentaire)",
"7": "Diplôme d'ingénieur, diplôme d'une grande école de commerce"
},
"job": {
".": "NA",
"0": "Agriculateur exploitants",
"1": "Artisans",
"2": "Commerçants et assimilés",
"3": "Chefs d'entreprise de 10 salariés ou plus",
"4": "Professions libérales et assimilés",
"5": "Cadres de la fonction publique, professions intellectuelles et artistiques",
"6": "Cadres d'entreprise",
"7": "Professions intermétiaires de l'enseignement, de la santé, de la fonction publique et assimilés",
"8": "Professions intermédiaires administratives et commerciales des entreprises",
"9": "Techniciens",
"10": "Contremaîtres, agents de maîtrise",
"11": "Employés",
"12": "Ouvriers"
},
"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 dautres 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)",
"2": "En couple sans enfants",
"3": "En couple avec enfants"
},
"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 proche",
"7": "Ami",
"8": "Relation de service (médecin, ...)",
"9": "Inconnu"
},
"dist": {
".": "NA",
"0": "- de 5 minutes",
"1": "de 5 à 15 minutes",
"2": "de 15 à 60 minutes",
"3": "+ d'une heure"
},
"freq": {
"0": "plusieurs fois par semaine",
"1": "1 fois par semaine",
"2": "1 fois par mois",
"3": "1 fois par an ou moins",
"4": "Jamais"
},
"irlfreq": {
"0": "plusieurs fois par semaine",
"1": "1 fois par semaine",
"2": "1 fois par mois",
"3": "1 fois par an ou moins",
"4": "Jamais"
},
"connect": {
"0": "Oui",
"1": "Non"
},
"medsoc": {
"0": "D'une personne qui n'utilise pas ou peu les médias sociaux",
"1": "D'une personne qui consulte des publications mais partage peu de contenus",
"2": "D'une personne qui consulte des publication et partage des contenus de temps en temps",
"3": "D'une personne qui partage beaucoup de contenus et s'exprime fréquemment"
},
"medrel": {
"0": "N'ont aucun effet sur votre relation",
"1": "Vous ont rapproché d'elle",
"2": "Vous ont éloigné d'elle"
},
"interest": {
"0": "1",
"1": "2",
"2": "3",
"3": "4",
"4": "5"
},
"relmark": {
"0": "1",
"1": "2",
"2": "3",
"3": "4",
"4": "5"
}
},
"relations": {
"type": {
"0": "Aucune relation",
"1": "Relation alter-alter",
"2": "Relation cellulaire mineure",
"3": "Relation facebook mineure",
"4": "Top 10 des appels",
"5": "Top 10 des sms",
"6": "Top 10 de l'historique Facebook",
"7": "Top 10 de Facebook Messenger"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Contient les équivalences :
id_subject => {
"subject": [données du sujet]
"contact": [liste des id des contacts],
"relations": [liste des relations]
}

View File

@ -1 +0,0 @@
{"2":{"line":0},"4":{"line":1},"5":{"line":2},"6":{"line":3},"7":{"line":4},"8":{"line":5},"9":{"line":6},"10":{"line":7},"11":{"line":8},"12":{"line":9},"13":{"line":10},"14":{"line":11},"15":{"line":12},"1":{"line":13},"3":{"line":14}}

View File

@ -1 +0,0 @@
107

View File

@ -1,131 +0,0 @@
<?php
namespace manager;
class ManagerError{
/* SUCCESS */
const Success = 0;
/* Parsage json */
const ParsingFailed = 1;
/* ResourceDispatcher */
// Drapeaux invalides
const InvalidFlags = 2;
// Fichier inexistant
const UnreachableResource = 3;
/* ModuleRequest */
// Le @path n'est pas renseigne
const MissingPath = 4;
// Verification de la coherence du chemin (existe dans la conf)
const WrongPathModule = 5;
// Module non specifie dans la conf
const UnknownModule = 6;
// Methode non specifie pour ce Module dans la conf
const UnknownMethod = 7;
// Methode inamorcable
const UncallableMethod = 8;
// Erreur de parametre(s)
const ParamError = 9;
// Erreur dans le traitement
const ModuleError = 10;
/* Repo */
// Verification de la coherence du chemin (existe dans la conf)
const WrongPathRepo = 11;
// Module non specifie dans la conf
const UnknownRepo = 12;
// Erreur dans le traitement
const RepoError = 13;
/* Database */
// Erreur lors de la creation d'un objet PDO (connection)
const PDOConnection = 14;
/* API token */
// Token inexistant ou faux
const TokenError = 15;
const PermissionError = 16;
/* Erreur d'UPLOAD */
const UploadError = 17;
// Mauvais format de fichier
const FormatError = 18;
/* Erreur au niveau javascript */
//const JavascriptError = 19; // -> géré en js
// Already done error
const Already = 20;
/* EXPLICITE UN CODE D'ERREUR
*
* @error<Integer> Code d'erreur
*
* @return explicit<String> Description explicite du code d'erreur
*
*/
public static function explicit($error){
switch($error){
case self::Success: return "All right."; break;
case self::ParsingFailed: return "JSON/XML file format error."; break;
case self::InvalidFlags: return "Flags are incorrect."; break;
case self::UnreachableResource: return "Resource unreachable (404)."; break;
case self::MissingPath: return "Path missing."; break;
case self::WrongPathModule: return "Module path incorrect 'module/method'."; break;
case self::WrongPathRepo: return "Repository path incorrect 'repo/method'."; break;
case self::UnknownModule: return "Requested module not found."; break;
case self::UnknownRepo: return "Requested repository not found."; break;
case self::UnknownMethod: return "Requested method not found."; break;
case self::UncallableMethod: return "Cannot call requested method."; break;
case self::ParamError: return "Wrong or missing parameter(s)."; break;
case self::ModuleError: return "Module error."; break;
case self::RepoError: return "Repository error."; break;
case self::PDOConnection: return "Database connection failed."; break;
case self::TokenError: return "Access token wrong, missing or expired."; break;
case self::PermissionError: return "Not granted to do so."; break;
case self::UploadError: return "Upload error."; break;
case self::FormatError: return "Format error."; break;
case self::Already: return "Already done."; break;
default: return "Unknown debug error"; break;
}
// Erreur inconnue
return null;
}
public static function setHttpCode($error){
http_response_code( $error == self::Success ? 200 : 417 );
}
}
?>

View File

@ -1,852 +0,0 @@
{
"subject": {
"subject_id": "1"
},
"contacts": {
"0": {
"uid": 0,
"username": "Ismael",
"existing": ".",
"hash": 1627075103
},
"1": {
"uid": 1,
"username": "Rosa",
"existing": ".",
"hash": 498192491
},
"2": {
"uid": 2,
"username": "Judith",
"existing": ".",
"hash": 1451575763
},
"3": {
"uid": 3,
"username": "Alex",
"existing": ".",
"hash": 2660323475
},
"4": {
"uid": 4,
"username": "Adri",
"existing": ".",
"hash": 2559488290
},
"5": {
"uid": 5,
"username": "Fred",
"existing": ".",
"hash": 4039469544
},
"6": {
"uid": 6,
"username": "Shanone",
"existing": ".",
"hash": 28222849
},
"7": {
"uid": 7,
"username": "Manon",
"existing": ".",
"hash": 336712847
},
"8": {
"uid": 8,
"username": "Java",
"existing": ".",
"hash": 1359920097
},
"9": {
"uid": 9,
"username": "Thalees",
"existing": ".",
"hash": 2826325950
},
"10": {
"uid": 10,
"username": "Crème",
"existing": ".",
"hash": 4211503315
},
"11": {
"uid": 11,
"username": "Margaux",
"existing": ".",
"hash": 3915760272
},
"12": {
"uid": 12,
"username": "Anthony",
"existing": ".",
"hash": 410858384
},
"13": {
"uid": 13,
"username": "Lino",
"existing": ".",
"hash": 2457771762
}
},
"mini": {},
"fiches": {
"0": {
"sexe": "0",
"age": "0",
"job": "10",
"famsit": "0",
"studies": "",
"reltype": "0",
"reltypeSpecial": "",
"city": "10",
"quartier": "0",
"cp": "10000",
"loc": "0",
"duration": [
"0",
"10"
],
"context": "0",
"contextSpecial": [
"",
"",
""
],
"freq": [
"2",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 0,
"contact": 0,
"hash": 3977448909,
"valid": true,
"timestamp": 1478429171540
},
"1": {
"sexe": "1",
"age": "1",
"job": "21",
"famsit": "0",
"studies": "01",
"reltype": "1",
"reltypeSpecial": "",
"city": "11",
"quartier": "1",
"cp": "10001",
"loc": "1",
"duration": [
"1",
"11"
],
"context": "1",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 1,
"contact": 1,
"hash": 3439453096,
"valid": true,
"timestamp": 1478429171592
},
"2": {
"sexe": "2",
"age": "2",
"job": "22",
"famsit": "0",
"studies": "02",
"reltype": "2",
"reltypeSpecial": "",
"city": "12",
"quartier": "2",
"cp": "10002",
"loc": "2",
"duration": [
"2",
"12"
],
"context": "2",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 2,
"contact": 2,
"hash": 2538679406,
"valid": true,
"timestamp": 1478429171636
},
"3": {
"sexe": "0",
"age": "3",
"job": "23",
"famsit": "0",
"studies": "03",
"reltype": "3",
"reltypeSpecial": "",
"city": "13",
"quartier": "3",
"cp": "10003",
"loc": "3",
"duration": [
"3",
"13"
],
"context": "3",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 3,
"contact": 3,
"hash": 1448962210,
"valid": true,
"timestamp": 1478429171695
},
"4": {
"sexe": "1",
"age": "4",
"job": "31",
"famsit": "0",
"studies": "04",
"reltype": "4",
"reltypeSpecial": "",
"city": "14",
"quartier": "4",
"cp": "10004",
"loc": "0",
"duration": [
"4",
"14"
],
"context": "4",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 4,
"contact": 4,
"hash": 3000740570,
"valid": true,
"timestamp": 1478429171741
},
"5": {
"sexe": "2",
"age": "5",
"job": "32",
"famsit": "0",
"studies": "05",
"reltype": "5",
"reltypeSpecial": "",
"city": "15",
"quartier": "5",
"cp": "10005",
"loc": "1",
"duration": [
"5",
"15"
],
"context": "5",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 5,
"contact": 5,
"hash": 1185776066,
"valid": true,
"timestamp": 1478429171805
},
"6": {
"sexe": "0",
"age": "6",
"job": "36",
"famsit": "0",
"studies": "06",
"reltype": "6",
"reltypeSpecial": "",
"city": "16",
"quartier": "6",
"cp": "10006",
"loc": "2",
"duration": [
"6",
"16"
],
"context": "6",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 6,
"contact": 6,
"hash": 3580676315,
"valid": true,
"timestamp": 1478429171858
},
"7": {
"sexe": "1",
"age": "7",
"job": "41",
"famsit": "0",
"studies": "07",
"reltype": "7",
"reltypeSpecial": "",
"city": "17",
"quartier": "7",
"cp": "10007",
"loc": "3",
"duration": [
"7",
"17"
],
"context": "7",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 7,
"contact": 7,
"hash": 3989377397,
"valid": true,
"timestamp": 1478429171905
},
"8": {
"sexe": "2",
"age": "8",
"job": "46",
"famsit": "0",
"studies": "08",
"reltype": "10",
"reltypeSpecial": "autre",
"city": "18",
"quartier": "8",
"cp": "10008",
"loc": "0",
"duration": [
"8",
"18"
],
"context": "8",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 8,
"contact": 8,
"hash": 594979660,
"valid": true,
"timestamp": 1478429171955
},
"9": {
"sexe": "0",
"age": "9",
"job": "47",
"famsit": "0",
"studies": "09",
"reltype": "0",
"reltypeSpecial": "",
"city": "19",
"quartier": "9",
"cp": "10009",
"loc": "1",
"duration": [
"9",
"19"
],
"context": "9",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 9,
"contact": 9,
"hash": 1585642677,
"valid": true,
"timestamp": 1478429172030
},
"10": {
"sexe": "1",
"age": "10",
"job": "48",
"famsit": "0",
"studies": "10",
"reltype": "1",
"reltypeSpecial": "",
"city": "20",
"quartier": "10",
"cp": "10010",
"loc": "2",
"duration": [
"10",
"110"
],
"context": "10",
"contextSpecial": [
"",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 10,
"contact": 10,
"hash": 350296051,
"valid": true,
"timestamp": 1478429172091
},
"11": {
"sexe": "2",
"age": "11",
"job": "51",
"famsit": "0",
"studies": "11",
"reltype": "2",
"reltypeSpecial": "",
"city": "21",
"quartier": "11",
"cp": "10011",
"loc": "3",
"duration": [
"11",
"111"
],
"context": "11",
"contextSpecial": [
"internet",
"",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 11,
"contact": 11,
"hash": 2556603658,
"valid": true,
"timestamp": 1478429172141
},
"12": {
"sexe": "0",
"age": "12",
"job": "54",
"famsit": "0",
"studies": "",
"reltype": "3",
"reltypeSpecial": "",
"city": "22",
"quartier": "12",
"cp": "10012",
"loc": "0",
"duration": [
"12",
"112"
],
"context": "12",
"contextSpecial": [
"",
"association",
""
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 12,
"contact": 12,
"hash": 1254626617,
"valid": true,
"timestamp": 1478429172191
},
"13": {
"sexe": "1",
"age": "13",
"job": "55",
"famsit": "0",
"studies": "01",
"reltype": "4",
"reltypeSpecial": "",
"city": "23",
"quartier": "13",
"cp": "10013",
"loc": "1",
"duration": [
"13",
"113"
],
"context": "13",
"contextSpecial": [
"",
"",
"autre"
],
"freq": [
"4",
"9",
"14",
"19",
"24"
],
"connect": [
"1",
"3",
"5",
"7",
"9",
"11"
],
"connectSpecial": [
"",
""
],
"uid": 13,
"contact": 13,
"hash": 1821404092,
"valid": true,
"timestamp": 1478429175971
}
},
"matrice": {
"0": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"1": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"2": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"3": [
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"4": [
5,
6,
7,
8,
9,
10,
11,
12
],
"5": [
6,
7,
8,
9,
10,
11,
12
],
"6": [
7,
8,
9,
11,
12
],
"7": [
8,
9,
10,
11,
12
],
"8": [
9,
10,
11,
12
],
"9": [
10,
11,
12
],
"10": [
11
]
}
}

View File

@ -1,31 +0,0 @@
{
"default": {
"local": {
"host" : "localhost",
"dbname" : "nxtic",
"user" : "php",
"password" : "Qt358nUdyeTxLDM8"
},
"remote": {
"host" : "localhost",
"dbname" : "nxtic",
"user" : "nxtic-php",
"password" : "wxcvbn"
}
},
"lab-surveys": {
"local": {
"host" : "listic-lab-surveys.irit.fr",
"dbname" : "lab-surveys",
"user" : "lab-surveys",
"password" : "wxcvbn"
},
"remote": {
"host" : "listic-lab-surveys.irit.fr",
"dbname" : "lab-surveys",
"user" : "lab-surveys",
"password" : "wxcvbn"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +0,0 @@
{
"version": 3,
"file": "font.css",
"sources": [
"../font.scss"
],
"sourcesContent": [
"/* [1] Proxima Nova\n=========================================================*/\n@font-face {\n\tfont-family: 'Proxima Nova';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url('/css/fonts/proxima-nova/thin.eot');\n\tsrc: url('/css/fonts/proxima-nova/thin#iefix.eot') format(\"embedded-opentype\"),\n\t\t\turl('/css/fonts/proxima-nova/thin.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/proxima-nova/thin.ttf') format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Proxima Nova';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url('/css/fonts/proxima-nova/regular.eot');\n\tsrc: url('/css/fonts/proxima-nova/regular#iefix.eot') format(\"embedded-opentype\"),\n\t\t\turl('/css/fonts/proxima-nova/regular.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/proxima-nova/regular.ttf') format(\"truetype\");\n}\n\n\n/* [2] Icomoon\n=========================================================*/\n@font-face {\n\tfont-family: 'icomoon';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/icomoon/thin.eot\");\n\tsrc: url('/css/fonts/icomoon/thin.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/icomoon/thin.ttf') format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'icomoon';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/icomoon/regular.eot\");\n\tsrc: url('/css/fonts/icomoon/regular.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/icomoon/regular.ttf') format(\"truetype\");\n}\n\n\n\n/* [3] Open Sans\n=========================================================*/\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/opensans/light.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/opensans/lightitalic.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/opensans/regular.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: bold;\n\n\tsrc: url(\"/css/fonts/opensans/bold.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/opensans/italic.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: bold;\n\n\tsrc: url(\"/css/fonts/opensans/bolditalic.ttf\") format(\"truetype\");\n}\n\n\n/* [4] Inconsolata\n=========================================================*/\n@font-face {\n\tfont-family: 'Inconsolata';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/inconsolata/regular.otf\");\n}\n"
],
"mappings": "AAAA;2DAC2D;AAC3D,UAAU;EACT,WAAW,EAAE,cAAe;EAC5B,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,GAAI;EAEjB,GAAG,EAAE,uCAAG;EACR,GAAG,EAAK,6CAAG,CAA4C,2BAAM,EAC3D,wCAAG,CAA4C,cAAM,EACrD,uCAAG,CAA4C,kBAAM;;;AAGxD,UAAU;EACT,WAAW,EAAE,cAAe;EAC5B,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,MAAO;EAEpB,GAAG,EAAE,0CAAG;EACR,GAAG,EAAK,gDAAG,CAA+C,2BAAM,EAC9D,2CAAG,CAA+C,cAAM,EACxD,0CAAG,CAA+C,kBAAM;;;AAI3D;2DAC2D;AAC3D,UAAU;EACT,WAAW,EAAE,SAAU;EACvB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,GAAI;EAEjB,GAAG,EAAE,kCAAG;EACR,GAAG,EAAE,mCAAG,CAAuC,cAAM,EACnD,kCAAG,CAAuC,kBAAM;;;AAGnD,UAAU;EACT,WAAW,EAAE,SAAU;EACvB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,MAAO;EAEpB,GAAG,EAAE,qCAAG;EACR,GAAG,EAAE,sCAAG,CAA0C,cAAM,EACtD,qCAAG,CAA0C,kBAAM;;;AAKtD;2DAC2D;AAC3D,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,GAAI;EAEjB,GAAG,EAAE,oCAAG,CAAkC,kBAAM;;;AAGjD,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,GAAI;EAEjB,GAAG,EAAE,0CAAG,CAAwC,kBAAM;;;AAGvD,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,MAAO;EAEpB,GAAG,EAAE,sCAAG,CAAoC,kBAAM;;;AAGnD,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,IAAK;EAElB,GAAG,EAAE,mCAAG,CAAiC,kBAAM;;;AAGhD,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,MAAO;EAEpB,GAAG,EAAE,qCAAG,CAAmC,kBAAM;;;AAGlD,UAAU;EACT,WAAW,EAAE,WAAY;EACzB,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,IAAK;EAElB,GAAG,EAAE,yCAAG,CAAuC,kBAAM;;;AAItD;2DAC2D;AAC3D,UAAU;EACT,WAAW,EAAE,aAAc;EAC3B,UAAU,EAAE,MAAO;EACnB,WAAW,EAAE,MAAO;EAEpB,GAAG,EAAE,yCAAG",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,14 +0,0 @@
{
"version": 3,
"file": "header.css",
"sources": [
"../header.scss",
"../constants.scss"
],
"sourcesContent": [
"@import 'constants';\n\n\n#WRAPPER > #HEADER{\n\n\t/* [1] Barre de recherche\n\t=========================================================*/\n\t& > #searchbar{\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t\t\ttop: .8em;\n\t\t\tleft: 1em;\n\t\t\twidth: 20em;\n\t\t\theight: 2em;\n\n\t\tpadding: .2em 1em;\n\n\t\tborder: 0;\n\t\tborder-radius: 3px;\n\n\t\tbackground-color: $theme-bg;\n\n\t}\n\n\t/* [2] Informations utilisateur\n\t=========================================================*/\n\t/* (0) Conteneur */\n\t& > #user-data{\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\theight: calc( 100% - 2*1em );\n\n\n\t\t/* (1) Username de l'utilisateur */\n\t\t& > #user-name{\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tright: calc( #{$header-height}*2 - 1em );\n\t\t\t\theight: $header-height;\n\n\t\t\tpadding: 0 1em;\n\n\t\t\tcolor: #555;\n\t\t\tline-height: $header-height;\n\t\t\twhite-space: nowrap;\n\t\t\tfont-weight: bold;\n\n\t\t\tcursor: pointer;\n\n\t\t}\n\n\n\t\t/* (2) Image du profil */\n\t\t& > #user-picture{\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 1.5em;\n\t\t\t\tright: $header-height;\n\t\t\t\twidth: calc( #{$header-height} - 2*1.5em );\n\t\t\t\theight: calc( #{$header-height} - 2*1.5em );\n\n\n\t\t\tborder-radius: 50% / 50%;\n\n\t\t\tbackground-color: $theme-bg;\n\t\t\tbackground-size: auto 80%;\n\n\t\t\t// Si on est connecte\n\t\t\t&.active{\n\t\t\t\tbackground-color: $theme-fg-primary;\n\t\t\t}\n\n\t\t\tcursor: default;\n\n\t\t\talign-self: center;\n\t\t}\n\n\n\n\t\t/* (3) Icone d'activation */\n\t\t&:before{\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tright: 0;\n\t\t\t\twidth: $header-height;\n\t\t\t\theight: $header-height;\n\n\t\t\tbackground: url('/src/static/header/expand@000000.svg') center center no-repeat;\n\t\t\tbackground-size: 1em 1em;\n\n\t\t\tcursor: pointer;\n\n\t\t}\n\n\n\t}\n\n\n\n\t/* [3] Menu deroulant pour l'administration du profil\n\t=========================================================*/\n\t& > .user-panel{\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\t\ttop: calc( #{$header-height} - 1em );\n\t\t\tright: 0;\n\n\t\tmargin: .5em;\n\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid darken($theme-bg, 10);\n\n\t\tbackground-color: #fff;\n\n\t\t@include transition( left .3s ease-in-out );\n\n\n\t\t/* (1) Pour chaque element du menu */\n\t\t& > span{\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\n\t\t\t// On ajoute une ligne en dessous sauf pour le dernier\n\t\t\t&:not(:last-child){\n\t\t\t\tborder-bottom: 1px solid #ddd;\n\t\t\t}\n\n\t\t\tcolor: #000;\n\t\t\tpadding: .5em 1em;\n\t\t\tpadding-left: 2em;\n\n\t\t\tcursor: pointer;\n\n\t\t\t// @hover\n\t\t\t&:hover{\n\t\t\t\tbackground-color: #eee;\n\t\t\t}\n\t\t}\n\n\n\n\n\t}\n\n\t/* (3) Gestion de l'activation ou non de l'user panel */\n\t& > #toggle-user-panel{ display: none; }\n\t& > #toggle-user-panel + .user-panel{ left: 100%; }\n\t& > #toggle-user-panel:checked + .user-panel{ left: auto; }\n\t& > #toggle-user-panel:checked + .user-panel:before{ left: 7em; }\n\n\n\n\n\n\n}\n",
"/* [1] COULEURS\n=========================================================*/\n/* (1) COULEURS DU THEME $DEFAULT */\n$theme-bg: #e8e8e8;\n$theme-bg-primary: #ffffff;\n$theme-fg: #515151;\n$theme-fg-primary: #0e6dbf;\n\n/* (2) COULEURS DE THEME $DARK */\n$dark-bg: #313541;\n$dark-bg-primary: #29282e;\n$dark-fg: #939393;\n$dark-fg-primary: #ffffff;\n\n$header-dark: #F8F8FA;\n\n/* (3) Couleurs du theme pour la timeline */\n$timeline-color: #738394;\n$timeline-0: #0e6dbf;\n$timeline-1: #e64e3e;\n$timeline-2: #10ba72;\n$timeline-3: #b14be7;\n$timeline-4: #053b5d;\n\n\n\n/* [2] DIMENSIONS\n=========================================================*/\n/* (1) Layout de base */\n$menu-side-width: 15em;\n$header-height: 4em;\n\n\n\n/* [3] Mixins\n=========================================================*/\n@mixin transform($value...) {\n\ttransform: $value;\n\t-moz-transform: $value;\n\t-o-transform: $value;\n\t-ms-transform: $value;\n\t-webkit-transform: $value;\n}\n\n\n@mixin transition($value...) {\n\t-webkit-transition: $value;\n\ttransition: $value;\n}\n\n/* [4] Functions\n=========================================================*/\n// Transforme une couleur hex en string sans le #\n@function color-str($color){\n\t@return str-slice(#{$color}, 2, str-length(#{$color}));\n}\n"
],
"mappings": "ACAA;2DAC2D;AAC3D,oCAAoC;AAMpC,iCAAiC;AAQjC,4CAA4C;AAU5C;2DAC2D;AAC3D,wBAAwB;AAMxB;2DAC2D;AAe3D;2DAC2D;ADhD3D,AAAW,QAAH,GAAG,OAAO,CAAA;EAEjB;4DAC2D;EAkB3D;4DAC2D;EAC3D,mBAAmB;EA8EnB;4DAC2D;EA4C3D,wDAAwD;CAWxD;;AA7JD,AAIK,QAJG,GAAG,OAAO,GAIb,UAAU,CAAA;EACb,OAAO,EAAE,YAAa;EACtB,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,IAAK;EACV,IAAI,EAAE,GAAI;EACV,KAAK,EAAE,IAAK;EACZ,MAAM,EAAE,GAAI;EAEb,OAAO,EAAE,QAAS;EAElB,MAAM,EAAE,CAAE;EACV,aAAa,EAAE,GAAI;EAEnB,gBAAgB,ECjBC,OAAO;CDmBxB;;AAnBF,AAwBK,QAxBG,GAAG,OAAO,GAwBb,UAAU,CAAA;EACb,OAAO,EAAE,YAAa;EACtB,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,CAAE;EACP,KAAK,EAAE,CAAE;EACT,MAAM,EAAE,mBAAI;EAGb,mCAAmC;EAoBnC,yBAAyB;EA2BzB,4BAA4B;CAkB5B;;AAjGF,AAiCM,QAjCE,GAAG,OAAO,GAwBb,UAAU,GAST,UAAU,CAAA;EACb,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,CAAE;EACP,KAAK,EAAE,kBAAI;EACX,MAAM,ECXQ,GAAG;EDalB,OAAO,EAAE,KAAM;EAEf,KAAK,EAAE,IAAK;EACZ,WAAW,EChBI,GAAG;EDiBlB,WAAW,EAAE,MAAO;EACpB,WAAW,EAAE,IAAK;EAElB,MAAM,EAAE,OAAQ;CAEhB;;AAjDH,AAqDM,QArDE,GAAG,OAAO,GAwBb,UAAU,GA6BT,aAAa,CAAA;EAChB,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,KAAM;EACX,KAAK,EC9BS,GAAG;ED+BjB,KAAK,EAAE,oBAAI;EACX,MAAM,EAAE,oBAAI;EAGb,aAAa,EAAE,SAAU;EAEzB,gBAAgB,EChEA,OAAO;EDiEvB,eAAe,EAAE,QAAS;EAO1B,MAAM,EAAE,OAAQ;EAEhB,UAAU,EAAE,MAAO;CACnB;;AA3EH,AAqDM,QArDE,GAAG,OAAO,GAwBb,UAAU,GA6BT,aAAa,AAef,OAAO,CAAA;EACP,gBAAgB,EClED,OAAO;CDmEtB;;AAtEJ,AAwBK,QAxBG,GAAG,OAAO,GAwBb,UAAU,AAwDZ,OAAO,CAAA;EACP,OAAO,EAAE,EAAG;EACZ,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,CAAE;EACP,KAAK,EAAE,CAAE;EACT,KAAK,EC3DS,GAAG;ED4DjB,MAAM,EC5DQ,GAAG;ED8DlB,UAAU,EAAE,2CAAG,CAAyC,MAAM,CAAC,MAAM,CAAC,SAAS;EAC/E,eAAe,EAAE,OAAQ;EAEzB,MAAM,EAAE,OAAQ;CAEhB;;AA9FH,AAuGK,QAvGG,GAAG,OAAO,GAuGb,WAAW,CAAA;EACd,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,gBAAI;EACT,KAAK,EAAE,CAAE;EAEV,MAAM,EAAE,IAAK;EAEb,aAAa,EAAE,GAAI;EACnB,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,OAAM;EAExB,gBAAgB,EAAE,IAAK;ECvExB,kBAAkB,EDyEI,IAAI,CAAC,IAAG,CAAC,WAAW;ECxE1C,UAAU,EDwEY,IAAI,CAAC,IAAG,CAAC,WAAW;EAGzC,qCAAqC;CAyBrC;;AAhJF,AAwHM,QAxHE,GAAG,OAAO,GAuGb,WAAW,GAiBV,IAAI,CAAA;EACP,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAOnB,KAAK,EAAE,IAAK;EACZ,OAAO,EAAE,QAAS;EAClB,YAAY,EAAE,GAAI;EAElB,MAAM,EAAE,OAAQ;CAMhB;;AA3IH,AAwHM,QAxHE,GAAG,OAAO,GAuGb,WAAW,GAiBV,IAAI,AAKN,IAAK,CAAA,AAAA,WAAW,EAAC;EACjB,aAAa,EAAE,cAAe;CAC9B;;AA/HJ,AAwHM,QAxHE,GAAG,OAAO,GAuGb,WAAW,GAiBV,IAAI,AAgBN,MAAM,CAAA;EACN,gBAAgB,EAAE,IAAK;CACvB;;AA1IJ,AAmJK,QAnJG,GAAG,OAAO,GAmJb,kBAAkB,CAAA;EAAE,OAAO,EAAE,IAAK;CAAI;;AAnJ3C,AAoJ0B,QApJlB,GAAG,OAAO,GAoJb,kBAAkB,GAAG,WAAW,CAAA;EAAE,IAAI,EAAE,IAAK;CAAI;;AApJtD,AAqJkC,QArJ1B,GAAG,OAAO,GAqJb,kBAAkB,AAAA,QAAQ,GAAG,WAAW,CAAA;EAAE,IAAI,EAAE,IAAK;CAAI;;AArJ9D,AAsJ6C,QAtJrC,GAAG,OAAO,GAsJb,kBAAkB,AAAA,QAAQ,GAAG,WAAW,AAAA,OAAO,CAAA;EAAE,IAAI,EAAE,GAAI;CAAI",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,14 +0,0 @@
{
"version": 3,
"file": "menu-side.css",
"sources": [
"../menu-side.scss",
"../constants.scss"
],
"sourcesContent": [
"@import 'constants';\n\n#WRAPPER > #MENU-SIDE{\n\n\t/* [1] Elements du menu\n\t=========================================================*/\n\t& > span{\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\t\twidth: calc( 100% - 2*1em - 2*1.5em );\n\n\t\tpadding: .8em 1.5em;\n\t\tpadding-left: calc( 1.5em + 2*1em );\n\n\t\tborder-bottom: 1px solid transparent;\n\n\t\tbackground: url('/src/static/menu-side/sub@aaaaaa.svg') right 1.5em center no-repeat;\n\t\tbackground-size: .5em .5em;\n\n\n\t\tcolor: #666;\n\t\tfont-size: .85em;\n\n\t\t@include transition( color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out );\n\n\t\tcursor: pointer;\n\n\t\t/* (1) Icone svg */\n\t\t& > svg, & > svg *{\n\t\t\tposition: absolute;\n\t\t\t\ttop: calc( 50% - 1em/2 );\n\t\t\t\tleft: 1.5em;\n\t\t\t\twidth: 1em;\n\t\t\t\theight: 1em;\n\n\t\t\tfill: $dark-fg !important;\n\t\t\t@include transition( fill .2s ease-in-out );\n\t\t}\n\n\n\t\t/* (2) Animation de @hover */\n\t\t&:not(.active):hover{\n\t\t\tbackground-image: url('/src/static/menu-side/sub@000000.svg');\n\t\t\tcolor: #000;\n\n\t\t\t& > svg, & > svg *{\n\t\t\t\tfill: #000 !important;\n\t\t\t}\n\t\t}\n\n\t\t/* (3) Animation quand .active */\n\t\t&.active{\n\t\t\tborder-bottom-color: darken($theme-fg-primary, 5);\n\t\t\t// box-shadow: inset 0 0 1em darken($dark-bg-primary, 1);\n\n\t\t\tbackground-color: $theme-fg-primary;\n\t\t\tbackground-image: url('/src/static/menu-side/sub-active@ffffff.svg');\n\t\t\tcolor: $dark-fg-primary;\n\n\t\t\t& > svg, & > svg *{\n\t\t\t\tfill: #fff !important;\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\n\n\t/* [2] Gestion du menu deroulant\n\t=========================================================*/\n\t/* (1) Quand le menu est deroule */\n\t& > span:not(.icon) + div.sub>span{\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\t\twidth: calc( 100% - 1.5em - 2.5em );\n\n\t\tpadding: .5em 1.5em;\n\t\tpadding-left: 2.5em;\n\n\t\tbackground: #eee url('/src/static/menu-side/sub@777777.svg') 1.5em center no-repeat;;\n\t\tbackground-size: .5em;\n\n\t\tcolor: #777777;\n\t\tfont-size: .85em;\n\n\t\tcursor: pointer;\n\n\t\t@include transition( color .2s ease-in-out );\n\n\t\t// Animation de @hover ou .active\n\t\t&:hover,\n\t\t&.active{\n\t\t\tcolor: #000;\n\t\t\tbackground-image: url('/src/static/menu-side/sub@000000.svg');\n\t\t}\n\t}\n\n\n\t& > span:not(.icon):not(.active) + div.sub>span{\n\t\tdisplay: none;\n\t}\n}\n",
"/* [1] COULEURS\n=========================================================*/\n/* (1) COULEURS DU THEME $DEFAULT */\n$theme-bg: #e8e8e8;\n$theme-bg-primary: #ffffff;\n$theme-fg: #515151;\n$theme-fg-primary: #0e6dbf;\n\n/* (2) COULEURS DE THEME $DARK */\n$dark-bg: #313541;\n$dark-bg-primary: #29282e;\n$dark-fg: #939393;\n$dark-fg-primary: #ffffff;\n\n$header-dark: #F8F8FA;\n\n/* (3) Couleurs du theme pour la timeline */\n$timeline-color: #738394;\n$timeline-0: #0e6dbf;\n$timeline-1: #e64e3e;\n$timeline-2: #10ba72;\n$timeline-3: #b14be7;\n$timeline-4: #053b5d;\n\n\n\n/* [2] DIMENSIONS\n=========================================================*/\n/* (1) Layout de base */\n$menu-side-width: 15em;\n$header-height: 4em;\n\n\n\n/* [3] Mixins\n=========================================================*/\n@mixin transform($value...) {\n\ttransform: $value;\n\t-moz-transform: $value;\n\t-o-transform: $value;\n\t-ms-transform: $value;\n\t-webkit-transform: $value;\n}\n\n\n@mixin transition($value...) {\n\t-webkit-transition: $value;\n\ttransition: $value;\n}\n\n/* [4] Functions\n=========================================================*/\n// Transforme une couleur hex en string sans le #\n@function color-str($color){\n\t@return str-slice(#{$color}, 2, str-length(#{$color}));\n}\n"
],
"mappings": "ACAA;2DAC2D;AAC3D,oCAAoC;AAMpC,iCAAiC;AAQjC,4CAA4C;AAU5C;2DAC2D;AAC3D,wBAAwB;AAMxB;2DAC2D;AAe3D;2DAC2D;ADjD3D,AAAW,QAAH,GAAG,UAAU,CAAA;EAEpB;4DAC2D;EAgE3D;4DAC2D;EAC3D,mCAAmC;CA+BnC;;AApGD,AAIK,QAJG,GAAG,UAAU,GAIhB,IAAI,CAAA;EACP,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,6BAAI;EAEZ,OAAO,EAAE,UAAW;EACpB,YAAY,EAAE,oBAAI;EAElB,aAAa,EAAE,qBAAsB;EAErC,UAAU,EAAE,2CAAG,CAAyC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS;EACpF,eAAe,EAAE,SAAU;EAG3B,KAAK,EAAE,IAAK;EACZ,SAAS,EAAE,KAAM;ECyBlB,kBAAkB,EDvBI,KAAK,CAAC,IAAG,CAAC,WAAW,EAAE,UAAU,CAAC,IAAG,CAAC,WAAW,EAAE,UAAU,CAAC,IAAG,CAAC,WAAW,EAAE,MAAM,CAAC,IAAG,CAAC,WAAW;ECwB3H,UAAU,EDxBY,KAAK,CAAC,IAAG,CAAC,WAAW,EAAE,UAAU,CAAC,IAAG,CAAC,WAAW,EAAE,UAAU,CAAC,IAAG,CAAC,WAAW,EAAE,MAAM,CAAC,IAAG,CAAC,WAAW;EAE1H,MAAM,EAAE,OAAQ;EAEhB,mBAAmB;EAanB,6BAA6B;EAU7B,iCAAiC;CAejC;;AA/DF,AA0BM,QA1BE,GAAG,UAAU,GAIhB,IAAI,GAsBH,GAAG,EA1BT,AA0BmB,QA1BX,GAAG,UAAU,GAIhB,IAAI,GAsBM,GAAG,CAAC,CAAC,CAAA;EACjB,QAAQ,EAAE,QAAS;EAClB,GAAG,EAAE,kBAAI;EACT,IAAI,EAAE,KAAM;EACZ,KAAK,EAAE,GAAI;EACX,MAAM,EAAE,GAAI;EAEb,IAAI,ECxBW,OAAO,CDwBP,UAAU;ECW3B,kBAAkB,EDVK,IAAI,CAAC,IAAG,CAAC,WAAW;ECW3C,UAAU,EDXa,IAAI,CAAC,IAAG,CAAC,WAAW;CACzC;;AAnCH,AAIK,QAJG,GAAG,UAAU,GAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,CAAA;EACnB,gBAAgB,EAAE,2CAAG;EACrB,KAAK,EAAE,IAAK;CAKZ;;AA9CH,AA2CO,QA3CC,GAAG,UAAU,GAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,GAIf,GAAG,EA3CV,AA2CoB,QA3CZ,GAAG,UAAU,GAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,GAIN,GAAG,CAAC,CAAC,CAAA;EACjB,IAAI,EAAE,eAAgB;CACtB;;AA7CJ,AAIK,QAJG,GAAG,UAAU,GAIhB,IAAI,AA6CN,OAAO,CAAA;EACP,mBAAmB,EAAE,OAAM;EAG3B,gBAAgB,ECjDA,OAAO;EDkDvB,gBAAgB,EAAE,kDAAG;EACrB,KAAK,EC7CU,OAAO;CDkDtB;;AA5DH,AAyDO,QAzDC,GAAG,UAAU,GAIhB,IAAI,AA6CN,OAAO,GAQH,GAAG,EAzDV,AAyDoB,QAzDZ,GAAG,UAAU,GAIhB,IAAI,AA6CN,OAAO,GAQM,GAAG,CAAC,CAAC,CAAA;EACjB,IAAI,EAAE,eAAgB;CACtB;;AA3DJ,AAsE+B,QAtEvB,GAAG,UAAU,GAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,IAAI,GAAG,AAAA,IAAI,GAAC,IAAI,CAAA;EACjC,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,2BAAI;EAEZ,OAAO,EAAE,UAAW;EACpB,YAAY,EAAE,KAAM;EAEpB,UAAU,EAAE,IAAI,CAAC,2CAAG,CAAyC,KAAK,CAAC,MAAM,CAAC,SAAS;EACnF,eAAe,EAAE,IAAK;EAEtB,KAAK,EAAE,OAAQ;EACf,SAAS,EAAE,KAAM;EAEjB,MAAM,EAAE,OAAQ;ECxCjB,kBAAkB,ED0CI,KAAK,CAAC,IAAG,CAAC,WAAW;ECzC3C,UAAU,EDyCY,KAAK,CAAC,IAAG,CAAC,WAAW;CAQ1C;;AA9FF,AAsE+B,QAtEvB,GAAG,UAAU,GAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,IAAI,GAAG,AAAA,IAAI,GAAC,IAAI,AAmBhC,MAAM,EAzFT,AAsE+B,QAtEvB,GAAG,UAAU,GAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,IAAI,GAAG,AAAA,IAAI,GAAC,IAAI,AAoBhC,OAAO,CAAA;EACP,KAAK,EAAE,IAAK;EACZ,gBAAgB,EAAE,2CAAG;CACrB;;AA7FH,AAiG4C,QAjGpC,GAAG,UAAU,GAiGhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,CAAC,IAAK,CAAA,AAAA,OAAO,IAAI,GAAG,AAAA,IAAI,GAAC,IAAI,CAAA;EAC9C,OAAO,EAAE,IAAK;CACd",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,109 +0,0 @@
/* [1] Proxima Nova
=========================================================*/
@font-face {
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 100;
src: url('/css/fonts/proxima-nova/thin.eot');
src: url('/css/fonts/proxima-nova/thin#iefix.eot') format("embedded-opentype"),
url('/css/fonts/proxima-nova/thin.woff') format("woff"),
url('/css/fonts/proxima-nova/thin.ttf') format("truetype");
}
@font-face {
font-family: 'Proxima Nova';
font-style: normal;
font-weight: normal;
src: url('/css/fonts/proxima-nova/regular.eot');
src: url('/css/fonts/proxima-nova/regular#iefix.eot') format("embedded-opentype"),
url('/css/fonts/proxima-nova/regular.woff') format("woff"),
url('/css/fonts/proxima-nova/regular.ttf') format("truetype");
}
/* [2] Icomoon
=========================================================*/
@font-face {
font-family: 'icomoon';
font-style: normal;
font-weight: 100;
src: url("/css/fonts/icomoon/thin.eot");
src: url('/css/fonts/icomoon/thin.woff') format("woff"),
url('/css/fonts/icomoon/thin.ttf') format("truetype");
}
@font-face {
font-family: 'icomoon';
font-style: normal;
font-weight: normal;
src: url("/css/fonts/icomoon/regular.eot");
src: url('/css/fonts/icomoon/regular.woff') format("woff"),
url('/css/fonts/icomoon/regular.ttf') format("truetype");
}
/* [3] Open Sans
=========================================================*/
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 100;
src: url("/css/fonts/opensans/light.ttf") format("truetype");
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 100;
src: url("/css/fonts/opensans/lightitalic.ttf") format("truetype");
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: normal;
src: url("/css/fonts/opensans/regular.ttf") format("truetype");
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: bold;
src: url("/css/fonts/opensans/bold.ttf") format("truetype");
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: normal;
src: url("/css/fonts/opensans/italic.ttf") format("truetype");
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: bold;
src: url("/css/fonts/opensans/bolditalic.ttf") format("truetype");
}
/* [4] Inconsolata
=========================================================*/
@font-face {
font-family: 'Inconsolata';
font-style: normal;
font-weight: normal;
src: url("/css/fonts/inconsolata/regular.otf");
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +0,0 @@
{
"version": 3,
"file": "font.css",
"sources": [
"../font.scss"
],
"sourcesContent": [
"/* [1] Proxima Nova\n=========================================================*/\n@font-face {\n\tfont-family: 'Proxima Nova';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url('/css/fonts/proxima-nova/thin.eot');\n\tsrc: url('/css/fonts/proxima-nova/thin#iefix.eot') format(\"embedded-opentype\"),\n\t\t\turl('/css/fonts/proxima-nova/thin.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/proxima-nova/thin.ttf') format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Proxima Nova';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url('/css/fonts/proxima-nova/regular.eot');\n\tsrc: url('/css/fonts/proxima-nova/regular#iefix.eot') format(\"embedded-opentype\"),\n\t\t\turl('/css/fonts/proxima-nova/regular.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/proxima-nova/regular.ttf') format(\"truetype\");\n}\n\n\n/* [2] Icomoon\n=========================================================*/\n@font-face {\n\tfont-family: 'icomoon';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/icomoon/thin.eot\");\n\tsrc: url('/css/fonts/icomoon/thin.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/icomoon/thin.ttf') format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'icomoon';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/icomoon/regular.eot\");\n\tsrc: url('/css/fonts/icomoon/regular.woff') format(\"woff\"),\n\t\t\turl('/css/fonts/icomoon/regular.ttf') format(\"truetype\");\n}\n\n\n\n/* [3] Open Sans\n=========================================================*/\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/opensans/light.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: 100;\n\n\tsrc: url(\"/css/fonts/opensans/lightitalic.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/opensans/regular.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: normal;\n\tfont-weight: bold;\n\n\tsrc: url(\"/css/fonts/opensans/bold.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/opensans/italic.ttf\") format(\"truetype\");\n}\n\n@font-face {\n\tfont-family: 'Open Sans';\n\tfont-style: italic;\n\tfont-weight: bold;\n\n\tsrc: url(\"/css/fonts/opensans/bolditalic.ttf\") format(\"truetype\");\n}\n\n\n/* [4] Inconsolata\n=========================================================*/\n@font-face {\n\tfont-family: 'Inconsolata';\n\tfont-style: normal;\n\tfont-weight: normal;\n\n\tsrc: url(\"/css/fonts/inconsolata/regular.otf\");\n}\n"
],
"mappings": "AAEA,UAAU,CACT,WAAW,CAAE,cAAe,CAC5B,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,GAAI,CAEjB,GAAG,CAAE,uCAAG,CACR,GAAG,CAAK,6CAAG,CAA4C,2BAAM,CAC3D,wCAAG,CAA4C,cAAM,CACrD,uCAAG,CAA4C,kBAAM,CAGxD,UAAU,CACT,WAAW,CAAE,cAAe,CAC5B,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,MAAO,CAEpB,GAAG,CAAE,0CAAG,CACR,GAAG,CAAK,gDAAG,CAA+C,2BAAM,CAC9D,2CAAG,CAA+C,cAAM,CACxD,0CAAG,CAA+C,kBAAM,CAM3D,UAAU,CACT,WAAW,CAAE,SAAU,CACvB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,GAAI,CAEjB,GAAG,CAAE,kCAAG,CACR,GAAG,CAAE,mCAAG,CAAuC,cAAM,CACnD,kCAAG,CAAuC,kBAAM,CAGnD,UAAU,CACT,WAAW,CAAE,SAAU,CACvB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,MAAO,CAEpB,GAAG,CAAE,qCAAG,CACR,GAAG,CAAE,sCAAG,CAA0C,cAAM,CACtD,qCAAG,CAA0C,kBAAM,CAOtD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,GAAI,CAEjB,GAAG,CAAE,oCAAG,CAAkC,kBAAM,CAGjD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,GAAI,CAEjB,GAAG,CAAE,0CAAG,CAAwC,kBAAM,CAGvD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,MAAO,CAEpB,GAAG,CAAE,sCAAG,CAAoC,kBAAM,CAGnD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,IAAK,CAElB,GAAG,CAAE,mCAAG,CAAiC,kBAAM,CAGhD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,MAAO,CAEpB,GAAG,CAAE,qCAAG,CAAmC,kBAAM,CAGlD,UAAU,CACT,WAAW,CAAE,WAAY,CACzB,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,IAAK,CAElB,GAAG,CAAE,yCAAG,CAAuC,kBAAM,CAMtD,UAAU,CACT,WAAW,CAAE,aAAc,CAC3B,UAAU,CAAE,MAAO,CACnB,WAAW,CAAE,MAAO,CAEpB,GAAG,CAAE,yCAAG",
"names": []
}

View File

@ -1,170 +0,0 @@
@charset "UTF-8";
/* [1] COULEURS
=========================================================*/
/* (1) COULEURS DU THEME $DEFAULT */
/* (2) COULEURS DE THEME $DARK */
/* (3) Couleurs du theme pour la timeline */
/* [2] DIMENSIONS
=========================================================*/
/* (1) Layout de base */
/* [3] Mixins
=========================================================*/
/* [4] Functions
=========================================================*/
/* [1] Panel list (tokens, utilisateurs, etc)
=========================================================*/
/* [1] COULEURS
=========================================================*/
/* (1) COULEURS DU THEME $DEFAULT */
/* (2) COULEURS DE THEME $DARK */
/* (3) Couleurs du theme pour la timeline */
/* [2] DIMENSIONS
=========================================================*/
/* (1) Layout de base */
/* [3] Mixins
=========================================================*/
/* [4] Functions
=========================================================*/
/* [1] Panneau d'ajout/suppression d'elements
=========================================================*/
#WRAPPER > #CONTAINER section[data-panel-list] { display: block; position: relative; border-radius: 3px; border: 1px solid #ccc; background-color: #fff; font-size: .9em; color: #000; /* (1) Header (titre + ajout) */ /* (2) Description (sous le header) */ /* (3) Liste des elements */ /* (5) Formulaire d'ajout d'un nouvel element */ }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-header] { display: flex; position: relative; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; padding: .5em .7em; border-radius: 3px 3px 0 0; border-bottom: 1px solid #ccc; background-color: #f5f5f5; box-shadow: inset 0 0 5px #eee; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-header] > span, #WRAPPER > #CONTAINER section[data-panel-list] > div[data-header] > button { color: #333; font-weight: bold; line-height: 2em; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-header] > button { padding: .1em .7em; border-radius: 3px; border: 1px solid #777; background: #ecf0f1; -webkit-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; color: #777; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-header] > button:hover { background: #0e6dbf; border-color: #0b528f; color: #fff; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-description] { display: block; position: relative; border-bottom: 1px solid #ccc; padding: .7em .7em; color: #555; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] { display: flex; position: relative; flex-direction: column; justify-content: flex-start; flex-wrap: nowrap; margin: 0; padding: 0; list-style: none; /* (4) Chaque element de la liste */ }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] { display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: nowrap; padding: 1em; /* (4.1) Logo et type d'element */ /* (4.2) Donnees descriptives */ /* (4.3) Bouton de suppression */ }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element]:not(:last-child) { border-bottom: 1px solid #ccc; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1) { display: flex; width: 10em; height: 6em; flex-direction: column; justify-content: flex-end; align-items: center; background-size: auto 50%; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-token] { background: url("/src/static/container/token@666666.svg") center 1em no-repeat; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-token].active { background-image: url("/src/static/container/token@0e6dbf.svg"); }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-user] { background: url("/src/static/container/user@666666.svg") center 1em no-repeat; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-user].active { background-image: url("/src/static/container/user@0e6dbf.svg"); }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-number] { background: url("/src/static/container/phone_number@666666.svg") center 1em no-repeat; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1)[data-number].active { background-image: url("/src/static/container/phone_number@0e6dbf.svg"); }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(1) > span { display: block; padding: 0 .4em; border-radius: 3px; border: 1px solid #ddd; font-size: .8em; color: #555; text-transform: uppercase; font-weight: bold; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(n+2) { display: flex; position: relative; flex: 10em; padding: 1em; flex-direction: column; justify-content: flex-start; align-items: flex-start; font-size: 1em; color: #000; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > div:nth-child(n+2) > span[data-prefix]:before { content: attr(data-prefix) ": "; font-weight: normal; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > button { padding: .1em .7em; height: 2em; border-radius: 3px; border: 1px solid #de2b08; background: #fff; color: #de2b08; font-weight: bold; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; }
#WRAPPER > #CONTAINER section[data-panel-list] > ul[data-list] > li[data-element] > button:hover { background: #de2b08; color: #fff; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] { display: none; position: relative; padding: 1em; border-bottom: 1px solid #ccc; background-color: #ecf0f1; /* (5.1) Description du champ de texte */ /* (5.2) Champs de texte */ /* (5.3) Bouton de creation animation de @hover*/ }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add].active { display: block; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > .label { display: inline-block; width: 18em; padding-right: 2em; text-align: right; color: #3b494c; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='text'], #WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='email'], #WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='password'] { margin: 1em 0; padding: .5em .7em; border-radius: 3px; border: 1px solid #ddd; background-color: #fff; color: #000; font-weight: normal; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='text']:focus, #WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='email']:focus, #WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='password']:focus { border-color: #0e6dbf; box-shadow: inset 0 0 2px #ddd; }
#WRAPPER > #CONTAINER section[data-panel-list] > div[data-add] > input[type='submit']:hover { background: #0e6dbf; border-color: #0b528f; color: #fff; }
/* [2] Formulaire de type 'timeline'
=========================================================*/
/* [1] COULEURS
=========================================================*/
/* (1) COULEURS DU THEME $DEFAULT */
/* (2) COULEURS DE THEME $DARK */
/* (3) Couleurs du theme pour la timeline */
/* [2] DIMENSIONS
=========================================================*/
/* (1) Layout de base */
/* [3] Mixins
=========================================================*/
/* [4] Functions
=========================================================*/
/* [1] Formulaire de type timeline
=========================================================*/
#WRAPPER > #CONTAINER section[data-timeline] { display: block; position: relative; background-color: #fff; font-size: .9em; color: #000; /* (1) On ajoute le liseré à droite pour TOUS les éléments */ /* (2) Titres de sections */ /* (3) Titres des sous-sections */ /* (4) Titres genre text message */ /* (5) 'Tags' -> textes sur le liseré gauche */ /* (6) Input d'upload de fichier (css hack) */ /* Contiendra l'input*/ /* Animation de hover*/ /* Animation de .active*/ /* (7) Inputs de type text */ /* (8) Gestion des espacements */ /* (10) Gestion des espacements verticaux */ /* (11) Gestion des custom <select> */ /* (12) Gestion des coloris pour les titres */ /* (13) Gestion de la navigation fléchée */ /* (14) Gestion de l'affichage des MINI fiches et des FICHES relations */ }
#WRAPPER > #CONTAINER section[data-timeline] h5, #WRAPPER > #CONTAINER section[data-timeline] h4, #WRAPPER > #CONTAINER section[data-timeline] h3, #WRAPPER > #CONTAINER section[data-timeline] *.line, #WRAPPER > #CONTAINER section[data-timeline] [data-space] { display: block; color: #333; margin: 0 40px; padding: 5px 60px; border-left: 2px solid #d8e0e9; }
#WRAPPER > #CONTAINER section[data-timeline] h3 { display: block; padding: 20px 40px; font-size: 1.4em; color: #000; font-weight: bold; /* Gestion du before (compteur css) //*/ }
#WRAPPER > #CONTAINER section[data-timeline] h3[data-n]:before { content: attr(data-n); display: inline-block; position: absolute; margin-top: .6em; margin-left: -41px; padding: 3px 12px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 3px #fff; background-color: #738394; font-size: 1.3em; color: #fff; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h4 { display: block; padding: 20px 40px; font-size: 1.2em; color: #46505b; font-weight: bold; /* Gestion du before (compteur css) //*/ }
#WRAPPER > #CONTAINER section[data-timeline] h4[data-icon]:before { content: attr(data-icon); display: inline-block; position: absolute; margin-top: .9em; margin-left: -41px; padding: 9px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 2px #fff; background-color: #738394; font-size: .9em; font-family: 'icomoon'; color: #fff; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h5 { display: block; padding: 20px 40px; font-size: 1.2em; color: #46505b; font-weight: bold; /* Gestion du before (compteur css) //*/ /* Texte genre text message*/ }
#WRAPPER > #CONTAINER section[data-timeline] h5:before { content: ''; display: inline-block; position: absolute; margin-top: .7em; margin-left: -41px; padding: 7px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 2px #fff; background-color: #738394; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h5[data-text]:after { content: attr(data-text); padding: 6px 10px; border-radius: 3px; background: #738394; color: #fff; font-weight: normal; }
#WRAPPER > #CONTAINER section[data-timeline] [data-tag] { display: block; padding: 40px 60px; }
#WRAPPER > #CONTAINER section[data-timeline] [data-tag]:before { content: attr(data-tag); display: inline-block; position: absolute; margin-top: .5em; margin-left: -41px; padding: 2px; background-color: #fff; font-size: 1.2em; color: #738394; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] { position: relative; opacity: 0; z-index: 8; cursor: pointer; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] + span.file-input { display: inline-block; position: absolute; margin-top: -1px; margin-left: -290px; width: calc( 290px - 2*15px ); height: 30px; padding: 0 15px; border-radius: 3px; background: #0e6dbf; color: #ddd; line-height: 30px; font-weight: normal; z-index: 9; cursor: pointer; pointer-events: none; /* Icone d'upload*/ -webkit-transition: background 0.1s ease-in-out; transition: background 0.1s ease-in-out; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] + span.file-input:before { content: 'e '; font-size: 1em; font-family: 'icomoon'; color: #222; font-weight: bold; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file']:hover + span.file-input { background: #0b528f; box-shadow: inset 0 0 5px #888; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'].active + span.file-input { background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'].active + span.file-input:before { content: 'v '; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='text'], #WRAPPER > #CONTAINER section[data-timeline] input[type='password'], #WRAPPER > #CONTAINER section[data-timeline] input[type='number'], #WRAPPER > #CONTAINER section[data-timeline] input[type='button'], #WRAPPER > #CONTAINER section[data-timeline] input[type='submit'], #WRAPPER > #CONTAINER section[data-timeline] input[type='mail'] { display: inline; width: auto; margin: unset; padding: 5px 10px; margin-bottom: 5px; margin-right: 15px; border-radius: 0; border: 0; border-bottom: 1px solid #555; font-size: .8em; font-weight: normal; color: #333; -webkit-transition: border 0.2s ease-in-out, background 0.2s ease-in-out, color 0.2s ease-in-out; transition: border 0.2s ease-in-out, background 0.2s ease-in-out, color 0.2s ease-in-out; /* Animation de @focus*/ }
#WRAPPER > #CONTAINER section[data-timeline] input[type='text']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='password']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='number']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='button']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='mail']:focus { border-color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='submit'] { border-color: #7f2d18; background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:hover, #WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:focus { background: #c04324; }
#WRAPPER > #CONTAINER section[data-timeline] label { color: #555; }
#WRAPPER > #CONTAINER section[data-timeline] [data-space] { padding-top: 20px; padding-bottom: 20px; }
#WRAPPER > #CONTAINER section[data-timeline] .spacetop, #WRAPPER > #CONTAINER section[data-timeline] .spaced { margin-top: 20px !important; }
#WRAPPER > #CONTAINER section[data-timeline] .spacebtm, #WRAPPER > #CONTAINER section[data-timeline] .spaced { margin-bottom: 20px !important; }
#WRAPPER > #CONTAINER section[data-timeline] .nobold, #WRAPPER > #CONTAINER section[data-timeline] .nobold * { font-weight: normal !important; }
#WRAPPER > #CONTAINER section[data-timeline] select { width: auto; display: inline-block; background: transparent; border: 0; -webkit-appearance: none; -moz-appearance: none; text-indent: 1px; text-overflow: ''; font-size: .9em; }
#WRAPPER > #CONTAINER section[data-timeline] select option:not(:disabled) { padding-left: 1.5em; }
#WRAPPER > #CONTAINER section[data-timeline] select option:disabled:not(:first-child) { font-size: 1.2em; color: #000; font-weight: bold; }
#WRAPPER > #CONTAINER section[data-timeline] select option.pad { padding-left: 2.5em; }
#WRAPPER > #CONTAINER section[data-timeline] .select-container select { display: inline-block; padding: 5px 2px; padding-right: 30px; border: none; border-bottom: 1px solid #333; background: #fff url("/src/static/container/bottom_arrow@333333.svg") right 10px center no-repeat; background-size: 10px auto; overflow: hidden; }
#WRAPPER > #CONTAINER section[data-timeline] .select-container select:focus { border-color: #d54b28; background-image: url("/src/static/container/bottom_arrow@d54b28.svg"); }
#WRAPPER > #CONTAINER section[data-timeline] h5.color0, #WRAPPER > #CONTAINER section[data-timeline] h4.color0, #WRAPPER > #CONTAINER section[data-timeline] h3.color0 { color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color0:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color0:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color0:after { background-color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color1, #WRAPPER > #CONTAINER section[data-timeline] h4.color1, #WRAPPER > #CONTAINER section[data-timeline] h3.color1 { color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color1:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color1:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color1:after { background-color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color2, #WRAPPER > #CONTAINER section[data-timeline] h4.color2, #WRAPPER > #CONTAINER section[data-timeline] h3.color2 { color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color2:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color2:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color2:after { background-color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color3, #WRAPPER > #CONTAINER section[data-timeline] h4.color3, #WRAPPER > #CONTAINER section[data-timeline] h3.color3 { color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color3:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color3:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color3:after { background-color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color4, #WRAPPER > #CONTAINER section[data-timeline] h4.color4, #WRAPPER > #CONTAINER section[data-timeline] h3.color4 { color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color4:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color4:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color4:after { background-color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span { display: inline-block; position: relative; margin: .3em 0; padding: .5em .8em; border: 1px solid #b7c6d7; color: #7692b2; cursor: pointer; -webkit-transition: 0.2s ease-in-out; transition: 0.2s ease-in-out; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(:last-child):not(.lc) { border-right: 0; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:first-child, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.fc { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:last-child, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.lc { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done { font-weight: bold; color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done:hover, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done.active { border-color: #d54b28; background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done) { font-weight: bold; color: #333; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done):hover, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done).active { border-color: #aaa; background: #aaa; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] { display: none; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content { display: table; position: relative; margin: .5em 0; padding: 1em; border-radius: 3px; border: 1px solid #ddd; background: #fff; color: #555; font-size: 1.1em; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; font-style: italic; padding-left: 2em; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:before { border-radius: 50% / 50%; border: 0; background: #aaa; cursor: pointer; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:hover { text-decoration: none; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content span { color: #000; font-style: normal; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:hover { border-color: #bcbcbc; background-color: #f2f2f2; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label { border-color: #07ca64; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label:before { background: #07ca64; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label:hover { border-color: #04803f; }
/* [1] COULEURS
=========================================================*/
/* (1) COULEURS DU THEME $DEFAULT */
/* (2) COULEURS DE THEME $DARK */
/* (3) Couleurs du theme pour la timeline */
/* [2] DIMENSIONS
=========================================================*/
/* (1) Layout de base */
/* [3] Mixins
=========================================================*/
/* [4] Functions
=========================================================*/
/* [1] Formulaire de type timeline
=========================================================*/
#WRAPPER > #CONTAINER section[data-timeline].facebook { /* Animation de .active*/ /* (7) Inputs de type text */ /* (12) Gestion des coloris pour les titres */ /* (13) Gestion de la navigation fléchée */ }
#WRAPPER > #CONTAINER section[data-timeline].facebook input[type='file'].active + span.file-input { background: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook input[type='text'], #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='password'], #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='number'], #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='button'], #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='submit'], #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='mail'] { /* Animation de @focus*/ }
#WRAPPER > #CONTAINER section[data-timeline].facebook input[type='text']:focus, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='password']:focus, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='number']:focus, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='button']:focus, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='submit']:focus, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='mail']:focus { border-color: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook input[type='submit'] { border-color: #1e2e4f; background: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook input[type='submit']:hover, #WRAPPER > #CONTAINER section[data-timeline].facebook input[type='submit']:focus { background: #344e86; }
#WRAPPER > #CONTAINER section[data-timeline].facebook .select-container select:focus { border-color: #3b5998; background-image: url("/src/static/container/bottom_arrow@3b5998.svg"); }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color0, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color0, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color0 { color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color0:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h5.color0:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color0:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color0:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color0:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color0:after { background-color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color1, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color1, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color1 { color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color1:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h5.color1:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color1:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color1:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color1:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color1:after { background-color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color2, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color2, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color2 { color: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color2:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h5.color2:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color2:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color2:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color2:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color2:after { background-color: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color3, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color3, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color3 { color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color3:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h5.color3:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color3:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color3:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color3:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color3:after { background-color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color4, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color4, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color4 { color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline].facebook h5.color4:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h5.color4:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color4:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h4.color4:after, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color4:before, #WRAPPER > #CONTAINER section[data-timeline].facebook h3.color4:after { background-color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline].facebook .arrow-container span.done { color: #3b5998; }
#WRAPPER > #CONTAINER section[data-timeline].facebook .arrow-container span.done:hover, #WRAPPER > #CONTAINER section[data-timeline].facebook .arrow-container span.done.active { color: #fff; border-color: #3b5998; background: #3b5998; }
#WRAPPER > #CONTAINER table tr > td, #WRAPPER > #CONTAINER table > tr > td, #WRAPPER > #CONTAINER > section > table tr > td, #WRAPPER > #CONTAINER > section > table > tr > td { padding: .8em; color: #888; font-weight: normal; text-align: center; white-space: nowrap; }
#WRAPPER > #CONTAINER table tr > td > input[type="checkbox"] + label[for]:before, #WRAPPER > #CONTAINER table > tr > td > input[type="checkbox"] + label[for]:before, #WRAPPER > #CONTAINER > section > table tr > td > input[type="checkbox"] + label[for]:before, #WRAPPER > #CONTAINER > section > table > tr > td > input[type="checkbox"] + label[for]:before { left: -.4em; width: calc( 1.05em - 2*.15em ); }
#WRAPPER > #CONTAINER table tr > td.hidden:before, #WRAPPER > #CONTAINER table > tr > td.hidden:before, #WRAPPER > #CONTAINER > section > table tr > td.hidden:before, #WRAPPER > #CONTAINER > section > table > tr > td.hidden:before { content: '+'; color: #ddd; }

File diff suppressed because one or more lines are too long

View File

@ -1,14 +0,0 @@
{
"version": 3,
"file": "header.css",
"sources": [
"../header.scss",
"../constants.scss"
],
"sourcesContent": [
"@import 'constants';\n\n\n#WRAPPER > #HEADER{\n\n\t/* [1] Barre de recherche\n\t=========================================================*/\n\t& > #searchbar{\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t\t\ttop: .8em;\n\t\t\tleft: 1em;\n\t\t\twidth: 20em;\n\t\t\theight: 2em;\n\n\t\tpadding: .2em 1em;\n\n\t\tborder: 0;\n\t\tborder-radius: 3px;\n\n\t\tbackground-color: $theme-bg;\n\n\t}\n\n\t/* [2] Informations utilisateur\n\t=========================================================*/\n\t/* (0) Conteneur */\n\t& > #user-data{\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\theight: calc( 100% - 2*1em );\n\n\n\t\t/* (1) Username de l'utilisateur */\n\t\t& > #user-name{\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tright: calc( #{$header-height}*2 - 1em );\n\t\t\t\theight: $header-height;\n\n\t\t\tpadding: 0 1em;\n\n\t\t\tcolor: #555;\n\t\t\tline-height: $header-height;\n\t\t\twhite-space: nowrap;\n\t\t\tfont-weight: bold;\n\n\t\t\tcursor: pointer;\n\n\t\t}\n\n\n\t\t/* (2) Image du profil */\n\t\t& > #user-picture{\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 1.5em;\n\t\t\t\tright: $header-height;\n\t\t\t\twidth: calc( #{$header-height} - 2*1.5em );\n\t\t\t\theight: calc( #{$header-height} - 2*1.5em );\n\n\n\t\t\tborder-radius: 50% / 50%;\n\n\t\t\tbackground-color: $theme-bg;\n\t\t\tbackground-size: auto 80%;\n\n\t\t\t// Si on est connecte\n\t\t\t&.active{\n\t\t\t\tbackground-color: $theme-fg-primary;\n\t\t\t}\n\n\t\t\tcursor: default;\n\n\t\t\talign-self: center;\n\t\t}\n\n\n\n\t\t/* (3) Icone d'activation */\n\t\t&:before{\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tright: 0;\n\t\t\t\twidth: $header-height;\n\t\t\t\theight: $header-height;\n\n\t\t\tbackground: url('/src/static/header/expand@000000.svg') center center no-repeat;\n\t\t\tbackground-size: 1em 1em;\n\n\t\t\tcursor: pointer;\n\n\t\t}\n\n\n\t}\n\n\n\n\t/* [3] Menu deroulant pour l'administration du profil\n\t=========================================================*/\n\t& > .user-panel{\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\t\ttop: calc( #{$header-height} - 1em );\n\t\t\tright: 0;\n\n\t\tmargin: .5em;\n\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid darken($theme-bg, 10);\n\n\t\tbackground-color: #fff;\n\n\t\t@include transition( left .3s ease-in-out );\n\n\n\t\t/* (1) Pour chaque element du menu */\n\t\t& > span{\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\n\t\t\t// On ajoute une ligne en dessous sauf pour le dernier\n\t\t\t&:not(:last-child){\n\t\t\t\tborder-bottom: 1px solid #ddd;\n\t\t\t}\n\n\t\t\tcolor: #000;\n\t\t\tpadding: .5em 1em;\n\t\t\tpadding-left: 2em;\n\n\t\t\tcursor: pointer;\n\n\t\t\t// @hover\n\t\t\t&:hover{\n\t\t\t\tbackground-color: #eee;\n\t\t\t}\n\t\t}\n\n\n\n\n\t}\n\n\t/* (3) Gestion de l'activation ou non de l'user panel */\n\t& > #toggle-user-panel{ display: none; }\n\t& > #toggle-user-panel + .user-panel{ left: 100%; }\n\t& > #toggle-user-panel:checked + .user-panel{ left: auto; }\n\t& > #toggle-user-panel:checked + .user-panel:before{ left: 7em; }\n\n\n\n\n\n\n}\n",
"/* [1] COULEURS\n=========================================================*/\n/* (1) COULEURS DU THEME $DEFAULT */\n$theme-bg: #e8e8e8;\n$theme-bg-primary: #ffffff;\n$theme-fg: #515151;\n$theme-fg-primary: #0e6dbf;\n\n/* (2) COULEURS DE THEME $DARK */\n$dark-bg: #313541;\n$dark-bg-primary: #29282e;\n$dark-fg: #939393;\n$dark-fg-primary: #ffffff;\n\n$header-dark: #F8F8FA;\n\n/* (3) Couleurs du theme pour la timeline */\n$timeline-color: #738394;\n$timeline-0: #0e6dbf;\n$timeline-1: #e64e3e;\n$timeline-2: #10ba72;\n$timeline-3: #b14be7;\n$timeline-4: #053b5d;\n\n\n\n/* [2] DIMENSIONS\n=========================================================*/\n/* (1) Layout de base */\n$menu-side-width: 15em;\n$header-height: 4em;\n\n\n\n/* [3] Mixins\n=========================================================*/\n@mixin transform($value...) {\n\ttransform: $value;\n\t-moz-transform: $value;\n\t-o-transform: $value;\n\t-ms-transform: $value;\n\t-webkit-transform: $value;\n}\n\n\n@mixin transition($value...) {\n\t-webkit-transition: $value;\n\ttransition: $value;\n}\n\n/* [4] Functions\n=========================================================*/\n// Transforme une couleur hex en string sans le #\n@function color-str($color){\n\t@return str-slice(#{$color}, 2, str-length(#{$color}));\n}\n"
],
"mappings": "AAGA,AAIK,QAJG,CAAG,OAAO,CAIb,UAAU,AAAA,CACb,OAAO,CAAE,YAAa,CACtB,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,IAAK,CACV,IAAI,CAAE,GAAI,CACV,KAAK,CAAE,IAAK,CACZ,MAAM,CAAE,GAAI,CAEb,OAAO,CAAE,QAAS,CAElB,MAAM,CAAE,CAAE,CACV,aAAa,CAAE,GAAI,CAEnB,gBAAgB,CCjBC,OAAO,CDmBxB,AAnBF,AAwBK,QAxBG,CAAG,OAAO,CAwBb,UAAU,AAAA,CACb,OAAO,CAAE,YAAa,CACtB,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,CAAE,CACP,KAAK,CAAE,CAAE,CACT,MAAM,CAAE,mBAAI,CAoEb,AAjGF,AAiCM,QAjCE,CAAG,OAAO,CAwBb,UAAU,CAST,UAAU,AAAA,CACb,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,CAAE,CACP,KAAK,CAAE,kBAAI,CACX,MAAM,CCXQ,GAAG,CDalB,OAAO,CAAE,KAAM,CAEf,KAAK,CAAE,IAAK,CACZ,WAAW,CChBI,GAAG,CDiBlB,WAAW,CAAE,MAAO,CACpB,WAAW,CAAE,IAAK,CAElB,MAAM,CAAE,OAAQ,CAEhB,AAjDH,AAqDM,QArDE,CAAG,OAAO,CAwBb,UAAU,CA6BT,aAAa,AAAA,CAChB,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,KAAM,CACX,KAAK,CC9BS,GAAG,CD+BjB,KAAK,CAAE,oBAAI,CACX,MAAM,CAAE,oBAAI,CAGb,aAAa,CAAE,SAAU,CAEzB,gBAAgB,CChEA,OAAO,CDiEvB,eAAe,CAAE,QAAS,CAO1B,MAAM,CAAE,OAAQ,CAEhB,UAAU,CAAE,MAAO,CACnB,AA3EH,AAqDM,QArDE,CAAG,OAAO,CAwBb,UAAU,CA6BT,aAAa,AAef,OAAO,AAAA,CACP,gBAAgB,CClED,OAAO,CDmEtB,AAtEJ,AAwBK,QAxBG,CAAG,OAAO,CAwBb,UAAU,AAwDZ,OAAO,AAAA,CACP,OAAO,CAAE,EAAG,CACZ,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,CAAE,CACP,KAAK,CAAE,CAAE,CACT,KAAK,CC3DS,GAAG,CD4DjB,MAAM,CC5DQ,GAAG,CD8DlB,UAAU,CAAE,2CAAG,CAAyC,MAAM,CAAC,MAAM,CAAC,SAAS,CAC/E,eAAe,CAAE,OAAQ,CAEzB,MAAM,CAAE,OAAQ,CAEhB,AA9FH,AAuGK,QAvGG,CAAG,OAAO,CAuGb,WAAW,AAAA,CACd,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,gBAAI,CACT,KAAK,CAAE,CAAE,CAEV,MAAM,CAAE,IAAK,CAEb,aAAa,CAAE,GAAI,CACnB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAM,CAExB,gBAAgB,CAAE,IAAK,CCvExB,kBAAkB,CDyEI,IAAI,CAAC,IAAG,CAAC,WAAW,CCxE1C,UAAU,CDwEY,IAAI,CAAC,IAAG,CAAC,WAAW,CA4BzC,AAhJF,AAwHM,QAxHE,CAAG,OAAO,CAuGb,WAAW,CAiBV,IAAI,AAAA,CACP,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAOnB,KAAK,CAAE,IAAK,CACZ,OAAO,CAAE,QAAS,CAClB,YAAY,CAAE,GAAI,CAElB,MAAM,CAAE,OAAQ,CAMhB,AA3IH,AAwHM,QAxHE,CAAG,OAAO,CAuGb,WAAW,CAiBV,IAAI,AAKN,IAAK,CAAA,AAAA,WAAW,CAAC,CACjB,aAAa,CAAE,cAAe,CAC9B,AA/HJ,AAwHM,QAxHE,CAAG,OAAO,CAuGb,WAAW,CAiBV,IAAI,AAgBN,MAAM,AAAA,CACN,gBAAgB,CAAE,IAAK,CACvB,AA1IJ,AAmJK,QAnJG,CAAG,OAAO,CAmJb,kBAAkB,AAAA,CAAE,OAAO,CAAE,IAAK,CAAI,AAnJ3C,AAoJ0B,QApJlB,CAAG,OAAO,CAoJb,kBAAkB,CAAG,WAAW,AAAA,CAAE,IAAI,CAAE,IAAK,CAAI,AApJtD,AAqJkC,QArJ1B,CAAG,OAAO,CAqJb,kBAAkB,AAAA,QAAQ,CAAG,WAAW,AAAA,CAAE,IAAI,CAAE,IAAK,CAAI,AArJ9D,AAsJ6C,QAtJrC,CAAG,OAAO,CAsJb,kBAAkB,AAAA,QAAQ,CAAG,WAAW,AAAA,OAAO,AAAA,CAAE,IAAI,CAAE,GAAI,CAAI",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,14 +0,0 @@
{
"version": 3,
"file": "menu-side.css",
"sources": [
"../menu-side.scss",
"../constants.scss"
],
"sourcesContent": [
"@import 'constants';\n\n#WRAPPER > #MENU-SIDE{\n\n\t/* [1] Elements du menu\n\t=========================================================*/\n\t& > span{\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\t\twidth: calc( 100% - 2*1em - 2*1.5em );\n\n\t\tpadding: .8em 1.5em;\n\t\tpadding-left: calc( 1.5em + 2*1em );\n\n\t\tborder-bottom: 1px solid transparent;\n\n\t\tbackground: url('/src/static/menu-side/sub@aaaaaa.svg') right 1.5em center no-repeat;\n\t\tbackground-size: .5em .5em;\n\n\n\t\tcolor: #666;\n\t\tfont-size: .85em;\n\n\t\t@include transition( color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out );\n\n\t\tcursor: pointer;\n\n\t\t/* (1) Icone svg */\n\t\t& > svg, & > svg *{\n\t\t\tposition: absolute;\n\t\t\t\ttop: calc( 50% - 1em/2 );\n\t\t\t\tleft: 1.5em;\n\t\t\t\twidth: 1em;\n\t\t\t\theight: 1em;\n\n\t\t\tfill: $dark-fg !important;\n\t\t\t@include transition( fill .2s ease-in-out );\n\t\t}\n\n\n\t\t/* (2) Animation de @hover */\n\t\t&:not(.active):hover{\n\t\t\tbackground-image: url('/src/static/menu-side/sub@000000.svg');\n\t\t\tcolor: #000;\n\n\t\t\t& > svg, & > svg *{\n\t\t\t\tfill: #000 !important;\n\t\t\t}\n\t\t}\n\n\t\t/* (3) Animation quand .active */\n\t\t&.active{\n\t\t\tborder-bottom-color: darken($theme-fg-primary, 5);\n\t\t\t// box-shadow: inset 0 0 1em darken($dark-bg-primary, 1);\n\n\t\t\tbackground-color: $theme-fg-primary;\n\t\t\tbackground-image: url('/src/static/menu-side/sub-active@ffffff.svg');\n\t\t\tcolor: $dark-fg-primary;\n\n\t\t\t& > svg, & > svg *{\n\t\t\t\tfill: #fff !important;\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\n\n\t/* [2] Gestion du menu deroulant\n\t=========================================================*/\n\t/* (1) Quand le menu est deroule */\n\t& > span:not(.icon) + div.sub>span{\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\t\twidth: calc( 100% - 1.5em - 2.5em );\n\n\t\tpadding: .5em 1.5em;\n\t\tpadding-left: 2.5em;\n\n\t\tbackground: #eee url('/src/static/menu-side/sub@777777.svg') 1.5em center no-repeat;;\n\t\tbackground-size: .5em;\n\n\t\tcolor: #777777;\n\t\tfont-size: .85em;\n\n\t\tcursor: pointer;\n\n\t\t@include transition( color .2s ease-in-out );\n\n\t\t// Animation de @hover ou .active\n\t\t&:hover,\n\t\t&.active{\n\t\t\tcolor: #000;\n\t\t\tbackground-image: url('/src/static/menu-side/sub@000000.svg');\n\t\t}\n\t}\n\n\n\t& > span:not(.icon):not(.active) + div.sub>span{\n\t\tdisplay: none;\n\t}\n}\n",
"/* [1] COULEURS\n=========================================================*/\n/* (1) COULEURS DU THEME $DEFAULT */\n$theme-bg: #e8e8e8;\n$theme-bg-primary: #ffffff;\n$theme-fg: #515151;\n$theme-fg-primary: #0e6dbf;\n\n/* (2) COULEURS DE THEME $DARK */\n$dark-bg: #313541;\n$dark-bg-primary: #29282e;\n$dark-fg: #939393;\n$dark-fg-primary: #ffffff;\n\n$header-dark: #F8F8FA;\n\n/* (3) Couleurs du theme pour la timeline */\n$timeline-color: #738394;\n$timeline-0: #0e6dbf;\n$timeline-1: #e64e3e;\n$timeline-2: #10ba72;\n$timeline-3: #b14be7;\n$timeline-4: #053b5d;\n\n\n\n/* [2] DIMENSIONS\n=========================================================*/\n/* (1) Layout de base */\n$menu-side-width: 15em;\n$header-height: 4em;\n\n\n\n/* [3] Mixins\n=========================================================*/\n@mixin transform($value...) {\n\ttransform: $value;\n\t-moz-transform: $value;\n\t-o-transform: $value;\n\t-ms-transform: $value;\n\t-webkit-transform: $value;\n}\n\n\n@mixin transition($value...) {\n\t-webkit-transition: $value;\n\ttransition: $value;\n}\n\n/* [4] Functions\n=========================================================*/\n// Transforme une couleur hex en string sans le #\n@function color-str($color){\n\t@return str-slice(#{$color}, 2, str-length(#{$color}));\n}\n"
],
"mappings": "AAEA,AAIK,QAJG,CAAG,UAAU,CAIhB,IAAI,AAAA,CACP,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,6BAAI,CAEZ,OAAO,CAAE,UAAW,CACpB,YAAY,CAAE,oBAAI,CAElB,aAAa,CAAE,qBAAsB,CAErC,UAAU,CAAE,2CAAG,CAAyC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CACpF,eAAe,CAAE,SAAU,CAG3B,KAAK,CAAE,IAAK,CACZ,SAAS,CAAE,KAAM,CCyBlB,kBAAkB,CDvBI,KAAK,CAAC,IAAG,CAAC,WAAW,CAAE,UAAU,CAAC,IAAG,CAAC,WAAW,CAAE,UAAU,CAAC,IAAG,CAAC,WAAW,CAAE,MAAM,CAAC,IAAG,CAAC,WAAW,CCwB3H,UAAU,CDxBY,KAAK,CAAC,IAAG,CAAC,WAAW,CAAE,UAAU,CAAC,IAAG,CAAC,WAAW,CAAE,UAAU,CAAC,IAAG,CAAC,WAAW,CAAE,MAAM,CAAC,IAAG,CAAC,WAAW,CAE1H,MAAM,CAAE,OAAQ,CAwChB,AA/DF,AA0BM,QA1BE,CAAG,UAAU,CAIhB,IAAI,CAsBH,GAAG,CA1BT,AA0BmB,QA1BX,CAAG,UAAU,CAIhB,IAAI,CAsBM,GAAG,CAAC,CAAC,AAAA,CACjB,QAAQ,CAAE,QAAS,CAClB,GAAG,CAAE,kBAAI,CACT,IAAI,CAAE,KAAM,CACZ,KAAK,CAAE,GAAI,CACX,MAAM,CAAE,GAAI,CAEb,IAAI,CCxBW,OAAO,CDwBP,UAAU,CCW3B,kBAAkB,CDVK,IAAI,CAAC,IAAG,CAAC,WAAW,CCW3C,UAAU,CDXa,IAAI,CAAC,IAAG,CAAC,WAAW,CACzC,AAnCH,AAIK,QAJG,CAAG,UAAU,CAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,AAAA,CACnB,gBAAgB,CAAE,2CAAG,CACrB,KAAK,CAAE,IAAK,CAKZ,AA9CH,AA2CO,QA3CC,CAAG,UAAU,CAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,CAIf,GAAG,CA3CV,AA2CoB,QA3CZ,CAAG,UAAU,CAIhB,IAAI,AAmCN,IAAK,CAAA,AAAA,OAAO,CAAC,MAAM,CAIN,GAAG,CAAC,CAAC,AAAA,CACjB,IAAI,CAAE,eAAgB,CACtB,AA7CJ,AAIK,QAJG,CAAG,UAAU,CAIhB,IAAI,AA6CN,OAAO,AAAA,CACP,mBAAmB,CAAE,OAAM,CAG3B,gBAAgB,CCjDA,OAAO,CDkDvB,gBAAgB,CAAE,kDAAG,CACrB,KAAK,CC7CU,IAAO,CDkDtB,AA5DH,AAyDO,QAzDC,CAAG,UAAU,CAIhB,IAAI,AA6CN,OAAO,CAQH,GAAG,CAzDV,AAyDoB,QAzDZ,CAAG,UAAU,CAIhB,IAAI,AA6CN,OAAO,CAQM,GAAG,CAAC,CAAC,AAAA,CACjB,IAAI,CAAE,eAAgB,CACtB,AA3DJ,AAsE+B,QAtEvB,CAAG,UAAU,CAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,EAAI,GAAG,AAAA,IAAI,CAAC,IAAI,AAAA,CACjC,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,2BAAI,CAEZ,OAAO,CAAE,UAAW,CACpB,YAAY,CAAE,KAAM,CAEpB,UAAU,CAAE,IAAI,CAAC,2CAAG,CAAyC,KAAK,CAAC,MAAM,CAAC,SAAS,CACnF,eAAe,CAAE,IAAK,CAEtB,KAAK,CAAE,OAAQ,CACf,SAAS,CAAE,KAAM,CAEjB,MAAM,CAAE,OAAQ,CCxCjB,kBAAkB,CD0CI,KAAK,CAAC,IAAG,CAAC,WAAW,CCzC3C,UAAU,CDyCY,KAAK,CAAC,IAAG,CAAC,WAAW,CAQ1C,AA9FF,AAsE+B,QAtEvB,CAAG,UAAU,CAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,EAAI,GAAG,AAAA,IAAI,CAAC,IAAI,AAmBhC,MAAM,CAzFT,AAsE+B,QAtEvB,CAAG,UAAU,CAsEhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,EAAI,GAAG,AAAA,IAAI,CAAC,IAAI,AAoBhC,OAAO,AAAA,CACP,KAAK,CAAE,IAAK,CACZ,gBAAgB,CAAE,2CAAG,CACrB,AA7FH,AAiG4C,QAjGpC,CAAG,UAAU,CAiGhB,IAAI,AAAA,IAAK,CAAA,AAAA,KAAK,CAAC,IAAK,CAAA,AAAA,OAAO,EAAI,GAAG,AAAA,IAAI,CAAC,IAAI,AAAA,CAC9C,OAAO,CAAE,IAAK,CACd",
"names": []
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,74 +0,0 @@
@charset "UTF-8";
/* [1] COULEURS
=========================================================*/
/* (1) COULEURS DU THEME $DEFAULT */
/* (2) COULEURS DE THEME $DARK */
/* (3) Couleurs du theme pour la timeline */
/* [2] DIMENSIONS
=========================================================*/
/* (1) Layout de base */
/* [3] Mixins
=========================================================*/
/* [4] Functions
=========================================================*/
/* [1] Formulaire de type timeline
=========================================================*/
#WRAPPER > #CONTAINER section[data-timeline] { display: block; position: relative; background-color: #fff; font-size: .9em; color: #000; /* (1) On ajoute le liseré à droite pour TOUS les éléments */ /* (2) Titres de sections */ /* (3) Titres des sous-sections */ /* (4) Titres genre text message */ /* (5) 'Tags' -> textes sur le liseré gauche */ /* (6) Input d'upload de fichier (css hack) */ /* Contiendra l'input*/ /* Animation de hover*/ /* Animation de .active*/ /* (7) Inputs de type text */ /* (8) Gestion des espacements */ /* (10) Gestion des espacements verticaux */ /* (11) Gestion des custom <select> */ /* (12) Gestion des coloris pour les titres */ /* (13) Gestion de la navigation fléchée */ /* (14) Gestion de l'affichage des MINI fiches et des FICHES relations */ }
#WRAPPER > #CONTAINER section[data-timeline] h5, #WRAPPER > #CONTAINER section[data-timeline] h4, #WRAPPER > #CONTAINER section[data-timeline] h3, #WRAPPER > #CONTAINER section[data-timeline] *.line, #WRAPPER > #CONTAINER section[data-timeline] [data-space] { display: block; color: #333; margin: 0 40px; padding: 5px 60px; border-left: 2px solid #d8e0e9; }
#WRAPPER > #CONTAINER section[data-timeline] h3 { display: block; padding: 20px 40px; font-size: 1.4em; color: #000; font-weight: bold; /* Gestion du before (compteur css) //*/ }
#WRAPPER > #CONTAINER section[data-timeline] h3[data-n]:before { content: attr(data-n); display: inline-block; position: absolute; margin-top: .6em; margin-left: -41px; padding: 3px 12px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 3px #fff; background-color: #738394; font-size: 1.3em; color: #fff; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h4 { display: block; padding: 20px 40px; font-size: 1.2em; color: #46505b; font-weight: bold; /* Gestion du before (compteur css) //*/ }
#WRAPPER > #CONTAINER section[data-timeline] h4[data-icon]:before { content: attr(data-icon); display: inline-block; position: absolute; margin-top: .9em; margin-left: -41px; padding: 9px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 2px #fff; background-color: #738394; font-size: .9em; font-family: 'icomoon'; color: #fff; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h5 { display: block; padding: 20px 40px; font-size: 1.2em; color: #46505b; font-weight: bold; /* Gestion du before (compteur css) //*/ /* Texte genre text message*/ }
#WRAPPER > #CONTAINER section[data-timeline] h5:before { content: ''; display: inline-block; position: absolute; margin-top: .7em; margin-left: -41px; padding: 7px; border-radius: 50%; /* Contour blanc*/ box-shadow: 0 0 0 2px #fff; background-color: #738394; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] h5[data-text]:after { content: attr(data-text); padding: 6px 10px; border-radius: 3px; background: #738394; color: #fff; font-weight: normal; }
#WRAPPER > #CONTAINER section[data-timeline] [data-tag] { display: block; padding: 40px 60px; }
#WRAPPER > #CONTAINER section[data-timeline] [data-tag]:before { content: attr(data-tag); display: inline-block; position: absolute; margin-top: .5em; margin-left: -41px; padding: 2px; background-color: #fff; font-size: 1.2em; color: #738394; font-weight: bold; /* On centre sur la ligne*/ transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -o-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] { position: relative; opacity: 0; z-index: 8; cursor: pointer; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] + span.file-input { display: inline-block; position: absolute; margin-top: -1px; margin-left: -290px; width: calc( 290px - 2*15px ); height: 30px; padding: 0 15px; border-radius: 3px; background: #0e6dbf; color: #ddd; line-height: 30px; font-weight: normal; z-index: 9; cursor: pointer; pointer-events: none; /* Icone d'upload*/ -webkit-transition: background 0.1s ease-in-out; transition: background 0.1s ease-in-out; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'] + span.file-input:before { content: 'e '; font-size: 1em; font-family: 'icomoon'; color: #222; font-weight: bold; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file']:hover + span.file-input { background: #0b528f; box-shadow: inset 0 0 5px #888; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'].active + span.file-input { background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='file'].active + span.file-input:before { content: 'v '; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='text'], #WRAPPER > #CONTAINER section[data-timeline] input[type='password'], #WRAPPER > #CONTAINER section[data-timeline] input[type='number'], #WRAPPER > #CONTAINER section[data-timeline] input[type='button'], #WRAPPER > #CONTAINER section[data-timeline] input[type='submit'], #WRAPPER > #CONTAINER section[data-timeline] input[type='mail'] { display: inline; width: auto; margin: unset; padding: 5px 10px; margin-bottom: 5px; margin-right: 15px; border-radius: 0; border: 0; border-bottom: 1px solid #555; font-size: .8em; font-weight: normal; color: #333; -webkit-transition: border 0.2s ease-in-out, background 0.2s ease-in-out, color 0.2s ease-in-out; transition: border 0.2s ease-in-out, background 0.2s ease-in-out, color 0.2s ease-in-out; /* Animation de @focus*/ }
#WRAPPER > #CONTAINER section[data-timeline] input[type='text']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='password']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='number']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='button']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:focus, #WRAPPER > #CONTAINER section[data-timeline] input[type='mail']:focus { border-color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='submit'] { border-color: #7f2d18; background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:hover, #WRAPPER > #CONTAINER section[data-timeline] input[type='submit']:focus { background: #c04324; }
#WRAPPER > #CONTAINER section[data-timeline] label { color: #555; }
#WRAPPER > #CONTAINER section[data-timeline] [data-space] { padding-top: 20px; padding-bottom: 20px; }
#WRAPPER > #CONTAINER section[data-timeline] .spacetop, #WRAPPER > #CONTAINER section[data-timeline] .spaced { margin-top: 20px !important; }
#WRAPPER > #CONTAINER section[data-timeline] .spacebtm, #WRAPPER > #CONTAINER section[data-timeline] .spaced { margin-bottom: 20px !important; }
#WRAPPER > #CONTAINER section[data-timeline] .nobold, #WRAPPER > #CONTAINER section[data-timeline] .nobold * { font-weight: normal !important; }
#WRAPPER > #CONTAINER section[data-timeline] select { width: auto; display: inline-block; background: transparent; border: 0; -webkit-appearance: none; -moz-appearance: none; text-indent: 1px; text-overflow: ''; font-size: .9em; }
#WRAPPER > #CONTAINER section[data-timeline] select option:not(:disabled) { padding-left: 1.5em; }
#WRAPPER > #CONTAINER section[data-timeline] select option:disabled:not(:first-child) { font-size: 1.2em; color: #000; font-weight: bold; }
#WRAPPER > #CONTAINER section[data-timeline] select option.pad { padding-left: 2.5em; }
#WRAPPER > #CONTAINER section[data-timeline] .select-container select { display: inline-block; padding: 5px 2px; padding-right: 30px; border: none; border-bottom: 1px solid #333; background: #fff url("/src/static/container/bottom_arrow@333333.svg") right 10px center no-repeat; background-size: 10px auto; overflow: hidden; }
#WRAPPER > #CONTAINER section[data-timeline] .select-container select:focus { border-color: #d54b28; background-image: url("/src/static/container/bottom_arrow@d54b28.svg"); }
#WRAPPER > #CONTAINER section[data-timeline] h5.color0, #WRAPPER > #CONTAINER section[data-timeline] h4.color0, #WRAPPER > #CONTAINER section[data-timeline] h3.color0 { color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color0:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color0:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color0:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color0:after { background-color: #0e6dbf; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color1, #WRAPPER > #CONTAINER section[data-timeline] h4.color1, #WRAPPER > #CONTAINER section[data-timeline] h3.color1 { color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color1:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color1:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color1:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color1:after { background-color: #e64e3e; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color2, #WRAPPER > #CONTAINER section[data-timeline] h4.color2, #WRAPPER > #CONTAINER section[data-timeline] h3.color2 { color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color2:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color2:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color2:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color2:after { background-color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color3, #WRAPPER > #CONTAINER section[data-timeline] h4.color3, #WRAPPER > #CONTAINER section[data-timeline] h3.color3 { color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color3:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color3:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color3:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color3:after { background-color: #b14be7; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color4, #WRAPPER > #CONTAINER section[data-timeline] h4.color4, #WRAPPER > #CONTAINER section[data-timeline] h3.color4 { color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline] h5.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h5.color4:after, #WRAPPER > #CONTAINER section[data-timeline] h4.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h4.color4:after, #WRAPPER > #CONTAINER section[data-timeline] h3.color4:before, #WRAPPER > #CONTAINER section[data-timeline] h3.color4:after { background-color: #053b5d; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span { display: inline-block; position: relative; margin: .3em 0; padding: .5em .8em; border: 1px solid #b7c6d7; color: #7692b2; cursor: pointer; -webkit-transition: 0.2s ease-in-out; transition: 0.2s ease-in-out; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(:last-child):not(.lc) { border-right: 0; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:first-child, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.fc { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:last-child, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.lc { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done { font-weight: bold; color: #d54b28; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done:hover, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span.done.active { border-color: #d54b28; background: #d54b28; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done) { font-weight: bold; color: #333; }
#WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done):hover, #WRAPPER > #CONTAINER section[data-timeline] .arrow-container span:not(.done).active { border-color: #aaa; background: #aaa; color: #fff; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] { display: none; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content { display: table; position: relative; margin: .5em 0; padding: 1em; border-radius: 3px; border: 1px solid #ddd; background: #fff; color: #555; font-size: 1.1em; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; font-style: italic; padding-left: 2em; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:before { border-radius: 50% / 50%; border: 0; background: #aaa; cursor: pointer; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:hover { text-decoration: none; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content span { color: #000; font-style: normal; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox'] + label.matrice-content:hover { border-color: #bcbcbc; background-color: #f2f2f2; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label { border-color: #07ca64; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label:before { background: #07ca64; }
#WRAPPER > #CONTAINER section[data-timeline] div.matrice input[type='checkbox']:checked + label:hover { border-color: #04803f; }

View File

@ -1,505 +0,0 @@
/* [0] Gestion des constructeurs HTML
=========================================================*/
/* (1) Constructeur de formulaire de contact */
var pContactBuilder = new HTMLBuilder();
pContactBuilder.setLayout(
"<h4 data-icon='o' class='new-contact color2'> \n"+
"\t<input type='hidden' data-name='uid' value='@uid'>\n"+
// "\t<input type='hidden' data-name='call' value='@call'>\n"+
// "\t<input type='hidden' data-name='sms' value='@sms'>\n"+
//
// "\t<input type='hidden' data-name='countcall' value='@countcall'>\n"+
// "\t<input type='hidden' data-name='countsms' value='@countsms'>\n"+
//
// "\t<input type='text' data-name='number' placeholder='Numéro de téléphone' value='@number' > \n"+
"\t<span class='select-container nobold'><select data-name='existing'>\n"+
"\t\t<option value='.'>Contact existant</option>\n"+
"@contacts"+
"\t</select></span>\n"+
"\t&nbsp;&nbsp;&nbsp;&nbsp;ou&nbsp;&nbsp;&nbsp;&nbsp;\n"+
"\t<input type='text' data-name='username' placeholder='Pseudo' value='@username' > \n"+
"\t<input type='submit' class='primary sub-number' value='Enregistrer'>\n"+
"</h4>\n\n");
/* (2) Constructeur de MINI fiche de relation */
var pMiniFicheBuilder = new HTMLBuilder();
pMiniFicheBuilder.setLayout(
"<article class='mini-fiche-relation'>\n"+
"\t<input type='hidden' data-name='uid' value='@uid'>\n"+
"\t<span data-space></span>\n"+
"\t<h4 data-icon='a' class='color2'>@name</h4>\n"+
"\t<h5 class='nobold color0'>"+
"\t\t<input type='checkbox' data-name='unknown' id='unknown_min_p_@uid' value='1'><label for='unknown_min_p_@uid'>Contact inconnu</label>"+
"\t</h5>"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<input type='radio' name='sexe_mini_p_@uid' data-name='sexe' id='sexeH_mini_p_@uid' value='0'><label for='sexeH_mini_p_@uid'>Homme</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='sexe_mini_p_@uid' data-name='sexe' id='sexeF_mini_p_@uid' value='1'><label for='sexeF_mini_p_@uid'>Femme</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='sexe_mini_p_@uid' data-name='sexe' id='sexeI_mini_p_@uid' value='2'><label for='sexeI_mini_p_@uid'>Indéterminé</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='age'>\n"+
"\t\t\t<option value='.' disabled selected>Age:</option>\n"+
"\t\t\t<option value='0' >5 à 10 ans</option>\n"+
"\t\t\t<option value='2' >10 à 15 ans</option>\n"+
"\t\t\t<option value='3' >15 à 20 ans</option>\n"+
"\t\t\t<option value='4' >20 à 25 ans</option>\n"+
"\t\t\t<option value='5' >25 à 30 ans</option>\n"+
"\t\t\t<option value='6' >30 à 35 ans</option>\n"+
"\t\t\t<option value='7' >35 à 40 ans</option>\n"+
"\t\t\t<option value='8' >40 à 45 ans</option>\n"+
"\t\t\t<option value='9' >45 à 50 ans</option>\n"+
"\t\t\t<option value='10'>50 à 55 ans</option>\n"+
"\t\t\t<option value='11'>55 à 60 ans</option>\n"+
"\t\t\t<option value='12'>60 à 65 ans</option>\n"+
"\t\t\t<option value='13'>65 à 70 ans</option>\n"+
"\t\t\t<option value='14'>70 à 75 ans</option>\n"+
"\t\t\t<option value='15'>75 à 80 ans</option>\n"+
"\t\t\t<option value='16'>80 à 85 ans</option>\n"+
"\t\t\t<option value='17'>85 à 90 ans</option>\n"+
"\t\t\t<option value='18'>90 à 95 ans</option>\n"+
"\t\t\t<option value='19'>95 à 100 ans</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='studies'>\n"+
"\t\t\t<option value='.' disabled selected>Niveau d'études maximal:</option>\n"+
"\t\t\t<option value='0'>Inconnu</option>\n"+
"\t\t\t<option value='1'>< BAC</option>\n"+
"\t\t\t<option value='2'>BAC</option>\n"+
"\t\t\t<option value='3'>BAC+2</option>\n"+
"\t\t\t<option value='4'>BAC+3</option>\n"+
"\t\t\t<option value='5'>BAC+5 et plus</option>\n"+
"\t\t\t<option value='6'>Diplôme d'ingénieur, d'une grande école, etc.</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='a'>Type de relation</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype0_mini_p_@uid' value='0'><label for='reltype0_mini_p_@uid'>Père, mère ou équivalent</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype1_mini_p_@uid' value='1'><label for='reltype1_mini_p_@uid'>Frère ou soeur</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype2_mini_p_@uid' value='2'><label for='reltype2_mini_p_@uid'>Autre membre de la famille</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype3_mini_p_@uid' value='3'><label for='reltype3_mini_p_@uid'>Relation amoureuse</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype4_mini_p_@uid' value='4'><label for='reltype4_mini_p_@uid'>Collègue</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype5_mini_p_@uid' value='5'><label for='reltype5_mini_p_@uid'>Voisin</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype6_mini_p_@uid' value='6'><label for='reltype6_mini_p_@uid'>Ami/Copain</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype9_mini_p_@uid' value='9'><label for='reltype9_mini_p_@uid'>Inconnu</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_mini_p_@uid' data-name='reltype' id='reltype10_mini_p_@uid' value='10'><label for='reltype10_mini_p_@uid'>Autre : <input type='text' data-name='reltypeSpecial' placeholder='coéquipier de tennis, ..' value='@reltypespecial'></label><br>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='m'>Où habite t-elle/il ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tÀ combien de temps est-ce de chez vous ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_mini_p_@uid' data-name='loc' id='locX_mini_p_@uid' value='.'><label for='locX_mini_p_@uid'>Je ne sais pas</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_mini_p_@uid' data-name='loc' id='locA_mini_p_@uid' value='0'><label for='locA_mini_p_@uid'>- de 5 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_mini_p_@uid' data-name='loc' id='locB_mini_p_@uid' value='1'><label for='locB_mini_p_@uid'>de 5 à 15 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_mini_p_@uid' data-name='loc' id='locC_mini_p_@uid' value='2'><label for='locC_mini_p_@uid'>de 15 à 60 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_mini_p_@uid' data-name='loc' id='locD_mini_p_@uid' value='3'><label for='locD_mini_p_@uid'>+ d'une heure</label><br>\n"+
"\t</h5>\n"+
"</article>");
/* (3) Constructeur de formulaire fiche relation */
var pFicheBuilder = new HTMLBuilder();
pFicheBuilder.setLayout(
"<article class='fiche-relation'>\n"+
"\t<input type='hidden' data-name='contact' value='@contact'>\n"+
"\t<input type='hidden' data-name='uid' value='@uid'>\n"+
"\t<h4 data-icon='a' class='color2'>@name</h4>\n"+
"\t<h5 class='nobold color0'>"+
"\t\t@importedfiche"+
"\t</h5>"+
// "\t<h5 class='nobold color0'>"+
// "\t\t@countsms sms"+
// "\t</h5>"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<input type='radio' name='sexe_p_@uid' data-name='sexe' id='sexeH_p_@uid' value='0'><label for='sexeH_p_@uid'>Homme</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='sexe_p_@uid' data-name='sexe' id='sexeF_p_@uid' value='1'><label for='sexeF_p_@uid'>Femme</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='sexe_p_@uid' data-name='sexe' id='sexeI_p_@uid' value='2'><label for='sexeI_p_@uid'>Indéterminé</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='age'>\n"+
"\t\t\t<option value='.' disabled selected>Age:</option>\n"+
"\t\t\t<option value='0' >5 à 10 ans</option>\n"+
"\t\t\t<option value='1' >10 à 15 ans</option>\n"+
"\t\t\t<option value='2' >15 à 20 ans</option>\n"+
"\t\t\t<option value='3' >20 à 25 ans</option>\n"+
"\t\t\t<option value='4' >25 à 30 ans</option>\n"+
"\t\t\t<option value='5' >30 à 35 ans</option>\n"+
"\t\t\t<option value='6' >35 à 40 ans</option>\n"+
"\t\t\t<option value='7' >40 à 45 ans</option>\n"+
"\t\t\t<option value='8' >45 à 50 ans</option>\n"+
"\t\t\t<option value='9' >50 à 55 ans</option>\n"+
"\t\t\t<option value='10'>55 à 60 ans</option>\n"+
"\t\t\t<option value='11'>60 à 65 ans</option>\n"+
"\t\t\t<option value='12'>65 à 70 ans</option>\n"+
"\t\t\t<option value='13'>70 à 75 ans</option>\n"+
"\t\t\t<option value='14'>75 à 80 ans</option>\n"+
"\t\t\t<option value='15'>80 à 85 ans</option>\n"+
"\t\t\t<option value='16'>85 à 90 ans</option>\n"+
"\t\t\t<option value='17'>90 à 95 ans</option>\n"+
"\t\t\t<option value='18'>95 à 100 ans</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='job'>\n"+
"\t\t\t<option value='.' disabled selected>Dernière profession exercée:</option>\n"+
"\t\t\t<option value='0'>Agriculateur exploitants</option>\n"+
"\t\t\t<option value='1'>Artisans</option>\n"+
"\t\t\t<option value='2'>Commerçants et assimilés</option>\n"+
"\t\t\t<option value='3'>Chefs d'entreprise de 10 salariés ou plus</option>\n"+
"\t\t\t<option value='4'>Professions libérales et assimilés</option>\n"+
"\t\t\t<option value='5'>Cadres de la fonction publique, professions intellectuelles et artistiques</option>\n"+
"\t\t\t<option value='6'>Cadres d'entreprise</option>\n"+
"\t\t\t<option value='7'>Professions intermétiaires de l'enseignement, de la santé, de la fonction publique et assimilés</option>\n"+
"\t\t\t<option value='8'>Professions intermédiaires administratives et commerciales des entreprises</option>\n"+
"\t\t\t<option value='9'>Techniciens</option>\n"+
"\t\t\t<option value='10'>Contremaîtres, agents de maîtrise</option>\n"+
"\t\t\t<option value='11'>Employés</option>\n"+
"\t\t\t<option value='12'>Ouvriers</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tSituation familiale:<br>\n"+
"\t\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='famsit_p_@uid' data-name='famsit' id='famsitA_p_@uid' value='0'><label for='famsitA_p_@uid'>Seul</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='famsit_p_@uid' data-name='famsit' id='famsitB_p_@uid' value='1'><label for='famsitB_p_@uid'>Seul avec enfant(s)</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='famsit_p_@uid' data-name='famsit' id='famsitC_p_@uid' value='2'><label for='famsitC_p_@uid'>En couple sans enfants</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='famsit_p_@uid' data-name='famsit' id='famsitD_p_@uid' value='3'><label for='famsitD_p_@uid'>En couple avec enfants</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='studies'>\n"+
"\t\t\t<option value='.' disabled selected>Niveau d'études maximal:</option>\n"+
"\t\t\t<option value='0'>Aucun diplôme, CEP, BEPC</option>\n"+
"\t\t\t<option value='1'>CAP, CAPA, BEP, BEPA, Brevet de compagnon, Diplômes sociaux (aide-soignante, auxiliaire de puériculture, travailleuse familiale)</option>\n"+
"\t\t\t<option value='2'>Bac technologique ou professionnel, brevet professionnel ou de technicien</option>\n"+
"\t\t\t<option value='3'>Baccalauréat général, brevet supérieur</option>\n"+
"\t\t\t<option value='4'>Diplôme universitaire de 1er cycle: Licence, BTS, DUT</option>\n"+
"\t\t\t<option value='5'>Diplôme universitaire de 2ème cycle : MASTER, Maîtrise ou DEA, CAPES</option>\n"+
"\t\t\t<option value='6'>Doctorat (y compris médecine, pharmacie, dentaire)</option>\n"+
"\t\t\t<option value='7'>Diplôme d'ingénieur, diplôme d'une grande école de commerce</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='a'>Type de relation</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype0_p_@uid' value='0'><label for='reltype0_p_@uid'>Père, mère ou équivalent</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype1_p_@uid' value='1'><label for='reltype1_p_@uid'>Frère ou soeur</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype2_p_@uid' value='2'><label for='reltype2_p_@uid'>Autre membre de la famille</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype3_p_@uid' value='3'><label for='reltype3_p_@uid'>Relation amoureuse</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype4_p_@uid' value='4'><label for='reltype4_p_@uid'>Collègue</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype5_p_@uid' value='5'><label for='reltype5_p_@uid'>Voisin</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype6_p_@uid' value='6'><label for='reltype6_p_@uid'>Ami/Copain</label><br>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype7_p_@uid' value='7'><label for='reltype7_p_@uid'>Ami</label><br>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype8_p_@uid' value='8'><label for='reltype8_p_@uid'>Relation de service (médecin, ...)</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='reltype_p_@uid' data-name='reltype' id='reltype10_p_@uid' value='10'><label for='reltype10_p_@uid'>Autre : <input type='text' data-name='reltypeSpecial' placeholder='coéquipier de tennis, ..' value='@reltypespecial'></label><br>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='m'>Où habite t-elle/il ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t<input type='text' data-name='city' placeholder='Ville' value='@city'>\n"+
"\t\t<input type='text' data-name='cp' placeholder='Code postal' value='@cp'><br>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tSi Toulouse : <input type='text' data-name='quartier' placeholder='quartier' value='@quartier'>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tÀ combien de temps est-ce de chez vous (en voiture) ?<br>\n"+
"\t\t(si deux domiciles, le plus proche)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_p_@uid' data-name='loc' id='locA_p_@uid' value='0'><label for='locA_p_@uid'>- de 5 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_p_@uid' data-name='loc' id='locB_p_@uid' value='1'><label for='locB_p_@uid'>de 5 à 15 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_p_@uid' data-name='loc' id='locC_p_@uid' value='2'><label for='locC_p_@uid'>de 15 à 60 minutes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='loc_p_@uid' data-name='loc' id='locD_p_@uid' value='3'><label for='locD_p_@uid'>+ d'une heure</label><br>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tDepuis quand connaissez-vous cette personne ?<br><br>\n"+
"\t\t<input type='number' style='width: 5em;' data-name='duration' min='0' max='11' step='1' placeholder='mois' value='@duration0'>mois\n"+
"\t\tet &nbsp;&nbsp;&nbsp;<input type='number' style='width: 5em;' data-name='duration' min='0' max='100' step='1' placeholder='années' value='@duration1'>ans.\n"+
"\t</h5>\n"+
"\t<h4 data-icon='d'>Contexte de rencontre</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte0_p_@uid' value='0'><label for='contexte0_p_@uid'>De la même famille</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte1_p_@uid' value='1'><label for='contexte1_p_@uid'>Grandi ensemble</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte2_p_@uid' value='2'><label for='contexte2_p_@uid'>Par mon conjoint/partenaire</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte3_p_@uid' value='3'><label for='contexte3_p_@uid'>Par mes parents</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte4_p_@uid' value='4'><label for='contexte4_p_@uid'>Par mes enfants</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte5_p_@uid' value='5'><label for='contexte5_p_@uid'>Par un ami</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte6_p_@uid' value='6'><label for='contexte6_p_@uid'>Comme voisin</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte7_p_@uid' value='7'><label for='contexte7_p_@uid'>Par dautres membres de la famille</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte8_p_@uid' value='8'><label for='contexte8_p_@uid'>Etudes</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte9_p_@uid' value='9'><label for='contexte9_p_@uid'>Etudes supérieures</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte10_p_@uid' value='10'><label for='contexte10_p_@uid'>Au travail</label><br>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte11_p_@uid' value='11'><label for='contexte11_p_@uid'>Internet (quel contexte ? préciser <input type='text' data-name='contextSpecial' placeholder='facebook, youtube, twitter, ..' value='@contextspecial0'>)</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte12_p_@uid' value='12'><label for='contexte12_p_@uid'>Par une association (quel type : <input type='text' data-name='contextSpecial' placeholder='aide à la personne, sport, ..' value='@contextspecial1'>)</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='contexte_p_@uid' data-name='context' id='contexte13_p_@uid' value='13'><label for='contexte13_p_@uid'>Autre : <input type='text' data-name='contextSpecial' placeholder='vacances, ..' value='@contextspecial2'></label><br>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='b'>Avec quelle fréquence discutez-vous avec cette personne ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tFace à face<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq0_p_@uid' data-name='freq' id='freq01_p_@uid' value='0'><label for='freq01_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq0_p_@uid' data-name='freq' id='freq02_p_@uid' value='1'><label for='freq02_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq0_p_@uid' data-name='freq' id='freq03_p_@uid' value='2'><label for='freq03_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq0_p_@uid' data-name='freq' id='freq04_p_@uid' value='3'><label for='freq04_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq0_p_@uid' data-name='freq' id='freq05_p_@uid' value='4'><label for='freq05_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tTéléphone ou skype et équivalent<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq1_p_@uid' data-name='freq' id='freq06_p_@uid' value='5'><label for='freq06_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq1_p_@uid' data-name='freq' id='freq07_p_@uid' value='6'><label for='freq07_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq1_p_@uid' data-name='freq' id='freq08_p_@uid' value='7'><label for='freq08_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq1_p_@uid' data-name='freq' id='freq09_p_@uid' value='8'><label for='freq09_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq1_p_@uid' data-name='freq' id='freq10_p_@uid' value='9'><label for='freq10_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tSMS, et équivalents<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq2_p_@uid' data-name='freq' id='freq11_p_@uid' value='10'><label for='freq11_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq2_p_@uid' data-name='freq' id='freq12_p_@uid' value='11'><label for='freq12_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq2_p_@uid' data-name='freq' id='freq13_p_@uid' value='12'><label for='freq13_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq2_p_@uid' data-name='freq' id='freq14_p_@uid' value='13'><label for='freq14_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq2_p_@uid' data-name='freq' id='freq15_p_@uid' value='14'><label for='freq15_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tCourrier électronique<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq3_p_@uid' data-name='freq' id='freq16_p_@uid' value='15'><label for='freq16_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq3_p_@uid' data-name='freq' id='freq17_p_@uid' value='16'><label for='freq17_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq3_p_@uid' data-name='freq' id='freq18_p_@uid' value='17'><label for='freq18_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq3_p_@uid' data-name='freq' id='freq19_p_@uid' value='18'><label for='freq19_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq3_p_@uid' data-name='freq' id='freq20_p_@uid' value='19'><label for='freq20_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tFacebook ou autre réseau social<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq4_p_@uid' data-name='freq' id='freq21_p_@uid' value='20'><label for='freq21_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq4_p_@uid' data-name='freq' id='freq22_p_@uid' value='21'><label for='freq22_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq4_p_@uid' data-name='freq' id='freq23_p_@uid' value='22'><label for='freq23_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq4_p_@uid' data-name='freq' id='freq24_p_@uid' value='23'><label for='freq24_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='freq4_p_@uid' data-name='freq' id='freq25_p_@uid' value='24'><label for='freq25_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='r'>Comment êtes-vous « connecté » à cette personne ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tSes coordonnées sont dans votre carnet dadresse<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect1_p_@uid' data-name='connect' id='connect11_p_@uid' value='0'><label for='connect11_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect1_p_@uid' data-name='connect' id='connect12_p_@uid' value='1'><label for='connect12_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tSon numéro de mobile est enregistré sur votre mobile (ou vous-mêmes êtes sur le sien)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect2_p_@uid' data-name='connect' id='connect21_p_@uid' value='2'><label for='connect21_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect2_p_@uid' data-name='connect' id='connect22_p_@uid' value='3'><label for='connect22_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tElle figure parmi vos amis facebook (idem)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect3_p_@uid' data-name='connect' id='connect31_p_@uid' value='4'><label for='connect31_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect3_p_@uid' data-name='connect' id='connect32_p_@uid' value='5'><label for='connect32_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tElle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif régulièrement (idem)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect4_p_@uid' data-name='connect' id='connect41_p_@uid' value='6'><label for='connect41_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect4_p_@uid' data-name='connect' id='connect42_p_@uid' value='7'><label for='connect42_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tVous le suivez sur Twitter (ou elle vous suit)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect5_p_@uid' data-name='connect' id='connect51_p_@uid' value='8'><label for='connect51_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect5_p_@uid' data-name='connect' id='connect52_p_@uid' value='9'><label for='connect52_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tVous communiquez avec cette personne sur Twitter (idem)<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect6_p_@uid' data-name='connect' id='connect61_p_@uid' value='10'><label for='connect61_p_@uid'>Oui</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='connect6_p_@uid' data-name='connect' id='connect62_p_@uid' value='11'><label for='connect62_p_@uid'>Non</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tVous communiquez dans autre réseau : <input type='text' data-name='connectSpecial' value='@connectspecial0'>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tVous communiquez dans un autre dispositif (blogs, jeu vidéo ou autre) : <input type='text' data-name='connectSpecial' value='@connectspecial1'>\n"+
"\t</h5>\n"+
// RELEASE v2
"\t<h4 data-icon='g'>Comment cette personne utilise-t-elle les médias sociaux de votre point de vue ? Il s'agit :</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medsoc_p_@uid' data-name='medsoc' id='medsocA_p_@uid' value='0'><label for='medsocA_p_@uid'>D'une personne qui n'utilise pas ou peu les médias sociaux</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medsoc_p_@uid' data-name='medsoc' id='medsocB_p_@uid' value='1'><label for='medsocB_p_@uid'>D'une personne qui consulte des publications mais partage peu de contenus</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medsoc_p_@uid' data-name='medsoc' id='medsocC_p_@uid' value='2'><label for='medsocC_p_@uid'>D'une personne qui consulte des publication et partage des contenus de temps en temps</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medsoc_p_@uid' data-name='medsoc' id='medsocD_p_@uid' value='3'><label for='medsocD_p_@uid'>D'une personne qui partage beaucoup de contenus et s'exprime fréquemment</label><br>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>Sur une échelle de 1 à 5, préciser l'intérêt que vous accordez aux contenue qu'elle partage via les médias sociaux<br><br>\n"+
// "\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='interest'>\n"+
"\t\t\t<option value='.' disabled selected>Intérêt</option>\n"+
"\t\t\t<option value='0'>1 - Ne vous intéresse pas</option>\n"+
"\t\t\t<option value='1'>2</option>\n"+
"\t\t\t<option value='2'>3</option>\n"+
"\t\t\t<option value='3'>4</option>\n"+
"\t\t\t<option value='4'>5 - Vous intéresse beaucoup</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h4 data-icon='z'>Selon vous, à quelle fréquence cette personne ?</h4>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tPublie des commentaires personnels ou réagit aux publications des autres ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq0_p_@uid' data-name='irlfreq' id='irlfreq01_p_@uid' value='0'><label for='irlfreq01_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq0_p_@uid' data-name='irlfreq' id='irlfreq02_p_@uid' value='1'><label for='irlfreq02_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq0_p_@uid' data-name='irlfreq' id='irlfreq03_p_@uid' value='2'><label for='irlfreq03_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq0_p_@uid' data-name='irlfreq' id='irlfreq04_p_@uid' value='3'><label for='irlfreq04_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq0_p_@uid' data-name='irlfreq' id='irlfreq05_p_@uid' value='4'><label for='irlfreq05_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tPublie des photos personnelles (profil, voyages, etc.) ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq1_p_@uid' data-name='irlfreq' id='irlfreq06_p_@uid' value='5'><label for='irlfreq06_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq1_p_@uid' data-name='irlfreq' id='irlfreq07_p_@uid' value='6'><label for='irlfreq07_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq1_p_@uid' data-name='irlfreq' id='irlfreq08_p_@uid' value='7'><label for='irlfreq08_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq1_p_@uid' data-name='irlfreq' id='irlfreq09_p_@uid' value='8'><label for='irlfreq09_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq1_p_@uid' data-name='irlfreq' id='irlfreq10_p_@uid' value='9'><label for='irlfreq10_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tPartage de la musique ou des clips musicaux ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq2_p_@uid' data-name='irlfreq' id='irlfreq11_p_@uid' value='10'><label for='irlfreq11_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq2_p_@uid' data-name='irlfreq' id='irlfreq12_p_@uid' value='11'><label for='irlfreq12_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq2_p_@uid' data-name='irlfreq' id='irlfreq13_p_@uid' value='12'><label for='irlfreq13_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq2_p_@uid' data-name='irlfreq' id='irlfreq14_p_@uid' value='13'><label for='irlfreq14_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq2_p_@uid' data-name='irlfreq' id='irlfreq15_p_@uid' value='14'><label for='irlfreq15_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tPartage des informations culturelles (concert, exposition, etc.) ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq3_p_@uid' data-name='irlfreq' id='irlfreq16_p_@uid' value='15'><label for='irlfreq16_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq3_p_@uid' data-name='irlfreq' id='irlfreq17_p_@uid' value='16'><label for='irlfreq17_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq3_p_@uid' data-name='irlfreq' id='irlfreq18_p_@uid' value='17'><label for='irlfreq18_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq3_p_@uid' data-name='irlfreq' id='irlfreq19_p_@uid' value='18'><label for='irlfreq19_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq3_p_@uid' data-name='irlfreq' id='irlfreq20_p_@uid' value='19'><label for='irlfreq20_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\tPartage des articles, des informations, des contenus avec une portée politique ?<br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq4_p_@uid' data-name='irlfreq' id='irlfreq21_p_@uid' value='20'><label for='irlfreq21_p_@uid'>plusieurs fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq4_p_@uid' data-name='irlfreq' id='irlfreq22_p_@uid' value='21'><label for='irlfreq22_p_@uid'>1 fois par semaine</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq4_p_@uid' data-name='irlfreq' id='irlfreq23_p_@uid' value='22'><label for='irlfreq23_p_@uid'>1 fois par mois</label>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq4_p_@uid' data-name='irlfreq' id='irlfreq24_p_@uid' value='23'><label for='irlfreq24_p_@uid'>1 fois par an ou moins</label>\n"+
// "\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='irlfreq4_p_@uid' data-name='irlfreq' id='irlfreq25_p_@uid' value='24'><label for='irlfreq25_p_@uid'>Jamais</label>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>Sur une échelle de 1 à 5, comment jugez-vous votre relation à cette personne ?<br><br>\n"+
// "\t<h5 class='nobold color0'>\n"+
"\t\t<span class='select-container'><select data-name='relmark'>\n"+
"\t\t\t<option value='.' disabled selected>Relation</option>\n"+
"\t\t\t<option value='0'>1 - Pas du tout proche</option>\n"+
"\t\t\t<option value='1'>2</option>\n"+
"\t\t\t<option value='2'>3</option>\n"+
"\t\t\t<option value='3'>4</option>\n"+
"\t\t\t<option value='4'>5 - Très proche</option>\n"+
"\t\t</select></span>\n"+
"\t</h5>\n"+
"\t<h5 class='nobold color0'>Considérez-vous que vos échange avec cette personne à travers les médias sociaux: </h5>\n"+
"\t<h5 class='nobold color0'>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medrel_p_@uid' data-name='medrel' id='medrelA_p_@uid' value='0'><label for='medrelA_p_@uid'>N'ont aucun effet sur votre relation</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medrel_p_@uid' data-name='medrel' id='medrelB_p_@uid' value='1'><label for='medrelB_p_@uid'>Vous ont rapproché d'elle</label><br>\n"+
"\t\t&nbsp;&nbsp;&nbsp;<input type='radio' name='medrel_p_@uid' data-name='medrel' id='medrelC_p_@uid' value='2'><label for='medrelC_p_@uid'>Vous ont éloigné d'elle</label><br>\n"+
"\t</h5>\n"+
"</article>\n");

View File

@ -1,28 +0,0 @@
function inputFacebookFiche(a,b){this.container=a;this.nav_container=b;this.top_size=10}
inputFacebookFiche.prototype={container:this.container,nav_container:this.nav_container,selected:0,handler:null,defaultData:{sexe:"2",age:".",interest:".",relmark:".",job:".",famsit:"0",studies:".",reltype:"0",reltypeSpecial:"",city:"",quartier:"",cp:"",loc:"0",duration:["",""],context:"0",contextSpecial:["","",""],freq:["3","8","13","18","23"],irlfreq:["3","8","13","18","23"],connect:"1 3 5 7 9 11".split(" "),connectSpecial:["",""],medsoc:"0",medrel:"0",timestamp:0,valid:!1}};
inputFacebookFiche.prototype.fieldsToStorage=function(){console.group("[facebook.fiche] fields to storage");var a,b,c,d,e,h=$$('[data-sublink="facebook"] article.relation-panel .fiche-relation');a=0;for(b=h.length;a<b;a++)if(c=new FormDeflater(h[a],["input","select"],["data-name"]),d=c.deflate(),c=lsi.get("f_fiches",d.uid))d={sexe:d.sexe,age:d.age,interest:d.interest,relmark:d.relmark,job:d.job,famsit:d.famsit,studies:d.studies,reltype:d.reltype,reltypeSpecial:d.reltypeSpecial,city:d.city,quartier:d.quartier,
cp:d.cp,loc:d.loc,duration:d.duration,context:d.context,medsoc:d.medsoc,medrel:d.medrel,contextSpecial:d.contextSpecial,freq:d.freq,irlfreq:d.irlfreq,connect:d.connect,connectSpecial:d.connectSpecial,uid:parseInt(d.uid),contact:parseInt(d.contact)},e=crc32(JSON.stringify(d)),c.hasOwnProperty("hash")&&e==c.hash||(d.hash=e,d.valid=this.check(d),d.timestamp=Date.now(),console.warn("> FICHE UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("f_fiches",d.uid,d));console.groupEnd()};
inputFacebookFiche.prototype.add=function(a){if(null==a.uid||isNaN(a.uid)||null==a.contact||isNaN(a.contact))return!1;a.city=null!=a.city?a.city:this.defaultData.city;a.quartier=null!=a.quartier?a.quartier:this.defaultData.quartier;a.cp=null!=a.cp?a.cp:this.defaultData.cp;a.duration[0]=null!=a.duration[0]?a.duration[0]:this.defaultData.duration[0];a.duration[1]=null!=a.duration[1]?a.duration[1]:this.defaultData.duration[1];a.reltypeSpecial=null!=a.reltypeSpecial?a.reltypeSpecial:this.defaultData.reltypeSpecial;
a.contextSpecial[0]=null!=a.contextSpecial[0]?a.contextSpecial[0]:this.defaultData.contextSpecial[0];a.contextSpecial[1]=null!=a.contextSpecial[1]?a.contextSpecial[1]:this.defaultData.contextSpecial[1];a.contextSpecial[2]=null!=a.contextSpecial[2]?a.contextSpecial[2]:this.defaultData.contextSpecial[2];a.connectSpecial[0]=null!=a.connectSpecial[0]?a.connectSpecial[0]:this.defaultData.connectSpecial[0];a.connectSpecial[1]=null!=a.connectSpecial[1]?a.connectSpecial[1]:this.defaultData.connectSpecial[1];
a.job=null!=a.job?a.job:this.defaultData.job;a.studies=null!=a.studies?a.studies:this.defaultData.studies;a.age=null!=a.age?a.age:this.defaultData.age;a.interest=null!=a.interest?a.interest:this.defaultData.interest;a.relmark=null!=a.relmark?a.relmark:this.defaultData.relmark;a.sexe=null!=a.sexe?a.sexe:this.defaultData.sexe;a.famsit=null!=a.famsit?a.famsit:this.defaultData.famsit;a.reltype=null!=a.reltype?a.reltype:this.defaultData.reltype;a.loc=null!=a.loc?a.loc:this.defaultData.loc;a.context=null!=
a.context?a.context:this.defaultData.context;a.medsoc=null!=a.medsoc?a.medsoc:this.defaultData.medsoc;a.medrel=null!=a.medrel?a.medrel:this.defaultData.medrel;a.freq=null!=a.freq?a.freq:this.defaultData.freq;a.irlfreq=null!=a.irlfreq?a.irlfreq:this.defaultData.irlfreq;a.connect=null!=a.connect?a.connect:this.defaultData.connect;var b=lsi.get("f_contacts",a.contact);if(!1===b)return!1;var c="";isNaN(b.existing)||(c=lsi.get("f_friends",b.existing),b.username=c.name,a.age=c.age,a.sexe=c.sexe,a.loc=c.dist,
isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial=""),null!=c.studies2?(a.studies=c.studies2,a.interest=c.interest,a.relmark=c.relmark,a.job=c.job,a.famsit=c.famsit,a.city=c.city,a.cp=c.cp,a.quartier=c.quartier,a.duration[0]=c.duration[0],a.duration[1]=c.duration[1],a.context=c.context,a.medsoc=c.medsoc,a.medrel=c.medrel,a.contextSpecial=c.contextExtra,a.connect=c.connect,a.connectSpecial=c.connectExtra,a.freq=c.freq,a.irlfreq=c.irlfreq,c="Contact import\u00e9: non modifiable!"):
c="Contact import\u00e9 (incomplet): modifiable partiellement!");this.container.innerHTML+=fFicheBuilder.build({importedfiche:c,name:b.username,countcall:b.countcall,countsms:b.countsms,uid:a.uid,contact:a.contact,city:a.city,quartier:a.quartier,cp:a.cp,duration0:a.duration[0],duration1:a.duration[1],reltypespecial:a.reltypeSpecial,contextspecial0:a.contextSpecial[0],contextspecial1:a.contextSpecial[1],contextspecial2:a.contextSpecial[2],connectspecial0:a.connectSpecial[0],connectspecial1:a.connectSpecial[1]});
b=$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="job"]>option[value="'+a.job+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+
a.uid+'"] ~ h5>span>select[data-name="age"]>option[value="'+a.age+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="interest"]>option[value="'+a.interest+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="relmark"]>option[value="'+a.relmark+'"]');null!=
b&&b.setAttribute("selected","selected");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(b=0;b<c.length;b++)c[b].value==a.sexe?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="famsit"]');for(b=0;b<c.length;b++)c[b].value==a.famsit?c[b].setAttribute("checked",
"checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');for(b=0;b<c.length;b++)c[b].value==a.reltype?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(b=0;b<c.length;b++)c[b].value==a.loc?c[b].setAttribute("checked",
"checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="context"]');for(b=0;b<c.length;b++)c[b].value==a.context?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="medsoc"]');for(b=0;b<c.length;b++)c[b].value==a.medsoc?c[b].setAttribute("checked",
"checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="medrel"]');for(b=0;b<c.length;b++)c[b].value==a.medrel?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="freq"]');for(b=0;b<c.length;b++)-1<a.freq.indexOf(c[b].value)?c[b].setAttribute("checked",
"checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="irlfreq"]');for(b=0;b<c.length;b++)-1<a.irlfreq.indexOf(c[b].value)?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="connect"]');for(b=0;b<c.length;b++)-1<a.connect.indexOf(c[b].value)?
c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked")};inputFacebookFiche.prototype.storageToFields=function(){console.group("[facebook.fiche] storage to fields");var a,b=lsi["export"]("f_fiches");this.container.innerHTML="";for(var c in b)a=cloneObject(b[c]),delete a.hash,delete a.timestamp,delete a.valid,b[c].hash=crc32(JSON.stringify(a)),lsi.set("f_fiches",b[c].uid,b[c]),b[c].uid==this.selected&&this.add(b[c]);this.updateNavBar();console.groupEnd()};
inputFacebookFiche.prototype.sync=function(){console.group("[facebook.fiche] synchronisation");lsi["export"]("f_contacts");var a,b,c,d;d=lsi.keys("f_contacts").length<2*this.top_size?lsi.keys("f_contacts").length:2*this.top_size;for(b=0;b<d;b++)a=lsi.get("f_fiches",b),!a&&(a=this.defaultData),a.uid=b,a.contact=b,lsi.set("f_fiches",b,a);var e,h,g;d={};var l={};a=lsi["export"]("f_fiches");b=lsi["export"]("f_mini-fiches");for(var k in a)if(e=lsi.get("f_contacts",a[k].contact),!(0<e.username.length&&
void 0!=d[e.username]||0==e.username.length&&void 0!=l[e.existing])&&(0<e.username.length?d[e.username]=0:l[e.existing]=0,e)){var f=[["fiche",a[k]]];for(c in a)h=lsi.get("f_contacts",a[c].contact),c!=k&&h&&(g=0<h.username.length&&e.username===h.username,h=!isNaN(h.existing)&&e.existing===h.existing,(g||h)&&f.push(["fiche",a[c]]));for(c in b)h=lsi.get("f_contacts",b[c].contact),g=0<h.username.length&&e.username===h.username,h=!isNaN(h.existing)&&e.existing===h.existing,(g||h)&&f.push(["mini",b[c]]);
if(1!==f.length){e=[];for(c in f)e[c]=f[c][1].hasOwnProperty("timestamp")?f[c][1].timestamp:0;g=e.indexOf(Math.max.apply(Math,e));for(c in f)c!=g&&(f[c][0]==f[g][0]?(e=cloneObject(f[g][1]),e.uid=f[c][1].uid,lsi.set("f_fiches",e.uid,e)):"fiche"==f[g][0]?(e=cloneObject(f[c][1]),e.age=f[g][1].age,e.sexe=f[g][1].sexe,e.loc=f[g][1].loc,e.reltype=f[g][1].reltype,e.reltypeSpecial=f[g][1].reltypeSpecial,lsi.set("f_mini-fiches",e.uid,e)):(e=cloneObject(f[c][1]),e.age=f[g][1].age,e.sexe=f[g][1].sexe,e.loc=
f[g][1].loc,e.reltype=f[g][1].reltype,e.reltypeSpecial=f[g][1].reltypeSpecial,"."==f[g][1].loc&&(e.loc="0"),"9"==f[g][1].reltype&&(e.reltype="10",e.reltypeSpecial="inconnu"),lsi.set("f_fiches",e.uid,e)))}}console.groupEnd()};
inputFacebookFiche.prototype.nav=function(a){if(!(a instanceof Element&&a.getData("n"))||isNaN(a.getData("n"))||"f_nav-fiche"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="facebook"] #f_nav-fiche > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
inputFacebookFiche.prototype.updateNavBar=function(){var a=lsi["export"]("f_fiches");this.nav_container.innerHTML="";for(var b=Object.keys(a),c=0;c<b.length;c++){var d=parseInt(b[c]);0==d&&(this.nav_container.innerHTML+="<span>HISTORIQUE</span>");20>d&&c<b.length-1&&20<=b[c+1]?this.nav_container.innerHTML+='<span data-n="'+d+'" class="lc">'+(d%20+1)+"</span>&nbsp;&nbsp;":(20==d&&(this.nav_container.innerHTML+='<br><span class="fc">MESSENGER&nbsp;</span>'),this.nav_container.innerHTML+='<span data-n="'+
d+'">'+(d%20+1)+"</span>")}for(var e in a)b=$('[data-sublink="facebook"] #f_nav-fiche [data-n="'+a[e].uid+'"]'),null!=b&&(!0===a[e].valid?b.addClass("done"):b.remClass("done"));this.nav($('[data-sublink="facebook"] #f_nav-fiche [data-n="'+this.selected+'"]'))};
inputFacebookFiche.prototype.check=function(a){if(2>a.city.length||isNaN(parseInt(a.duration[0]))&&0<a.duration[0].length||isNaN(parseInt(a.duration[1]))&&0<a.duration[1].length||0==a.duration[0].length+a.duration[1].length||"."==a.job||"."==a.studies||"."==a.age||"."==a.interest||"."==a.relmark||""==a.sexe||""==a.famsit||""==a.reltype||""==a.loc||""==a.context||""==a.medsoc||""==a.medrel)return!1;for(var b=0;b<a.freq.length;b++)if(""==a.freq[b])return!1;for(b=0;b<a.irlfreq.length;b++)if(""==a.irlfreq[b])return!1;
for(b=0;b<a.connect.length;b++)if(""==a.connect[b])return!1;return"10"==a.reltype&&2>a.reltypeSpecial.length||"11"==a.context&&2>a.contextSpecial[0].length||"12"==a.context&&2>a.contextSpecial[1].length||"13"==a.context&&2>a.contextSpecial[2].length?!1:!0};
inputFacebookFiche.prototype.attach=function(a){console.group("[facebook.fiche] attaching events");lsi.createDataset("f_fiches");this.storageToFields();this.handler=a;var b=this,b=this;this.nav_container.addEventListener("click",function(a){b.nav(a.target);b.handler(a.target)},!1);console.groupEnd()};

View File

@ -1,5 +0,0 @@
function inputFacebookMatrice(a){this.container=a}inputFacebookMatrice.prototype={container:this.container};
inputFacebookMatrice.prototype.fieldsToStorage=function(){console.group("[facebook.matrice] fields to storage");var a=(new FormDeflater(this.container,["input"],["data-name"])).deflate();crc32(JSON.stringify(a));var d={},b;for(b in a)if(a[b]instanceof Array)for(var f in a[b])null==d[b]&&(d[b]=[]),d[b].push(parseInt(a[b][f]));else null!==a[b]&&(null==d[b]&&(d[b]=[]),d[b].push(parseInt(a[b])));lsi.set("f_matrice",0,d);console.groupEnd()};
inputFacebookMatrice.prototype.storageToFields=function(){console.group("[facebook.matrice] storage to fields");var a=lsi["export"]("f_fiches"),d=lsi.get("f_matrice",0),b=lsi["export"]("f_contacts"),f=[],c;for(c in a)-1==f.indexOf(a[c].contact)&&f.push(a[c].contact);var a=["<div class='line matrice'>"],e,g,k,h,l;g=0;for(k=f.length;g<k;g++)for(c=b[g],h=g+1,l=f.length;h<l;h++)e=b[h],a.push("<input type='checkbox' data-name='"+c.uid+"' value='"+e.uid+"' id='f_matrice_"+c.uid+"_"+e.uid+"'"),d.hasOwnProperty(c.uid)&&
-1<d[c.uid].indexOf(e.uid)&&a.push("checked='checked'"),a.push(">"),a.push("<label class='matrice-content' for='f_matrice_"+c.uid+"_"+e.uid+"'>"),a.push("Est-ce que <span>"),a.push(isNaN(c.existing)?c.username:lsi.get("f_friends",c.existing).name),a.push("</span> et <span>"),a.push(isNaN(e.existing)?e.username:lsi.get("f_friends",e.existing).name),a.push("</span> se connaissent ?"),a.push("</label>");a.push("</div>");this.container.innerHTML=a.join("");console.groupEnd()};
inputFacebookMatrice.prototype.attach=function(){console.group("[facebook.matrice] attaching events");lsi.createDataset("f_matrice");this.storageToFields();var a=this;this.container.addEventListener("click",function(d){a.fieldsToStorage();setTimeout(function(){a.storageToFields()},500)},!1);console.groupEnd()};

View File

@ -1,4 +0,0 @@
function inputFacebookSubject(a,c,b){this.subject_id=a;this.coords=c;this.store_button=b}inputFacebookSubject.prototype={store_button:this.store_button,subject_id:this.subject_id,coords:this.coords,handler:null};inputFacebookSubject.prototype.check=function(){return 0<this.subject_id.value.length&&!isNaN(this.subject_id.value)};
inputFacebookSubject.prototype.fieldsToStorage=function(){console.group("[facebook.subject] fields to storage");if(!this.check())return!1;if(0<lsi.keys("f_contacts").length)return Notification.warning("Attention","Vous devez effacer le formulaire pour changer de sujet"),!1;lsi.set("f_subject",0,{subject_id:this.subject_id.value,coords:this.coords.value});console.groupEnd()};
inputFacebookSubject.prototype.storageToFields=function(){console.group("[facebook.subject] storage to fields");var a=lsi.get("f_subject",0);null==a&&(a={subject_id:""});this.subject_id.value=a.subject_id;this.coords.value=a.subject_id;console.groupEnd()};
inputFacebookSubject.prototype.attach=function(a){function c(a){b.fieldsToStorage();b.handler(!0);b.storageToFields()}console.group("[facebook.subject] attaching events");lsi.createDataset("f_subject");lsi.createDataset("f_friends");this.handler=a;var b=this;this.store_button.addEventListener("click",c,!1);this.subject_id.addEventListener("blur",c,!1);this.storageToFields();console.groupEnd()};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,28 +0,0 @@
function inputPhoneFiche(a,b){this.container=a;this.nav_container=b;this.top_size=10}
inputPhoneFiche.prototype={container:this.container,nav_container:this.nav_container,selected:0,handler:null,defaultData:{sexe:"2",age:".",interest:".",relmark:".",job:".",famsit:"0",studies:".",reltype:"0",reltypeSpecial:"",city:"",quartier:"",cp:"",loc:"0",duration:["",""],context:"0",contextSpecial:["","",""],freq:["3","8","13","18","23"],irlfreq:["3","8","13","18","23"],connect:"1 3 5 7 9 11".split(" "),connectSpecial:["",""],medsoc:"0",medrel:"0",timestamp:0,valid:!1}};
inputPhoneFiche.prototype.fieldsToStorage=function(){console.group("[phone.fiche] fields to storage");var a,b,c,d,e,h=$$('[data-sublink="phone"] article.relation-panel .fiche-relation');a=0;for(b=h.length;a<b;a++)if(c=new FormDeflater(h[a],["input","select"],["data-name"]),d=c.deflate(),c=lsi.get("p_fiches",d.uid))d={sexe:d.sexe,age:d.age,interest:d.interest,relmark:d.relmark,job:d.job,famsit:d.famsit,studies:d.studies,reltype:d.reltype,reltypeSpecial:d.reltypeSpecial,city:d.city,quartier:d.quartier,
cp:d.cp,loc:d.loc,duration:d.duration,context:d.context,medsoc:d.medsoc,medrel:d.medrel,contextSpecial:d.contextSpecial,freq:d.freq,irlfreq:d.irlfreq,connect:d.connect,connectSpecial:d.connectSpecial,uid:parseInt(d.uid),contact:parseInt(d.contact)},e=crc32(JSON.stringify(d)),c.hasOwnProperty("hash")&&e==c.hash||(d.hash=e,d.valid=this.check(d),d.timestamp=Date.now(),console.warn("> FICHE UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("p_fiches",d.uid,d));console.groupEnd()};
inputPhoneFiche.prototype.add=function(a){if(null==a.uid||isNaN(a.uid)||null==a.contact||isNaN(a.contact))return!1;a.city=null!=a.city?a.city:this.defaultData.city;a.quartier=null!=a.quartier?a.quartier:this.defaultData.quartier;a.cp=null!=a.cp?a.cp:this.defaultData.cp;a.duration[0]=null!=a.duration[0]?a.duration[0]:this.defaultData.duration[0];a.duration[1]=null!=a.duration[1]?a.duration[1]:this.defaultData.duration[1];a.reltypeSpecial=null!=a.reltypeSpecial?a.reltypeSpecial:this.defaultData.reltypeSpecial;
a.contextSpecial[0]=null!=a.contextSpecial[0]?a.contextSpecial[0]:this.defaultData.contextSpecial[0];a.contextSpecial[1]=null!=a.contextSpecial[1]?a.contextSpecial[1]:this.defaultData.contextSpecial[1];a.contextSpecial[2]=null!=a.contextSpecial[2]?a.contextSpecial[2]:this.defaultData.contextSpecial[2];a.connectSpecial[0]=null!=a.connectSpecial[0]?a.connectSpecial[0]:this.defaultData.connectSpecial[0];a.connectSpecial[1]=null!=a.connectSpecial[1]?a.connectSpecial[1]:this.defaultData.connectSpecial[1];
a.job=null!=a.job?a.job:this.defaultData.job;a.studies=null!=a.studies?a.studies:this.defaultData.studies;a.age=null!=a.age?a.age:this.defaultData.age;a.interest=null!=a.interest?a.interest:this.defaultData.interest;a.relmark=null!=a.relmark?a.relmark:this.defaultData.relmark;a.sexe=null!=a.sexe?a.sexe:this.defaultData.sexe;a.famsit=null!=a.famsit?a.famsit:this.defaultData.famsit;a.reltype=null!=a.reltype?a.reltype:this.defaultData.reltype;a.loc=null!=a.loc?a.loc:this.defaultData.loc;a.context=null!=
a.context?a.context:this.defaultData.context;a.medsoc=null!=a.medsoc?a.medsoc:this.defaultData.medsoc;a.medrel=null!=a.medrel?a.medrel:this.defaultData.medrel;a.freq=null!=a.freq?a.freq:this.defaultData.freq;a.irlfreq=null!=a.irlfreq?a.irlfreq:this.defaultData.irlfreq;a.connect=null!=a.connect?a.connect:this.defaultData.connect;var b=lsi.get("p_contacts",a.contact);if(!1===b)return!1;var c="";isNaN(b.existing)||(c=lsi.get("p_friends",b.existing),b.username=c.name,a.age=c.age,a.sexe=c.sexe,a.loc=c.dist,
isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial=""),null!=c.studies2?(a.studies=c.studies2,a.interest=c.interest,a.relmark=c.relmark,a.job=c.job,a.famsit=c.famsit,a.city=c.city,a.cp=c.cp,a.quartier=c.quartier,a.duration[0]=c.duration[0],a.duration[1]=c.duration[1],a.context=c.context,a.medsoc=c.medsoc,a.medrel=c.medrel,a.contextSpecial=c.contextExtra,a.connect=c.connect,a.connectSpecial=c.connectExtra,a.freq=c.freq,a.irlfreq=c.irlfreq,c="Contact import\u00e9: non modifiable!"):
c="Contact import\u00e9 (incomplet): modifiable partiellement!");this.container.innerHTML+=pFicheBuilder.build({importedfiche:c,name:b.username,countcall:b.countcall,countsms:b.countsms,uid:a.uid,contact:a.contact,city:a.city,quartier:a.quartier,cp:a.cp,duration0:a.duration[0],duration1:a.duration[1],reltypespecial:a.reltypeSpecial,contextspecial0:a.contextSpecial[0],contextspecial1:a.contextSpecial[1],contextspecial2:a.contextSpecial[2],connectspecial0:a.connectSpecial[0],connectspecial1:a.connectSpecial[1]});
b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="job"]>option[value="'+a.job+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+
'"] ~ h5>span>select[data-name="age"]>option[value="'+a.age+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="interest"]>option[value="'+a.interest+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="relmark"]>option[value="'+a.relmark+'"]');null!=b&&b.setAttribute("selected",
"selected");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(b=0;b<c.length;b++)c[b].value==a.sexe?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="famsit"]');for(b=0;b<c.length;b++)c[b].value==a.famsit?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");
c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');for(b=0;b<c.length;b++)c[b].value==a.reltype?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(b=0;b<c.length;b++)c[b].value==a.loc?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");
c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="context"]');for(b=0;b<c.length;b++)c[b].value==a.context?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked","checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="medsoc"]');for(b=0;b<c.length;b++)c[b].value==a.medsoc?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");
c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="medrel"]');for(b=0;b<c.length;b++)c[b].value==a.medrel?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="freq"]');for(b=0;b<c.length;b++)-1<a.freq.indexOf(c[b].value)?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");
c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="irlfreq"]');for(b=0;b<c.length;b++)-1<a.irlfreq.indexOf(c[b].value)?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="connect"]');for(b=0;b<c.length;b++)-1<a.connect.indexOf(c[b].value)?c[b].setAttribute("checked","checked"):
c[b].removeAttribute("checked")};inputPhoneFiche.prototype.storageToFields=function(){console.group("[phone.fiche] storage to fields");var a,b=lsi["export"]("p_fiches");this.container.innerHTML="";for(var c in b)a=cloneObject(b[c]),delete a.hash,delete a.timestamp,delete a.valid,b[c].hash=crc32(JSON.stringify(a)),lsi.set("p_fiches",b[c].uid,b[c]),b[c].uid==this.selected&&this.add(b[c]);this.updateNavBar();console.groupEnd()};
inputPhoneFiche.prototype.sync=function(){console.group("[phone.fiche] synchronisation");lsi["export"]("p_contacts");var a,b,c,d;d=lsi.keys("p_contacts").length<2*this.top_size?lsi.keys("p_contacts").length:2*this.top_size;for(b=0;b<d;b++)a=lsi.get("p_fiches",b),!a&&(a=this.defaultData),a.uid=b,a.contact=b,lsi.set("p_fiches",b,a);var e,h,g;d={};var l={};a=lsi["export"]("p_fiches");b=lsi["export"]("p_mini-fiches");for(var k in a)if(e=lsi.get("p_contacts",a[k].contact),!(0<e.username.length&&void 0!=
d[e.username]||0==e.username.length&&void 0!=l[e.existing])&&(0<e.username.length?d[e.username]=0:l[e.existing]=0,e)){var f=[["fiche",a[k]]];for(c in a)h=lsi.get("p_contacts",a[c].contact),c!=k&&h&&(g=0<h.username.length&&e.username===h.username,h=!isNaN(h.existing)&&e.existing===h.existing,(g||h)&&f.push(["fiche",a[c]]));for(c in b)h=lsi.get("p_contacts",b[c].contact),g=0<h.username.length&&e.username===h.username,h=!isNaN(h.existing)&&e.existing===h.existing,(g||h)&&f.push(["mini",b[c]]);if(1!==
f.length){e=[];for(c in f)e[c]=f[c][1].hasOwnProperty("timestamp")?f[c][1].timestamp:0;g=e.indexOf(Math.max.apply(Math,e));for(c in f)c!=g&&(f[c][0]==f[g][0]?(e=cloneObject(f[g][1]),e.uid=f[c][1].uid,lsi.set("p_fiches",e.uid,e)):"fiche"==f[g][0]?(e=cloneObject(f[c][1]),e.age=f[g][1].age,e.sexe=f[g][1].sexe,e.loc=f[g][1].loc,e.reltype=f[g][1].reltype,e.reltypeSpecial=f[g][1].reltypeSpecial,lsi.set("p_mini-fiches",e.uid,e)):(e=cloneObject(f[c][1]),e.age=f[g][1].age,e.sexe=f[g][1].sexe,e.loc=f[g][1].loc,
e.reltype=f[g][1].reltype,e.reltypeSpecial=f[g][1].reltypeSpecial,"."==f[g][1].loc&&(e.loc="0"),"9"==f[g][1].reltype&&(e.reltype="10",e.reltypeSpecial="inconnu"),lsi.set("p_fiches",e.uid,e)))}}console.groupEnd()};
inputPhoneFiche.prototype.nav=function(a){if(!(a instanceof Element&&a.getData("n"))||isNaN(a.getData("n"))||"p_nav-fiche"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="phone"] #p_nav-fiche > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
inputPhoneFiche.prototype.updateNavBar=function(){var a=lsi["export"]("p_fiches");this.nav_container.innerHTML="";for(var b=Object.keys(a),c=0;c<b.length;c++){var d=parseInt(b[c]);0==d&&(this.nav_container.innerHTML+="<span>APPELS</span>");20>d&&c<b.length-1&&20<=b[c+1]?this.nav_container.innerHTML+='<span data-n="'+d+'" class="lc">'+(d%20+1)+"</span>&nbsp;&nbsp;":(20==d&&(this.nav_container.innerHTML+='<br><span class="fc">&nbsp;&nbsp; SMS &nbsp;&nbsp;</span>'),this.nav_container.innerHTML+='<span data-n="'+
d+'">'+(d%20+1)+"</span>")}for(var e in a)b=$('[data-sublink="phone"] #p_nav-fiche [data-n="'+a[e].uid+'"]'),null!=b&&(!0===a[e].valid?b.addClass("done"):b.remClass("done"));this.nav($('[data-sublink="phone"] #p_nav-fiche [data-n="'+this.selected+'"]'))};
inputPhoneFiche.prototype.check=function(a){if(2>a.city.length||isNaN(parseInt(a.duration[0]))&&0<a.duration[0].length||isNaN(parseInt(a.duration[1]))&&0<a.duration[1].length||0==a.duration[0].length+a.duration[1].length||"."==a.job||"."==a.studies||"."==a.age||"."==a.interest||"."==a.relmark||""==a.sexe||""==a.famsit||""==a.reltype||""==a.loc||""==a.context||""==a.medsoc||""==a.medrel)return!1;for(var b=0;b<a.freq.length;b++)if(""==a.freq[b])return!1;for(b=0;b<a.irlfreq.length;b++)if(""==a.irlfreq[b])return!1;
for(b=0;b<a.connect.length;b++)if(""==a.connect[b])return!1;return"10"==a.reltype&&2>a.reltypeSpecial.length||"11"==a.context&&2>a.contextSpecial[0].length||"12"==a.context&&2>a.contextSpecial[1].length||"13"==a.context&&2>a.contextSpecial[2].length?!1:!0};
inputPhoneFiche.prototype.attach=function(a){console.group("[phone.fiche] attaching events");lsi.createDataset("p_fiches");this.storageToFields();this.handler=a;this.nav_container.addEventListener("click",function(a){this.nav(a.target);this.handler(a.target)}.bind(this),!1);console.groupEnd()};

View File

@ -1,4 +0,0 @@
function APIClass(b){this.target=b}
APIClass.prototype={xhr:[],buffer:null,optionalParams:[],send:function(b,f,g){b.hasOwnProperty("path")||f({ModuleError:4});for(var a=0;a<this.xhr.length;a++)4==this.xhr[a].readyState&&this.xhr.splice(a,1);this.xhr.push(null);a=this.xhr.length-1;this.optionalParams[a]=[];if(3<arguments.length)for(var d=3;d<arguments.length;d++)this.optionalParams[a].push(arguments[d]);this.xhr[a]=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHttpRequest");var e=this;console.log("api request",
b);this.xhr[a].onreadystatechange=function(){if(4==e.xhr[a].readyState)if(e.buffer=e.xhr[a].responseText,console.log("api response",JSON.parse(e.xhr[a].responseText)),-1<[0,200].indexOf(e.xhr[a].status))try{f(JSON.parse(e.xhr[a].responseText),e.optionalParams[a])}catch(b){f({ModuleError:-1,ErrorDescription:"Erreur au niveau de api.js"},e.optionalParams[a]),console.warn(b)}else f({ModuleError:3})};var d=new FormData,c;for(c in b)"path"==c?d.append(c,b[c]):b[c]instanceof File?d.append(c,b[c]):d.append(c,
JSON.stringify(b[c]));this.xhr[a].open("POST",this.target,!0);g&&this.xhr[a].setRequestHeader("Authorization","Digest "+g);this.xhr[a].setRequestHeader("X-Requested-With","XMLHttpRequest");this.xhr[a].send(d)}};

View File

@ -1,9 +0,0 @@
function pageManagerClass(){}var ptrPageManagerClass;
pageManagerClass.prototype={loaded:null,depJS:null,depCSS:null,xhr:[],activeXHR:null,page:null,vars:[],root:"",path:"",jsPath:"js",cssPath:"css",pagelist:null,container:null,refresher:function(){},ajax:function(b,c,d,a){var e;e=this.xhr.push(window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHttpRequest"))-1;this.activeXHR=this.xhr[e];this.xhr[e].addEventListener("readystatechange",function(a){if(void 0!=this.xhr[a]&&4===this.xhr[a].readyState){-1<[0,200].indexOf(this.xhr[a].status)?
c(this.xhr[a].responseText):c();this.xhr[a]=null;var b=!0;for(a=0;a<this.xhr.length;a++)if(null!==this.xhr[a]){b=!1;break}b&&(this.xhr=[])}}.bind(this,e),!1);d="string"==typeof d&&/^POST|GET$/i.test(d)?d.toUpperCase():"POST";a="POST"==d&&"object"==typeof a&&a instanceof FormData?a:null;this.xhr[e].open(d,b,!0);this.xhr[e].send(a);return this},explodeURL:function(b){b=1<=arguments.length?b:document.URL;if(null!=this.pagelist&&/^(?:(?:https?:\/\/)?[^\/]+)\/([a-z0-9_]+)\/?(?:\/((?:.+\/)+)\/?)?$/i.test(b)){for(var c=
RegExp.$2.split("/");""==c[c.length-1];)c.pop();return-1<this.pagelist.indexOf(RegExp.$1)?{page:RegExp.$1,"var":c}:null}return null},loadDependencies:function(){"object"==typeof this.depCSS&&this.depCSS instanceof Element&&this.depCSS.parentNode==document.head&&document.head.removeChild(this.depCSS);"object"==typeof this.depJS&&this.depJS instanceof Element&&this.depJS.parentNode==document.head&&document.head.removeChild(this.depJS);this.ajax(this.root+this.path+"/"+this.cssPath+"/"+this.page+".css",
function(b){null!=b?(this.depCSS=document.createElement("link"),this.depCSS.rel="stylesheet",this.depCSS.type="text/css",this.depCSS.href=this.root+this.path+"/"+this.cssPath+"/"+this.page+".css",document.head.appendChild(this.depCSS)):console.warn("[loadDependencies_Error] - ("+this.root+this.path+"/"+this.cssPath+"/"+this.page+".css)")}.bind(this));this.ajax(this.root+this.path+"/"+this.jsPath+"/"+this.page+".js",function(b){null!=b?(this.depJS=document.createElement("script"),this.depJS.type="text/javascript",
this.depJS.src=this.root+this.path+"/"+this.jsPath+"/"+this.page+".js",document.head.appendChild(this.depJS)):console.warn("[loadDependencies_Error] - ("+this.root+this.path+"/"+this.jsPath+"/"+this.page+".js)")}.bind(this))},updateURL:function(){0<this.vars.length?window.history.pushState(this.page,this.page,this.root+"/"+this.page+"/"+this.vars.join("/")+"/"):window.history.pushState(this.page,this.page,this.root+"/"+this.page+"/")},setPage:function(b,c,d,a,e){var f="object"==typeof a&&a instanceof
Array?a:null;if(null!=f)for(a=0;a<f.length&&(f="string"==typeof f[a]&&/^[a-z0-9_]+$/i.test(f[a])?f:null,null!=f);a++);this.pagelist=null!=f?f:this.pagelist;this.root="string"==typeof e?e:this.root;this.path="string"==typeof c?c:this.path;this.container="object"==typeof d&&d instanceof Element?d:this.container;if(this.pagelist&&this.container)if(!0===b)this.ajax(this.root+this.path+"/"+this.page+".php",function(a){this.container.innerHTML=a;this.loadDependencies();this.refresher.apply(this)}.bind(this),
"POST",g);else if("string"==typeof b&&-1<this.pagelist.indexOf(b)){this.page=b;var g=new FormData;for(a=0;a<this.vars.length;a++)g.append(this.vars[a],null);this.ajax(this.root+this.path+"/"+this.page+".php",function(a){this.container.innerHTML=a;this.loadDependencies()}.bind(this),"POST",g);this.updateURL()}else if(b=this.explodeURL(),null!=b){g=new FormData;for(a=this.vars.length=0;a<b["var"].length;a++)this.vars[a]=b["var"][a],g.append(this.vars[a],null);if(b.page==this.page)return this;this.page=
b.page;this.ajax(this.root+this.path+"/"+this.page+".php",function(a){this.container.innerHTML=a;this.loadDependencies()}.bind(this),"POST",g);this.updateURL()}else this.setPage(this.pagelist[0]);else console.warn("pagelist et container manquant");return this},refresh:function(b){if(b instanceof Function)this.refresher=b;else return this.setPage(!0)}};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,121 +0,0 @@
<?php use \manager\MenuManager; ?>
<html>
<head>
<title>NxTIC - Tableau de bord</title>
<!-- Informations de la page -->
<meta name='Content-Type' content='text/html; charset=utf-8'>
<meta charset='utf-8'>
<meta name='author' content='Adrien MARQUÈS alias {xdrm};'>
<meta name='description' content="Tableau de bord pour une enquete sociologique sur les liens sociaux entre les reseaux sociaux et la vie hors-ligne">
<!-- Dépendences CSS -->
<link type='text/css' rel='stylesheet' href='/css/min/reset.css' /> <!-- Reset du css natif des browsers -->
<link type='text/css' rel='stylesheet' href='/css/min/font.css' /> <!-- Positionnement global des pages -->
<link type='text/css' rel='stylesheet' href='/css/min/layout.css' /> <!-- Positionnement global des pages -->
<link type='text/css' rel='stylesheet' href='/css/min/header.css' /> <!-- Gestion du header -->
<link type='text/css' rel='stylesheet' href='/css/min/menu-side.css' /> <!-- Gestion du menu -->
<link type='text/css' rel='stylesheet' href='/css/min/container.css' /> <!-- Gestion du container -->
<link type='text/css' rel='stylesheet' href='/css/min/global.css' /> <!-- Style global -->
<link type='text/css' rel='stylesheet' href='/css/min/notif.css' /> <!-- Inclusion du system de notifs -->
<!-- Dépendences Javascript -->
<script type='text/javascript' src='/js/lib/min/crc32.js' ></script> <!-- Système de hash unique et rapide -->
<script type='text/javascript' src='/js/lib/min/local-storage-interface.js' ></script> <!-- Interface de gestion du 'localStorage' -->
<script type='text/javascript' src='/js/lib/min/html-builder.js' ></script> <!-- Gestion de construction de HTML -->
<script type='text/javascript' src='/js/lib/min/input-checker.js' ></script> <!-- Gestion dynamique des saisies -->
<script type='text/javascript' src='/js/lib/min/form-deflater.js' ></script> <!-- Gestion des formulaires js-friendly -->
<script type='text/javascript' src='/js/lib/min/reset.js' ></script> <!-- Corrections Javascript natif (ajouts) -->
<script type='text/javascript' src='/js/lib/api.js' ></script> <!-- Gestion des transactions avec le serveur -->
<script type='text/javascript' src='/js/lib/min/page-manager.js' ></script> <!-- Gestion réseau/chargement/liens/URL -->
<script type='text/javascript' src='/js/lib/min/notif.js' ></script> <!-- Gestion des notifications -->
<script type='text/javascript' src='/js/lib/min/shortcut-manager.js' ></script> <!-- Gestion des raccourcis clavier -->
<!-- Dépendences Spéficiques pré-chargeables -->
<script type='text/javascript' src='/js/includes/min/input-html-phone-data.js' ></script> <!-- Gestion du constructeur HTML pour la page d'acquisition 'phone' -->
<script type='text/javascript' src='/js/includes/min/input-html-facebook-data.js' ></script> <!-- Gestion du constructeur HTML pour la page d'acquisition 'facebook' -->
<!-- Librairies Externes Javascript -->
</head>
<body>
<!-- LOGIN -->
<?php if( connected() ) echo "<div id='LOGIN'>";
else echo "<div id='LOGIN' class='active'>"; ?>
<?php //var_dump(session_id()); ?>
<div id='login-icon'></div>
<div id='login-close'>Accéder à la plateforme</div>
<form method='POST' action='' id='login-form'>
<!-- SI ON EST PAS CONNECTE -> FORMULAIRE DE LOGIN -->
<?php if( !connected() ){ ?>
<input type='text' placeholder='Identifiant ou adresse mail' name='login' id='login-login'>
<input type='password' placeholder='Mot de passe' name='password' id='login-password'>
<input type='submit' value='Connexion' name='login-sub'>
<span id='lost-password'>Mot de passe oublié ?</span>
<!-- SI ON EST CONNECTE -> FORMULAIRE DE LOGOUT -->
<?php }else{ ?>
<input type='submit' value='Déconnexion' name='logout-sub'>
<?php } ?>
</form>
</div>
<!-- CONTENEUR DES NOTIFICATIONS -->
<div id='notification-container'></div>
<!-- CORPS DE LA PAGE -->
<div id='WRAPPER'>
<!-- HEADER DE LA PAGE -->
<div id='HEADER'>
<!-- ZONE DE RECHERCHE -->
<input type='text' placeholder='Recherche...' id='searchbar'>
<!-- ZONE UTILISATEUR -->
<div id='user-data'>
<?php if( connected() ){
echo "<span id='user-name'>".$_SESSION['username']."</span>";
echo "<span id='user-picture' class='active'></span>";
}else{
echo "<span id='user-name'>Me connecter</span>";
echo "<span id='user-picture'></span>";
}?>
</div>
</div>
<!-- MENU DE LA PAGE -->
<nav id='MENU-SIDE'>
<?php
$menuInflater = new MenuManager();
echo $menuInflater->inflate();
?>
</nav>
<!-- CONTENEUR DE LA PAGE -->
<div id='CONTAINER'></div>
</div>
<!-- Dépendences Javascript après chargement des éléments -->
<script type='text/javascript' src='/js/action-script.js'></script>
</body>
</html>

View File

@ -1,4 +0,0 @@
var exportSubjectList=$("#export_subject-list"),exportSubjectAdd=$("#export_add-subject"),exportDeflater=new FormDeflater(document.getElementById("export-form"),["input"],["data-name"]);exportSubjectAdd.addEventListener("click",function(a){a=document.createElement("input");a.type="number";a.dataset.name="subjects";a.placeholder="Sujet";a.style="width: 5em; display: block;";exportSubjectList.appendChild(a)},!1);
$("#export-form #export_export-all").addEventListener("click",function(a){var b=(new FormDeflater(exportSubjectList,["input"],["data-name"])).deflate().subjects;a=[];b instanceof Array||(b=[b]);for(var c=0;c<b.length;c++)0<b[c].length&&!isNaN(b[c])&&a.push(b[c]);b=exportDeflater.deflate();api.send({path:"download/multiple",subjects:a,all:"all"==b.group},function(a){if(0!=a.ModuleError)return!1;document.location=a.link;Notification.success("OK","Lancement du t\u00e9l\u00e9chargement..")})},!1);
var chartsSubjectList=$("#charts_subject-list"),chartsSubjectAdd=$("#charts_add-subject"),chartsDeflater=new FormDeflater(document.getElementById("charts-form"),["input"],["data-name"]);chartsSubjectAdd.addEventListener("click",function(a){a=document.createElement("input");a.type="number";a.dataset.name="subjects";a.placeholder="Sujet";a.style="width: 5em; display: block;";chartsSubjectList.appendChild(a)},!1);
$("#charts-form #charts_export-all").addEventListener("click",function(a){var b=(new FormDeflater(chartsSubjectList,["input"],["data-name"])).deflate().subjects;a=[];b instanceof Array||(b=[b]);for(var c=0;c<b.length;c++)0<b[c].length&&!isNaN(b[c])&&a.push(b[c]);b=chartsDeflater.deflate();api.send({path:"download/chart",subjects:a,all:"all"==b.group},function(a){if(0!=a.ModuleError)return!1;document.location=a.link;Notification.success("OK","Lancement du t\u00e9l\u00e9chargement..")})},!1);

View File

@ -1,41 +0,0 @@
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(b){console.warn(b);if(0!=b.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(b);var a=[],e;for(e in b.results)a.push("<li data-element data-id='"+e+"'>"),a.push("<div data-user><span>SUJET</span></div>"),a.push("<div> <span><input type='text' readonly style='text-align: center' onclick='this.select()' class='flag' value='"+e+"'></span> </div>"),a.push("<div> <span data-prefix='Nom'>"+
b.results[e].name+"</span> </div>"),a.push("<div> <span data-prefix='Cr\u00e9ation'>"+b.results[e].creation+"</span> </div>"),a.push("<div> <span><input type='checkbox' id='s_"+e+"' "+(null!=b.results[e].phone?"checked":"")+" disabled><label for='s_"+e+"'>Cellulaire</label>"),a.push("</span> </div>"),a.push("<div> <span><input type='checkbox' id='s_"+e+"' "+(null!=b.results[e].facebook?"checked":"")+" disabled><label for='s_"+e+"'>Facebook</label>"),a.push("</span> </div>"),a.push("</li>");sList.innerHTML=
a.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')),
pContactManager.attach(pDynamicUpdate),pMiniManager=new inputPhoneMini($('[data-sublink="phone"] article.mini-relation-panel'),$('[data-sublink="phone"] #p_nav-mini')),pMiniManager.attach(pDynamicUpdate),pFicheManager=new inputPhoneFiche($('[data-sublink="phone"] article.relation-panel'),$('[data-sublink="phone"] #p_nav-fiche')),pFicheManager.top_size=20,pFicheManager.attach(pDynamicUpdate),pMatriceManager=new inputPhoneMatrice($('[data-sublink="phone"] article.matrice-panel')),pMatriceManager.attach(pDynamicUpdate),
$('[data-sublink="phone"] #p_clear-all').addEventListener("click",function(a){lsi.clear("p_subject");lsi.clear("p_contacts");lsi.clear("p_mini-fiches");lsi.clear("p_fiches");lsi.clear("p_matrice");lsi.clear("p_friends");pSubjectManager.storageToFields();pContactManager.storageToFields();pMiniManager.storageToFields();pFicheManager.storageToFields();pMatriceManager.storageToFields();Notification.success("OK","Les donn\u00e9es ont \u00e9t\u00e9 supprim\u00e9es")},!1),$('[data-sublink="phone"] #p_export-all').addEventListener("click",
function(a){Notification.info("INFORMATION","Lancement du t\u00e9l\u00e9chargement de la sauvegarde");a={subject:lsi["export"]("p_subject")[0],contacts:lsi["export"]("p_contacts"),mini:lsi["export"]("p_mini-fiches"),fiches:lsi["export"]("p_fiches"),matrice:lsi["export"]("p_matrice")[0]};var b=$('[data-sublink="phone"] #p_download-target');b.download="local-phone-data.json";b.href="data:application/octet-stream,"+encodeURIComponent(JSON.stringify(a));b.click()},!1),$('[data-sublink="phone"] #p_import-all').addEventListener("click",
function(a){$('[data-sublink="phone"] #p_local-upload').click()},!1),$('[data-sublink="phone"] #p_local-upload').addEventListener("click",function(a){a.target.value=null},!1),$('[data-sublink="phone"] #p_local-upload').addEventListener("change",function(a){a={path:"upload/local_data",file:$('[data-sublink="phone"] #p_local-upload').files[0]};api.send(a,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("Erreur",a.ModuleError),!1;lsi.set("p_subject",0,a.local_data.subject);lsi["import"]("p_contacts",
a.local_data.contacts);lsi["import"]("p_mini-fiches",a.local_data.mini);lsi["import"]("p_fiches",a.local_data.fiches);lsi.set("p_matrice",0,a.local_data.matrice);pSubjectManager.storageToFields();pContactManager.storageToFields();pMatriceManager.storageToFields();pDynamicUpdate(!0)})},!1),$('[data-sublink="phone"] #p_submit-all').addEventListener("click",function(a){console.log("> GATHERING ALL DATA");pContactManager.fieldsToStorage();pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();
if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du <i>sujet</i>"),!1;a=lsi["export"]("p_mini-fiches");var b=0,f;for(f in a)if(!isNaN(f)&&(b++,!a[f].valid))return Notification.warning("Attention","La <i>fiche rapide</i> <b>"+b+"</b> est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("p_fiches");for(f in a)if(!a[f].valid)return Notification.warning("Attention","La <i>fiche compl\u00e8te</i> <b>"+(parseInt(f)+1)+"</b> est incompl\u00e8te et/ou incorrecte"),
!1;f={path:"input/phone",subject:lsi["export"]("p_subject")[0].subject_id,contacts:lsi["export"]("p_contacts"),mini:lsi["export"]("p_mini-fiches"),fiches:lsi["export"]("p_fiches"),matrice:lsi["export"]("p_matrice")[0]};api.send(f,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK","L'identifiant du sujet est <strong>"+a.subject_id+"</strong> ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1),console.groupEnd())};
include("/js/includes/input-phone-subject.js",function(){pLoaded[0]=1;phoneRoutine()});include("/js/includes/input-phone-contact.js",function(){pLoaded[1]=1;phoneRoutine()});include("/js/includes/input-phone-mini.js",function(){pLoaded[2]=1;phoneRoutine()});include("/js/includes/input-phone-fiche.js",function(){pLoaded[3]=1;phoneRoutine()});include("/js/includes/input-phone-matrice.js",function(){pLoaded[4]=1;phoneRoutine()});
var fAlready=0,fLoaded=[0,0,0,0,0],facebookRoutine=function(){!Math.min.apply(Math,fLoaded)|fAlready||(fAlready=1,console.groupEnd(),console.group("[facebook] Initialization"),fSubjectManager=new inputFacebookSubject($('[data-sublink="facebook"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="facebook"] article.subject-panel [data-name="submit"]')),fSubjectManager.attach(fDynamicUpdate),fContactManager=new inputFacebookContact($('[data-sublink="facebook"] article.contact-panel'),
$('[data-sublink="facebook"] #f_nav-contact')),fContactManager.attach(fDynamicUpdate),fMiniManager=new inputFacebookMini($('[data-sublink="facebook"] article.mini-relation-panel'),$('[data-sublink="facebook"] #f_nav-mini')),fMiniManager.attach(fDynamicUpdate),fFicheManager=new inputFacebookFiche($('[data-sublink="facebook"] article.relation-panel'),$('[data-sublink="facebook"] #f_nav-fiche')),fFicheManager.top_size=20,fFicheManager.attach(fDynamicUpdate),fMatriceManager=new inputFacebookMatrice($('[data-sublink="facebook"] article.matrice-panel')),
fMatriceManager.attach(fDynamicUpdate),$('[data-sublink="facebook"] #f_clear-all').addEventListener("click",function(a){lsi.clear("f_subject");lsi.clear("f_contacts");lsi.clear("f_mini-fiches");lsi.clear("f_fiches");lsi.clear("f_matrice");lsi.clear("f_friends");fSubjectManager.storageToFields();fContactManager.storageToFields();fMiniManager.storageToFields();fFicheManager.storageToFields();fMatriceManager.storageToFields();Notification.success("OK","Les donn\u00e9es ont \u00e9t\u00e9 supprim\u00e9es")},
!1),$('[data-sublink="facebook"] #f_export-all').addEventListener("click",function(a){Notification.info("INFORMATION","Lancement du t\u00e9l\u00e9chargement de la sauvegarde");a={subject:lsi["export"]("f_subject")[0].subject_id,contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};var b=$('[data-sublink="facebook"] #f_download-target');b.download="local-facebook-data.json";b.href="data:application/octet-stream,"+
encodeURIComponent(JSON.stringify(a));b.click()},!1),$('[data-sublink="facebook"] #f_import-all').addEventListener("click",function(a){$('[data-sublink="facebook"] #f_local-upload').click()},!1),$('[data-sublink="facebook"] #f_local-upload').addEventListener("click",function(a){a.target.value=null},!1),$('[data-sublink="facebook"] #f_local-upload').addEventListener("change",function(a){a={path:"upload/local_data",file:$('[data-sublink="facebook"] #f_local-upload').files[0]};api.send(a,function(a){console.log(a);
if(0!=a.ModuleError)return Notification.error("Erreur",a.ModuleError),!1;lsi.set("f_subject",0,a.local_data.subject);lsi["import"]("f_contacts",a.local_data.contacts);lsi["import"]("f_mini-fiches",a.local_data.mini);lsi["import"]("f_fiches",a.local_data.fiches);lsi.set("f_matrice",0,a.local_data.matrice);pSubjectManager.storageToFields();pContactManager.storageToFields();pMatriceManager.storageToFields();pDynamicUpdate(!0)})},!1),$('[data-sublink="facebook"] #f_submit-all').addEventListener("click",
function(a){console.log("> GATHERING ALL DATA");pContactManager.fieldsToStorage();pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du <i>sujet</i>"),!1;a=lsi["export"]("f_mini-fiches");var b=0,f;for(f in a)if(!isNaN(f)&&(b++,!a[f].valid))return Notification.warning("Attention","La <i>fiche rapide</i> <b>"+b+"</b> est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("f_fiches");
for(f in a)if(!a[f].valid)return Notification.warning("Attention","La <i>fiche compl\u00e8te</i> <b>"+(parseInt(f)+1)+"</b> est incompl\u00e8te et/ou incorrecte"),!1;f={path:"input/facebook",subject:lsi["export"]("f_subject")[0],contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};api.send(f,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK",
"L'identifiant du sujet est <strong>"+a.subject_id+"</strong> ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1),console.groupEnd())};include("/js/includes/input-facebook-subject.js",function(){fLoaded[0]=1;facebookRoutine()});include("/js/includes/input-facebook-contact.js",function(){fLoaded[1]=1;facebookRoutine()});include("/js/includes/input-facebook-mini.js",function(){fLoaded[2]=1;facebookRoutine()});include("/js/includes/input-facebook-fiche.js",function(){fLoaded[3]=1;facebookRoutine()});
include("/js/includes/input-facebook-matrice.js",function(){fLoaded[4]=1;facebookRoutine()});
var pDynamicUpdate=function(a){var b=a instanceof Element,f=b&&"INPUT"==a.tagName&&"submit"==a.type,e=b&&"SPAN"==a.tagName&&("p_nav-mini"==a.parentNode.id||"p_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"p_nav-contact"==a.parentNode.id;if(!f&&!e&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[phone] Dynamic Update");pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();pContactManager.fieldsToStorage();pMatriceManager.fieldsToStorage();pFicheManager.sync();
pMiniManager.sync();!0===a?api.send({path:"subject/getFriends",subject_id:pSubjectManager.subject_id.value},function(a){console.warn("xx",a);if(0!=a.ModuleError)return console.groupEnd(),!1;lsi["import"]("p_friends",a.subjects);pMiniManager.storageToFields();pFicheManager.storageToFields();pMatriceManager.storageToFields();pContactManager.storageToFields();pMiniManager.updateNavBar();pFicheManager.updateNavBar()}):(pMiniManager.storageToFields(),pFicheManager.storageToFields(),pMatriceManager.storageToFields(),
pMiniManager.updateNavBar(),pFicheManager.updateNavBar(),(f||b)&&pContactManager.storageToFields());console.groupEnd()},fDynamicUpdate=function(a){var b=a instanceof Element,f=b&&"INPUT"==a.tagName&&"submit"==a.type,e=b&&"SPAN"==a.tagName&&("f_nav-mini"==a.parentNode.id||"f_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"f_nav-contact"==a.parentNode.id;if(!f&&!e&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[facebook] Dynamic Update");fMiniManager.fieldsToStorage();
fFicheManager.fieldsToStorage();fContactManager.fieldsToStorage();fMatriceManager.fieldsToStorage();fFicheManager.sync();fMiniManager.sync();!0===a?api.send({path:"subject/getFriends",subject_id:fSubjectManager.subject_id.value},function(a){if(0!=a.ModuleError)return console.groupEnd(),!1;lsi["import"]("f_friends",a.subjects);fMiniManager.storageToFields();fFicheManager.storageToFields();fMatriceManager.storageToFields();fContactManager.storageToFields()}):(fMiniManager.storageToFields(),fFicheManager.storageToFields(),
fMatriceManager.storageToFields(),(f||b)&&fContactManager.storageToFields());console.groupEnd()};function testContactsPhone(){for(var a=0;45>a;a++)0==a%20?lsi.set("p_contacts",a,{uid:a,username:"contact-x",existing:"."}):lsi.set("p_contacts",a,{uid:a,username:"contact-"+a,existing:"."})}
function testRoutinePhone(a){var b=lsi["export"]("p_contacts"),f=lsi["export"]("p_mini-fiches"),e=lsi["export"]("p_fiches"),c=0;if(null!=a&&a)for(var g in f)isNaN(g)||(a="",null!=b[g]&&(a=b[g].username),f=$('#p_nav-mini [data-n="'+g+'"]'),f.click(),$("#unknown_min_p_"+g).checked=0==a.length,0==a.length?($("#sexeI_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=
0,$("#reltype9_mini_p_"+g).checked=!0):(a=["H","F"][Math.floor(c%2)],$("#sexe"+a+"_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=1+c%6,a=c%10,9==a?($("#reltype10_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_p_"+g).checked=!0,c++));for(var d in e)if(!isNaN(d)){f=
$('#p_nav-fiche [data-n="'+d+'"]');f.click();a=["H","F","I"][Math.floor(c%3)];$("#sexe"+a+"_p_"+d).checked=!0;$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="age"]').value=c%19;b=(c%13).toString();$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="job"]').value=b;b=(c%8).toString();$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="studies"]').value=b;a=c%8;7==a?($("#reltype10_p_"+
d).checked=!0,$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_p_"+d).checked=!0;$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="city"]').value=(10+c).toString();$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="cp"]').value=(1E4+c).toString();$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="quartier"]').value=
c;$("#loc"+["A","B","C","D"][Math.floor(c%4)]+"_p_"+d).checked=!0;b=["A","B","C","D"][Math.floor(c%4)];$("#famsit"+b+"_p_"+d).checked=!0;b=["A","B","C","D"][Math.floor(c%4)];$("#famsit"+b+"_p_"+d).checked=!0;$("#medsoc"+["A","B","C","D"][Math.floor(c%4)]+"_p_"+d).checked=!0;$("#medrel"+["A","B","C"][Math.floor(c%3)]+"_p_"+d).checked=!0;b=$$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="duration"]');b[0].value=c.toString();b[1].value=1+c.toString();b=c%14;$("article.fiche-relation #contexte"+
b+"_p_"+d).checked=!0;e=$$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="contextSpecial"]');11==b&&(e[0].value="internet");12==b&&(e[1].value="association");13==b&&(e[2].value="autre");b=["0","1","2","3","4"];b=b[c%b.length];$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="interest"]').value=b;b=["0","1","2","3","4"];b=b[c%b.length];$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="relmark"]').value=
b;for(b=0;5>b;b++)e=1+5*b+Math.floor(c%4),10>e&&(e="0"+e),$("#freq"+e+"_p_"+d).checked=!0;for(b=0;5>b;b++)e=1+5*b+Math.floor(c%4),10>e&&(e="0"+e),$("#irlfreq"+e+"_p_"+d).checked=!0;for(b=1;7>b;b++)e=1+Math.floor(c%2),$("#connect"+b+""+e+"_p_"+d).checked=!0;c++}}function testContactsFacebook(){for(var a=0;45>a;a++)0==a%20?lsi.set("f_contacts",a,{uid:a,username:"contact-x",existing:"."}):lsi.set("f_contacts",a,{uid:a,username:"contact-"+a,existing:"."})}
function testRoutineFacebook(a){var b=lsi["export"]("f_contacts"),f=lsi["export"]("f_mini-fiches"),e=lsi["export"]("f_fiches"),c=0;if(null!=a&&a)for(var g in f)isNaN(g)||(a="",null!=b[g]&&(a=b[g].username),f=$('#f_nav-mini [data-n="'+g+'"]'),f.click(),$("#unknown_min_f_"+g).checked=0==a.length,0==a.length?($("#sexeI_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=
0,$("#reltype9_mini_f_"+g).checked=!0):(a=["H","F"][Math.floor(c%2)],$("#sexe"+a+"_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=1+c%6,a=c%10,9==a?($("#reltype10_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_f_"+g).checked=!0,c++));for(var d in e)isNaN(d)||(f=$('#f_nav-fiche [data-n="'+
d+'"]'),f.click(),a=["H","F","I"][Math.floor(c%3)],$("#sexe"+a+"_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="age"]').value=c%19,b=(c%13).toString(),b=b[c%b.length],$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="job"]').value=b,b=(c%8).toString(),1==b.length&&(b="0"+b),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+
d+'"] ~ h5 select[data-name="studies"]').value=b,a=c%9,8==a?($("#reltype10_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="city"]').value=(10+c).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+
d+'"] ~ h5 input[data-name="cp"]').value=(1E4+c).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="quartier"]').value=c,$("#loc"+["A","B","C","D"][Math.floor(c%4)]+"_f_"+d).checked=!0,b=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="duration"]'),b[0].value=c.toString(),b[1].value=1+c.toString(),b=c%14,$('section[data-sublink="facebook"] article.fiche-relation #contexte'+
b+"_f_"+d).checked=!0,e=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="contextSpecial"]'),11==b&&(e[0].value="internet"),12==b&&(e[1].value="association"),13==b&&(e[2].value="autre"),c++)};

3
subDir/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.ftpconfig
sftp-config.json
phpunit/coverage/

0
.htaccess → subDir/.htaccess Executable file → Normal file
View File

40
autoloader.php → subDir/autoloader.php Executable file → Normal file
View File

@ -2,11 +2,10 @@
/* [1] On definit les chemins absolus si c'est pas deja fait
=========================================================*/
if( !defined('__ROOT__') ) define('__ROOT__', dirname(__FILE__) );
if( !defined('__CONFIG__') ) define('__CONFIG__', __ROOT__.'/config' );
if( !defined('__BUILD__') ) define('__BUILD__', __ROOT__.'/build' );
if( !defined('__PUBLIC__') ) define('__PUBLIC__', __ROOT__.'/public_html' );
if( !defined('__TMP__') ) define('__TMP__', __ROOT__.'/public_html/tmp' );
if( !defined('__ROOT__') ) define('__ROOT__', dirname(__FILE__) );
if( !defined('__CONFIG__') ) define('__CONFIG__', __ROOT__.'/config' );
if( !defined('__BUILD__') ) define('__BUILD__', __ROOT__.'/build' );
if( !defined('__PUBLIC__') ) define('__PUBLIC__', __ROOT__.'/public_html' );
/* ACTIVE LE DEBUGGAGE (WARNING + EXCEPTION)
@ -19,8 +18,32 @@
}
// Loads the build facade
// require_once __BUILD__.'/Builder.php';
/* [1] On définit __SERVER_HOST__ et __SERVER_ROOT__ si c'est pas déja fait
=========================================================*/
if( !defined('__SERVER_HOST__') || !defined('__SERVER_ROOT') ){
/* (1) On charge le fichier de configuration */
$json = json_decode( file_get_contents(__CONFIG__.'/server.json'), true );
// Si pas d'erreur, on définit
if( !is_null($json) ){
/* (2) Gestion de la config si server local ou remote */
if( !isset($_SERVER['SERVER_NAME']) || !checkdnsrr($_SERVER['SERVER_NAME'], 'NS') )
$config = $json['local'];
else
$config = $json['remote'];
/* (3) Création des constantes */
define('__SERVER_ROOT__', $config['root']);
define('__SERVER_HOST__', $config['host'].__SERVER_ROOT__);
}
}
function parseurl($url){
return __SERVER_HOST__.$url;
}
/* AUTOLOADER
@ -52,10 +75,11 @@
\manager\sessionManager::session_start();
/* [3] Gestion des droits des utilisateurs
=========================================================*/
/* (1) Retourne si l'utilisateur est connecte ou non */
function connected(){ return isset($_SESSION['permission']) && is_array($_SESSION['permission']) && count($_SESSION['permission']) > 0; }
function connected(){ return isset($_SESSION['permission']) && count($_SESSION['permission']) > 0; }
/* (2) Retourne si l'utilisateur a le status en question */
function permission($type){ return connected() && in_array($type, $_SESSION['permission']); }

0
build/.htaccess → subDir/build/.htaccess Executable file → Normal file
View File

View File

@ -60,7 +60,7 @@
// On verifie le type pour chaque element
foreach($value as $element)
// Si erreur dans au moins 1 element, on retourne que c'est incorrect
if( !self::run($elements_type, ($element) ) )
if( !self::run($elements_type, trim($element) ) )
return false;
// Si aucune erreur, on retourne que tout est bon

View File

@ -1,10 +1,9 @@
<?php
namespace api\core;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \manager\ManagerError;
use \api\core\Checker;
use \database\core\Repo;
class ModuleRequest{
@ -107,6 +106,7 @@
}
/* EXECUTE LE TRAITEMENT ASSOCIE ET REMPLIE LA REPONSE
*
* @return answer<ModuleResponse> Retourne une reponse de type <ModuleResponse> si tout s'est bien passe
@ -146,6 +146,13 @@
}
/* EXECUTE LE TRAITEMENT ASSOCIE ET RENVOIE UN FICHIER AVEC LE HEADER ET LE BODY SPECIFIE
*
*/
@ -194,12 +201,12 @@
=========================================================*/
if( $fromAjax ){
$tmpfname = 'download_'.uniqid().'.php';
$link = '/tmp/'.$tmpfname;
$bodyfname = __TMP__.'/content_'.uniqid().'.php';
$tmpfname = '/tmp/download_'.uniqid().'.php';
$bodyfname = __BUILD__.'/tmp/content_'.uniqid().'.php';
/* (1) On crée le fichier temporaire */
$tmpfnameroot = __TMP__.'/'.$tmpfname;
$tmpfnameroot = __BUILD__.$tmpfname;
$tmpfile = fopen($tmpfnameroot, 'w');
fwrite($tmpfile, '<?php'.PHP_EOL);
@ -228,7 +235,7 @@
chmod($tmpfnameroot, 0775);
$response = new ModuleResponse(ManagerError::Success);
$response->append('link', $link);
$response->append('link', $tmpfname);
return $response;
@ -302,6 +309,9 @@
}
/* VERIFICATION DU FORMAT ET DE LA COHERENCE DU CHEMIN SPECIFIE
*
* @path<String> String correspondant au chemin de delegation ("module/methode")
@ -349,6 +359,10 @@
}
/* RETOURNE SI ON A LA PERMISSION D'EXECUTER CETTE METHODE
*
* @token<String> Token d'acces a l'API (OPTIONNEL)
@ -387,35 +401,35 @@
=========================================================*/
}else if( isset($_SESSION['permission']) )
$local_permissions = $_SESSION['permission'];
// Si ni token, ni SESSION, erreur
else{
$this->error = ManagerError::PermissionError;
return false;
}
/* [4] Verification des droits parmi les permissions donnees
=========================================================*/
/* (1) On recupere la liste des permissions possibles */
$permissions = $method['permissions'];
/* (2) Si aucune permission n'est definie, on laisse l'acces */
if( !$permissions == 0 ) return true;
if( count($permissions) == 0 ) return true;
/* (3) On verifie qu'il y a aucune permission manquante */
/* (3) On verifie qu'il y a au moins une permission ok */
foreach($permissions as $permission)
if( !in_array($permission, $local_permissions) ){
$this->error = ManagerError::PermissionError;
return false;
}
if( in_array($permission, $local_permissions) ) return true;
/* [5] On retourne FAUX si aucun droit n'a ete trouve
=========================================================*/
return true;
$this->error = ManagerError::PermissionError;
return false;
}
/* VERIFICATION DU TYPE DES PARAMETRES ENVOYES
*
* @params<Array> Tableau associatif contenant les parametres
@ -476,6 +490,9 @@
}
/* AJOUT DES OPTIONS A PARTIR DE LA CONFIGURATION
*
*/
@ -516,6 +533,9 @@
}
/* RENVOI LE CHEMIN D'AMORCAGE DE LA METHODE
*
* @return path<Array> Retourne le chemin d'amorcage de la requete

View File

@ -141,7 +141,7 @@
ManagerError::setHttpCode($this->error);
// Type de contenu
header('Content-Type: application/json; charset=utf-8');
// header('Content-Type: application/json');
// On rajoute l'erreur au message
$returnData = array_merge(

View File

View File

@ -0,0 +1,634 @@
<?php
namespace api\module;
use \database\core\Database;
use \manager\sessionManager;
use \api\core\ModuleRequest;
use \manager\ManagerError;
use \database\core\Repo;
use \lightdb\core\lightdb;
class download{
/* CONSTRUIT UN CONTENU CSV A PARTIR DES DONNEES @DATA ET DU DICTIONNAIRE @DICT
*
* @data<Array> Tableau contenant les valeurs
* @dict<Array> Tableau contenant le dictionnaire des valeurs
* @displayColumns<Boolean> VRAI s'il faut afficher les colonnes
*
* @return csvContent<String> Retourne le contenu CSV associé
*
*/
private static function parseCSV($data, $dict, $displayColumns=true){
$output = ''; // Contiendra le résultat
$dictKeys = array_keys($dict); // Contient les clés de @dict
/* [0] On récupère toutes les colonnes
=========================================================*/
$columns = []; // Contiendra les colonnes
/* (1) Pour chaque set de @data */
foreach($data as $dataset){
$keys = [];
/* (2) Pour chaque champ de chaque set de @data, on ajoute les clés */
foreach($dataset as $key=>$value){
// {1} Si c'est un tableau -> on ajoute les sous-clés //
if( is_array($value) )
foreach($value as $subIndex=>$subValue)
array_push( $keys, "${key}_$subIndex" );
// {2} Si c'est une valeur simple -> on ajoute la clé //
else
array_push( $keys, $key );
}
/* (3) On ajoute à chaque fois les clés du set à la liste des colonnes */
$columns = array_unique( array_merge( $columns, $keys ) );
}
/* [1] On ajoute les colonnes à la sortie
=========================================================*/
if( $displayColumns )
foreach($columns as $i=>$column)
$output .= ($i < count($columns)-1) ? "\"$column\";" : "\"$column\"\r\n";
/* [2] On récupère les valeurs et on les ajoute à la sortie
=========================================================*/
/* (1) Pour chaque set de @data */
foreach($data as $dataset){
/* (2) Pour chaque colonne */
foreach($columns as $c=>$column){
/* (3) On décompose la colonne (ne change que si elle l'est) */
$col = explode('_', $column);
$composed = true;
// Si il n'existe pas une 2me partie numérique, on annule la décomposition
if( !isset($col[1]) || !is_numeric($col[1]) ){
$col = [ $column ];
$composed = false;
}
/* (4) Si la colonne existe dans le set actuel */
if( isset($dataset[$col[0]]) ){
/* (5) Si c'est une valeur composée, on récupère la valeur */
if( $composed && isset($dataset[$col[0]][$col[1]]) )
// {1} Si valeur dans le dictionnaire, on fait modulo le nombre de choix possibles //
if( isset($dict[$col[0]]) )
$output .= "\"".( $dataset[$col[0]][$col[1]] % count($dict[$col[0]]) )."\"";
// {2} Si pas dans le dictionnaire, on laisse la valeur //
else
$output .= "\"".$dataset[$col[0]][$col[1]]."\"";
/* (6) Si la valeur n'est pas composée, on récupère la valeur */
elseif( !$composed && !is_array($dataset[$col[0]]) )
$output .= "\"".$dataset[$col[0]]."\"";
}
// On ajoute une virgule sauf à la dernière valeur
$output .= ($c < count($columns)-1) ? ";" : "";
}
$output .= "\r\n";
}
return $output;
}
/* DOWNLOAD D'UN FICHIER CONTENANT LES DONNEES SELECTIONNEES
*
* @subjects<Array> Liste des identifiants des sujets à prendre en compte
* @phone<Boolean> Si TRUE, prend en compte les données des questionnaires cellulaires
* @facebook<Boolean> Si TRUE, prend en compte les données des questionnaires facebook
* @survey<Boolean> Si TRUE, prend en compte les données des questionnaires ResTIC
* @all<Boolean> Si TRUE, prend en compte tous les sujets (annule @subjects)
*
* @return data<File> Retourne une archive .zip contenant toutes les données sélectionnées
*
*/
public static function multiple($params){
extract($params);
/* (0) Gestion du formattage des paramètres */
$subjects = !is_array($subjects) ? [] : $subjects;
$phone = !is_bool($phone) ? false : $phone;
$facebook = !is_bool($facebook) ? false : $facebook;
$survey = !is_bool($survey) ? false : $survey;
$all = !is_bool($all) ? false : $all;
/* [0] On récupère le dictionnaire
=========================================================*/
$dict = file_get_contents(__BUILD__.'/src/dynamic/dictionary.json');
/* (2) Si une erreur pour le fichier de conf */
if( $dict === false )
return [ 'ModuleError' => ManagerError::UnreachableResource ];
/* (3) On récupère la config sous forme de tableau */
$dict = json_decode( $dict, true );
/* (4) Si erreur de PARSAGE */
if( !is_array($dict) )
return [ 'ModuleError' => ManagerError::ParsingFailed ];
/* [1] On construit l'arborescence des données
=========================================================*/
$output = [
'common_' => [
'contacts' => '',
'relations' => '',
'dict' => ''
]
];
/* [2] On construit les fichiers de chaque sujet DE TELEPHONE
=========================================================*/
if( $phone ){ // Si @phone vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('phone_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (3) On complète les relations */
$output['common_']['relations'] .= self::parseCSV($subjectData['relations'], [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (4) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [3] On construit les fichiers de chaque sujet DE FACEBOOK
=========================================================*/
if( $facebook ){ // Si @facebook vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('facebook_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (2) On complète les relations */
$output['common_']['relations'] .= self::parseCSV($subjectData['relations'], [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (3) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [4] On construit les fichiers de chaque sujet DE FORMULAIRE
=========================================================*/
if( $survey ){ // Si @survey vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('survey_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (2) On complète les relations */
$output['common_']['relations'] .= self::parseCSV($subjectData['relations'], [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (3) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [5] On ajoute le dictionnaire
=========================================================*/
$output['common_']['dict'] .= "\"sheet\";\"field\";\"key\";\"value\"\r\n";
foreach($dict as $ds=>$dataset)
foreach($dataset as $f=>$field)
foreach($field as $key=>$value)
$output['common_']['dict'] .= "\"$ds\";\"$f\";\"$key\";\"$value\"\r\n";
/* [6] Création de l'archive
=========================================================*/
$zip = new \ZipArchive();
$fname = '/tmp/'.time().'.zip';
$zip->open($fname, \ZipArchive::CREATE);
foreach($output as $folder=>$files){
foreach($files as $file=>$content)
if( strlen($content) > 0 )
$zip->addFromString($folder.$file.'.csv', $content);
}
$zip->close();
/* [5] On lance le téléchargement
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'headers' => [
'Content-Type' => 'application/zip; charset=utf-8',
'Content-Disposition' => 'attachment; filename=export'.date('_d_m_Y', time()).'.zip',
'Pragma' => 'no-cache',
'Expires' => '0'
],
'body' => file_get_contents($fname)
];
}
/* EXPORT POUR GEPHI OU AUTRE LOGICIEL SUR LE PRINCIPE NODES+EDGES
*
* @subjects<Array> Liste des identifiants des sujets à prendre en compte
* @phone<Boolean> Si TRUE, prend en compte les données des questionnaires cellulaires
* @facebook<Boolean> Si TRUE, prend en compte les données des questionnaires facebook
* @survey<Boolean> Si TRUE, prend en compte les données des questionnaires ResTIC
* @all<Boolean> Si TRUE, prend en compte tous les sujets (annule @subjects)
*
* @return data<File> Retourne une archive .zip contenant toutes les données sélectionnées
*/
public static function chart($params){
extract($params);
/* (0) Gestion du formattage des paramètres */
$subjects = !is_array($subjects) ? [] : $subjects;
$phone = !is_bool($phone) ? false : $phone;
$facebook = !is_bool($facebook) ? false : $facebook;
$survey = !is_bool($survey) ? false : $survey;
$all = !is_bool($all) ? false : $all;
/* [0] On récupère le dictionnaire
=========================================================*/
$dict = file_get_contents(__BUILD__.'/src/dynamic/dictionary.json');
/* (2) Si une erreur pour le fichier de conf */
if( $dict === false )
return [ 'ModuleError' => ManagerError::UnreachableResource ];
/* (3) On récupère la config sous forme de tableau */
$dict = json_decode( $dict, true );
/* (4) Si erreur de PARSAGE */
if( !is_array($dict) )
return [ 'ModuleError' => ManagerError::ParsingFailed ];
/* [1] On construit l'arborescence des données
=========================================================*/
$output = [
'common_' => [
'contacts' => '',
'relations' => '',
'dict' => ''
],
'logs/' => [] // Contiendra les journaux d'appels
];
/* [2] On construit les fichiers de chaque sujet DE TELEPHONE
=========================================================*/
if( $phone ){ // Si @phone vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('phone_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (2) On construit le log s'il existe */
$output['logs/'][$subjectId] = self::parseCSV($subjectData['logs'], $dict['logs']);
/* (3) On complète les relations */
// {1} On retire les valeurs ou le type = 0 //
$formattedRelations = [];
foreach($subjectData['relations'] as $i=>$relation)
if( $relation['type'] != 0 )
array_push($formattedRelations, [
'source' => $relation['idA'],
'target' => $relation['idB'],
'weight' => ($relation['idA']==$subjectId) ? .1 : 1, // plus de poids aux relations alter/alter
'type' => 'Undirected'
]);
// {2} On ajoute au contenu //
$output['common_']['relations'] .= self::parseCSV($formattedRelations, [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (4) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [3] On construit les fichiers de chaque sujet DE FACEBOOK
=========================================================*/
if( $facebook ){ // Si @facebook vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('facebook_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (2) On complète les relations */
// {1} On retire les valeurs ou le type = 0 //
$formattedRelations = [];
foreach($subjectData['relations'] as $i=>$relation)
if( $relation['type'] != 0 )
array_push($formattedRelations, [
'source' => $relation['idA'],
'target' => $relation['idB'],
'weight' => ($relation['idA']==$subjectId) ? .1 : 1, // plus de poids aux relations alter/alter
'type' => 'Undirected'
]);
// {2} On ajoute au contenu //
$output['common_']['relations'] .= self::parseCSV($formattedRelations, [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (3) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [4] On construit les fichiers de chaque sujet DE FORMULAIRE
=========================================================*/
if( $survey ){ // Si @survey vaut TRUE
// On ouvre une instance de la base de données
$db = new lightdb('survey_db');
// Si on doit prendre tous les sujets, on les récupère
if( $all )
$subjects = array_keys( $db->index() );
// Pour chaque sujet
foreach($subjects as $s=>$subjectId){
/* (1) On récupère les données du sujet en cours */
$subjectData = $db->fetch($subjectId);
// Si on ne trouve rien, on passe au suivant
if( $subjectData === false )
continue;
/* (2) On complète les relations */
// {1} On retire les valeurs ou le type = 0 //
$formattedRelations = [];
foreach($subjectData['relations'] as $i=>$relation)
if( $relation['type'] != 0 ) // On retire les relations ego/alter
array_push($formattedRelations, [
'source' => $relation['idA'],
'target' => $relation['idB'],
'weight' => ($relation['idA']==$subjectId) ? .1 : 1, // plus de poids aux relations alter/alter
'type' => 'Undirected'
]);
// {2} On ajoute au contenu //
$output['common_']['relations'] .= self::parseCSV($formattedRelations, [], strlen($output['common_']['relations']) == 0 ); // On affiche les colonnes pour la première fois uniquement
/* (3) On ajoute les contacts à la liste */
$output['common_']['contacts'] .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($output['common_']['contacts']) == 0 ); // On affiche les colonnes pour la première fois uniquement
}
// On ferme l'instance de la base de données
$db->close();
}
/* [5] On ajoute le dictionnaire
=========================================================*/
$output['common_']['dict'] .= "\"sheet\";\"field\";\"key\";\"value\"\r\n";
foreach($dict as $ds=>$dataset)
foreach($dataset as $f=>$field)
foreach($field as $key=>$value)
$output['common_']['dict'] .= "\"$ds\";\"$f\";\"$key\";\"$value\"\r\n";
/* [6] Création de l'archive
=========================================================*/
$zip = new \ZipArchive();
$fname = '/tmp/'.time().'.zip';
$zip->open($fname, \ZipArchive::CREATE);
foreach($output as $folder=>$files){
foreach($files as $file=>$content)
if( strlen($content) > 0 )
$zip->addFromString($folder.$file.'.csv', $content);
}
$zip->close();
/* [5] On lance le téléchargement
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'headers' => [
'Content-Type' => 'application/zip; charset=utf-8',
'Content-Disposition' => 'attachment; filename=graphics'.date('_d_m_Y', time()).'.zip',
'Pragma' => 'no-cache',
'Expires' => '0'
],
'body' => file_get_contents($fname)
];
}
/* RENVOIE LE CONTENU DU MENU
*
*/
public static function menu($params){
extract($params);
$menu_json = json_decode( file_get_contents(__CONFIG__.'/menu.json'), true );
// si erreur
if( $menu_json == null )
return ['ModuleError' => ManagerError::ParsingFailed];
// si tout bon
return [
'ModuleError' => ManagerError::Success,
'menu' => $menu_json
];
}
}
?>

View File

@ -0,0 +1,431 @@
<?php
namespace api\module;
use \manager\sessionManager;
use \database\core\Database;
use \manager\ManagerError;
use \api\core\ModuleRequest;
use \database\core\Repo;
use \lightdb\core\lightdb;
class input{
/* TRAITE LES DONNÉES D'UN FORMULAIRE DE TYPE TÉLÉPHONIQUE
*
* @subject<Array> Tableau contenant les données du sujet
* @contacts<Array> Tableau contenant les données des contacts
* @mini<Array> Tableau contenant les données des mini fiches relation
* @fiches<Array> Tableau contenant les données des fiches relation
*
* @return subject_id<int> Retourne l'id sujet de l'enquête
*
*/
public static function phone($params){
extract($params);
/* [0] On récupère l'id unique actuel
=========================================================*/
$funiq = fopen( __BUILD__.'/src/dynamic/uniqid', 'r+' );
flock($funiq, LOCK_EX); // On verrouille le fichier
$uniqid = fgets( $funiq );
if( !is_numeric($uniqid) )
$uniqid = 0;
// Décalage à appliquer à tous les ids
$offset = intval($uniqid) + 1;
// on enregistre l'id du sujet
$subject_id = $subject['subject_id'];
// Contiendra la valeur de l'id maximum
$maxId = 0;
/* [1] On récupère les logs s'ils existent
=========================================================*/
// Contiendra le contenu du fichier
$file = [ 'logs' => [] ];
/* (1) On définit les 2 fichiers utiles */
$tmpfile = __BUILD__.'/tmp/phone_'.$subject['tmp_id'].'.json';
/* (2) Si on a déja crée le fichier avec le journal d'appel dedans, on le récupère */
$storage_already = is_string($subject['tmp_id']) && strlen($subject['tmp_id']) == 40 && file_exists($tmpfile);
/* (3) Si on a déja crée le fichier, on essaie de récupérer son contenu */
if( $storage_already ){
$file = json_decode( file_get_contents($tmpfile), true );
// erreur
if( $file == null )
return [ 'ModuleRequest' => ManagerError::ParsingFailed ];
// On incrémente tous les ids de l'offset
foreach($file['logs'] as $i=>$log){
$file['logs'][$i]['id'] = $offset + $log['id'];
if( $log['id'] > $maxId )
$maxId = (int) $log['id'];
}
}
/* [2] On enregistre les données du sujet
=========================================================*/
$file['subject'] = [ 'id' => $subject_id ];
/* [3] On enregistre les contacts des MINI
=========================================================*/
$file['contacts'] = [];
$file['relations'] = [];
foreach($mini as $miniData){
// On récupère les données du contact associé
$contact = $contacts[ $miniData['uid'] ];
if( $miniData['uid'] > $maxId )
$maxId = (int) $miniData['uid'];
$newId = $offset + $miniData['uid'];
// On remplit les données qui iront dans le fichier pour ce contact
array_push($file['contacts'], [
'id' => $newId,
'name' => $contact['username'],
'sexe' => $miniData['sexe'],
'age' => $miniData['age'],
'studies1' => $miniData['studies'],
'reltype' => ($miniData['reltype']==10) ? $miniData['reltypeSpecial'] : $miniData['reltype'], // si 'autre' -> valeur, sinon le code
'dist' => $miniData['loc']
]);
// On enregistre la relation avec EGO
array_push($file['relations'], [
'idA' => $subject_id,
'idB' => $newId,
'type' => 2 // relation cellulaire mineure
]);
}
/* [4] On enregistre les contacts des FICHES
=========================================================*/
foreach($fiches as $f=>$ficheData){
// On récupère les données du contact associé
$contact = $contacts[ $ficheData['uid'] ];
if( $ficheData['uid'] > $maxId )
$maxId = (int) $ficheData['uid'];
$newId = $offset + $ficheData['uid'];
// On remplit les données qui iront dans le fichier pour ce contact
array_push($file['contacts'], [
'id' => $newId,
'name' => $contact['username'],
'sexe' => $ficheData['sexe'],
'age' => $ficheData['age'],
'studies2' => $ficheData['studies'],
'reltype' => ($ficheData['reltype']==10) ? $ficheData['reltypeSpecial'] : $ficheData['reltype'], // si 'autre' -> valeur, sinon le code
'dist' => $ficheData['loc'],
'job' => $ficheData['job'],
'famsit' => $ficheData['famsit'],
'city' => $ficheData['city'],
'cp' => $ficheData['cp'],
'quartier' => $ficheData['quartier'],
'duration' => $ficheData['duration'],
'context' => $ficheData['context'],
'contextExtra' => $ficheData['contextSpecial'],
'freq' => $ficheData['freq'],
'connect' => $ficheData['connect'],
'connectExtra' => $ficheData['connectSpecial']
]);
// On enregistre la relation avec EGO
array_push($file['relations'], [
'idA' => $subject_id,
'idB' => $newId,
'type' => ($f<10) ? 4 : 5 // 4->appels 5->sms
]);
}
/* [5] On enregistre les relations de la MATRICE
=========================================================*/
$clen = count($file['contacts']);
/* (1) On récupére les ids des contacts */
$cIdList = [];
foreach($file['contacts'] as $c=>$contact){
$id = $contact['id'] - $offset;
if( !in_array($id, $cIdList) )
$cIdList[$id] = null;
}
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]) );
array_push($file['relations'], [
'idA' => $offset + $x,
'idB' => $offset + $y,
'type' => $relationXY ? 1 : 0 // 0->aucune relation 1->relation alter alter
]);
}
}
/* [6] On enregistre tout dans 'lightdb'
=========================================================*/
$db = new lightdb('phone_db');
$db->insert( $subject_id, $file );
$db->close();
/* [7] On met à jour le nouvel ID unique
=========================================================*/
// $maxId += $offset;
rewind($funiq); // On revient au début du fichier
fwrite($funiq, $offset+$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
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'subject_id' => $subject_id
];
}
/* TRAITE LES DONNÉES D'UN FORMULAIRE DE TYPE FACEBOOK
*
* @subject<Array> Tableau contenant les données du sujet
* @contacts<Array> Tableau contenant les données des contacts
* @mini<Array> Tableau contenant les données des mini fiches relation
* @fiches<Array> Tableau contenant les données des fiches relation
*
* @return subject_id<int> Retourne l'id sujet de l'enquête
*
*/
public static function facebook($params){
extract($params);
/* [0] On récupère l'id unique actuel
=========================================================*/
$funiq = fopen( __BUILD__.'/src/dynamic/uniqid', 'r+' );
flock($funiq, LOCK_EX); // On verrouille le fichier
$uniqid = fgets( $funiq );
if( !is_numeric($uniqid) )
$uniqid = 0;
// Décalage à appliquer à tous les ids
$offset = intval($uniqid) + 1;
// on enregistre l'id du sujet
$subject_id = $subject['subject_id'];
// Contiendra la valeur de l'id maximum
$maxId = 0;
/* [1] On enregistre les données du sujet
=========================================================*/
$file['subject'] = [ 'id' => $subject_id ];
/* [2] On enregistre les contacts des MINI
=========================================================*/
$file['contacts'] = [];
$file['relations'] = [];
foreach($mini as $miniData){
// On récupère les données du contact associé
$contact = $contacts[ $miniData['uid'] ];
if( $miniData['uid'] > $maxId )
$maxId = (int) $miniData['uid'];
$newId = $offset + $miniData['uid'];
// On remplit les données qui iront dans le fichier pour ce contact
array_push($file['contacts'], [
'id' => $newId,
'name' => $contact['username'],
'sexe' => $miniData['sexe'],
'age' => $miniData['age'],
'studies1' => $miniData['studies'],
'reltype' => ($miniData['reltype']==10) ? $miniData['reltypeSpecial'] : $miniData['reltype'], // si 'autre' -> valeur, sinon le code
'dist' => $miniData['loc']
]);
// On enregistre la relation avec EGO
array_push($file['relations'], [
'idA' => $subject_id,
'idB' => $newId,
'type' => 3 // relation facebook mineure
]);
}
/* [4] On enregistre les contacts des FICHES
=========================================================*/
foreach($fiches as $f=>$ficheData){
// On récupère les données du contact associé
$contact = $contacts[ $ficheData['uid'] ];
if( $ficheData['uid'] > $maxId )
$maxId = (int) $ficheData['uid'];
$newId = $offset + $ficheData['uid'];
// On remplit les données qui iront dans le fichier pour ce contact
array_push($file['contacts'], [
'id' => $newId,
'name' => $contact['username'],
'sexe' => $ficheData['sexe'],
'age' => $ficheData['age'],
'studies2' => $ficheData['studies'],
'reltype' => ($ficheData['reltype']==10) ? $ficheData['reltypeSpecial'] : $ficheData['reltype'], // si 'autre' -> valeur, sinon le code
'dist' => $ficheData['loc'],
'job' => $ficheData['job'],
'famsit' => $ficheData['famsit'],
'city' => $ficheData['city'],
'cp' => $ficheData['cp'],
'quartier' => $ficheData['quartier'],
'duration' => $ficheData['duration'],
'context' => $ficheData['context'],
'contextExtra' => $ficheData['contextSpecial'],
'freq' => $ficheData['freq'],
'connect' => $ficheData['connect'],
'connectExtra' => $ficheData['connectSpecial']
]);
// On enregistre la relation avec EGO
array_push($file['relations'], [
'idA' => $subject_id,
'idB' => $newId,
'type' => ($f<10) ? 6 : 7 // 6->historique 7->messenger
]);
}
/* [5] On enregistre les relations de la MATRICE
=========================================================*/
foreach($file['contacts'] as $y=>$yContact)
foreach($file['contacts'] as $x=>$xContact)
if( $x < $y ){ // On affiche que sous la diagonale
// Si relation alter-alter
$relationXY = isset($matrice[$yContact['id']]) && in_array($xContact['id'], $matrice[$yContact['id']]);
array_push($file['relations'], [
'idA' => $yContact['id'],
'idB' => $xContact['id'],
'type' => $relationXY ? 1 : 0 // 0->aucune relation 1->relation alter alter
]);
}
/* [5] On enregistre tout dans 'lightdb'
=========================================================*/
$db = new lightdb('facebook_db');
$db->insert( $subject_id, $file );
$db->close();
/* [6] On met à jour le nouvel ID unique
=========================================================*/
// $maxId += $offset;
rewind($funiq); // On revient au début du fichier
fwrite($funiq, $offset+$maxId); // On écrit la nouvelle valeur (forcément plus grande)
flock($funiq, LOCK_UN); // On débloque le verrou
fclose($funiq);
/* [7] Gestion du retour
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'subject_id' => $subject_id
];
}
}
?>

View File

View File

@ -2,7 +2,7 @@
namespace api\module;
use \manager\sessionManager;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \manager\ManagerError;
use \database\core\Repo;
use \lightdb\core\lightdb;
@ -10,18 +10,6 @@
class subject{
/* FETCHES NEW SUBJECTS FROM Lab-Surveys Database
*
* @note: will store new subjects to localStorage
*
*/
private static function fetchNewSubjects(){
/* [1] Fetch subjects which have answer this survey
=========================================================*/
/* (1) Section Title */
}
/* RETOURNE LA LISTE DE TOUS LES SUJETS
@ -38,7 +26,7 @@
/* [1] On récupére la liste des sujets
=========================================================*/
/* (1) On initialise et ouvre la bd */
$db = new lightdb('subject');
$db = new lightdb('survey_db');
$ids = array_keys( $db->index() );
/* (2) On récupère tous les sujets */
@ -47,19 +35,38 @@
$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] Gestion du retour
=========================================================*/
return [
@ -83,12 +90,12 @@
// Contiendra les sujets
$contacts = [];
$subjects = [];
/* [1] On récupére la liste des sujets
=========================================================*/
/* (1) On initialise et ouvre la bd */
$db = new lightdb('subject');
$db = new lightdb('survey_db');
$fetch = $db->fetch($subject_id);
$db->close();
@ -97,34 +104,44 @@
return [ 'ModuleError' => ManagerError::ModuleError ];
/* (3) On enregistre ses contacts s'il en a */
$db = new lightdb('contact');
if( isset($fetch['contacts']) )
foreach($fetch['contacts'] as $contact)
$subjects[$contact['id']] = $contact;
if( isset($fetch['contacts']) ){
foreach($fetch['contacts'] as $contactId){
$contact = $db->fetch($contactId);
// si le contact n'est pas trouvé -> passe au suivant
if( $contact === false )
continue;
$contacts[$contactId] = $contact;
}
}
/* [2] On récupére la liste des contacts saisis dans PHONE
=========================================================*/
/* (1) On initialise et ouvre la bd */
$db = new lightdb('phone_db');
$fetch = $db->fetch($subject_id);
$db->close();
/* [2] Gestion des relations
/* (2) Si on trouve des contacts, on les ajoute */
if( $fetch !== false && isset($fetch['contacts']) )
foreach($fetch['contacts'] as $contact)
$subjects[$contact['id']] = $contact;
/* [3] On récupére la liste des sujets pour FACEBOOK
=========================================================*/
/* (1) On récupère toutes les relations */
//blabla
/* (1) On initialise et ouvre la bd */
$db = new lightdb('facebook_db');
$fetch = $db->fetch($subject_id);
$db->close();
/* (2) Si on trouve des contacts, on les ajoute */
if( $fetch !== false && isset($fetch['contacts']) )
foreach($fetch['contacts'] as $contact)
$subjects[$contact['id']] = $contact;
/* [4] Gestion du retour
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'subjects' => $contacts
'subjects' => $subjects
];
}
@ -145,7 +162,7 @@
/* [1] On récupère l'id unique actuel
=========================================================*/
$funiq = fopen( __BUILD__.'/lightdb/storage/uniqid', 'r+' );
$funiq = fopen( __BUILD__.'/src/dynamic/uniqid', 'r+' );
flock($funiq, LOCK_EX); // On verrouille le fichier
$uniqid = trim( fgets( $funiq ) );
@ -157,20 +174,16 @@
$newId = intval($uniqid) + 1;
// On crée notre sujet
$data = [
'subject' => [
'id' => $newId,
'name' => $name,
'creation' => time(),
'surveys' => [],
'coords' => ''
]
];
$data = [ 'subject' => [
'id' => $newId,
'name' => $name,
'creation' => time()
]];
/* [2] On crée le sujet dans SURVEYS
=========================================================*/
/* (1) On initialise et ouvre la bd */
$db = new lightdb('subject');
$db = new lightdb('survey_db');
$db->insert( $newId, $data );
$db->close();
@ -205,7 +218,6 @@
public static function search($params){
extract($params);
// Contiendra les sujets
$subjects = [];
@ -213,10 +225,6 @@
/* [0] Notre fonction de recherche (comparaison)
=========================================================*/
function compareSearch($A, $B){
// Returns all if no search keyword
if( $A == '' )
return true;
// {1} On supprime les espaces et tout en minuscule //
$A = str_replace(' ', '', strtolower($A));
$B = str_replace(' ', '', strtolower($B));
@ -231,7 +239,7 @@
/* [1] On récupére la liste des sujets
=========================================================*/
/* (1) On initialise et ouvre la bd */
$db = new lightdb('subject');
$db = new lightdb('survey_db');
$ids = array_keys( $db->index() );
/* (2) On récupère tous les sujets */
@ -241,18 +249,41 @@
$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 [

View File

@ -1,7 +1,7 @@
<?php
namespace api\module;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \api\core\Checker;
use \manager\sessionManager;
use \manager\ManagerError;
@ -78,6 +78,13 @@
}

View File

@ -1,7 +1,7 @@
<?php
namespace api\module;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \manager\sessionManager;
use \api\core\ModuleRequest;
use \manager\ManagerError;
@ -48,7 +48,7 @@
/* [3] Construction du chemin
=========================================================*/
/* (1) On construit le chemin */
$path = __PUBLIC__.$uploadAuth['root'].'/'.$prefix.'/';
$path = __BUILD__.$uploadAuth['root'].'/'.$prefix.'/';
/* (2) On crée le dossier s'il n'existe pas */
if ( !file_exists($path) ) mkdir($path, 0775, true);
@ -70,6 +70,8 @@
}
/* EFFECTUE UN UPLOAD D'UN fichier
*
* @prefix<String> Préfixe (dossier parent) du fichier
@ -82,8 +84,8 @@
*/
private static function simpleFile($prefix, $extension, $file, $tester){
// Si on est pas connecté, on retourne une erreur -> impossible via token
if( !connected() ) return ManagerError::PermissionError;
if( !file_exists($file['tmp_name']) ) return ManagerError::UnreachableResource;
if( !connected() ) return [ 'error' => ManagerError::PermissionError ];
if( !file_exists($file['tmp_name']) ) return [ 'error' => ManagerError::UnreachableResource ];
/* [1] On récupère le chemin du fichier à créer et vérifie le dossier
@ -123,6 +125,20 @@
}
/* IMPORT D'UNE SAUVEGARDE DE FORMULAIRE LOCAL
*
* @file<FILE> Pointeur vers $_FILES['']
@ -157,8 +173,8 @@
/* (3) Vérification du sujet */
$checkSubject = isset($json['subject']['subject_id']) && is_numeric($json['subject']['subject_id']);
$checkSubject = $checkSubject && isset($json['subject']['coords']) && is_string($json['subject']['coords']);
$checkSubject = isset($json['subject']['tmp_id']) && ( is_string($json['subject']['tmp_id']) || is_null($json['subject']['tmp_id']) );
$checkSubject = $checkSubject && isset($json['subject']['subject_id']) && is_numeric($json['subject']['subject_id']);
// Erreur des attributs du sujet incorrects ou manquants
if( !$checkSubject )
@ -168,11 +184,7 @@
/* (4) Vérification des contacts */
foreach($json['contacts'] as $contact){
$checkContact = isset($contact['uid']) && is_numeric($contact['uid']);
$checkContact = $checkContact && (
( isset($contact['username']) && is_string($contact['username']) )
||
( isset($contact['existing']) && is_numeric($contact['existing']) )
);
$checkContact = $checkContact && isset($contact['username']) && is_string($contact['username']);
// $checkContact = $checkContact && isset($contact['sms']) && is_numeric($contact['sms']);
// $checkContact = $checkContact && isset($contact['call']) && is_numeric($contact['call']);
// $checkContact = $checkContact && isset($contact['countsms']) && is_numeric($contact['countsms']);
@ -186,13 +198,12 @@
/* (5) Vérification des mini-fiches */
foreach($json['mini'] as $mini){
$checkMini = isset($mini['uid']) && is_numeric($mini['uid']);
$checkMini = $checkMini && isset($mini['contact']) && is_numeric($mini['contact']);
$checkMini = $checkMini && isset($mini['sexe']) && is_numeric($mini['sexe']);
$checkMini = $checkMini && isset($mini['age']) && is_string($mini['age']);
$checkMini = $checkMini && isset($mini['studies']) && is_string($mini['studies']);
$checkMini = $checkMini && isset($mini['loc']) && is_string($mini['loc']);
$checkMini = $checkMini && isset($mini['unknown']) && is_bool($mini['unknown']);
$checkMini = isset($mini['uid']) && is_numeric($mini['uid']);
$checkMini = $checkMini && isset($mini['sexe']) && is_numeric($mini['sexe']);
$checkMini = $checkMini && isset($mini['age']) && is_string($mini['age']);
$checkMini = $checkMini && isset($mini['studies']) && is_string($mini['studies']);
$checkMini = $checkMini && isset($mini['loc']) && is_string($mini['loc']);
$checkMini = $checkMini && isset($mini['unknown']) && is_bool($mini['unknown']);
// Si erreur des attributs des mini-fiches incorrects ou manquants
if( !$checkMini )
@ -200,21 +211,18 @@
}
/* (6) Vérification des fiches */
foreach($json['fiches'] as $fiches){
$checkFiche = isset($fiches['uid']) && is_numeric($fiches['uid']);
$checkFiche = $checkFiche && isset($fiches['contact']) && is_numeric($fiches['contact']);
$checkFiche = $checkFiche && isset($fiches['sexe']) && is_numeric($fiches['sexe']);
$checkFiche = $checkFiche && isset($fiches['age']) && is_string($fiches['age']);
$checkFiche = $checkFiche && isset($fiches['interest']) && is_numeric($fiches['interest']);
$checkFiche = $checkFiche && isset($fiches['relmark']) && is_numeric($fiches['relmark']);
$checkFiche = $checkFiche && isset($fiches['job']) && is_string($fiches['job']);
$checkFiche = $checkFiche && isset($fiches['loc']) && (is_numeric($fiches['loc']) || $fiches['loc']=='.');
$checkFiche = $checkFiche && isset($fiches['studies']) && is_string($fiches['studies']);
$checkFiche = $checkFiche && isset($fiches['famsit']) && is_numeric($fiches['famsit']);
$checkFiche = $checkFiche && isset($fiches['reltype']) && is_numeric($fiches['reltype']);
$checkFiche = $checkFiche && isset($fiches['medsoc']) && is_numeric($fiches['medsoc']);
$checkFiche = $checkFiche && isset($fiches['medrel']) && is_numeric($fiches['medrel']);
$checkFiche = $checkFiche && isset($fiches['reltypeSpecial']) && is_string($fiches['reltypeSpecial']);
$checkFiche = $checkFiche && isset($fiches['city']) && is_string($fiches['city']);
$checkFiche = $checkFiche && isset($fiches['cp']) && is_string($fiches['cp']);
@ -222,7 +230,6 @@
$checkFiche = $checkFiche && isset($fiches['context']) && is_numeric($fiches['context']);
$checkFiche = $checkFiche && isset($fiches['contextSpecial']) && is_array($fiches['contextSpecial']);
$checkFiche = $checkFiche && isset($fiches['freq']) && is_array($fiches['freq']);
$checkFiche = $checkFiche && isset($fiches['irlfreq']) && is_array($fiches['irlfreq']);
$checkFiche = $checkFiche && isset($fiches['connect']) && is_array($fiches['connect']);
$checkFiche = $checkFiche && isset($fiches['connectSpecial']) && is_array($fiches['connectSpecial']);
@ -280,6 +287,31 @@
}
}

View File

@ -2,7 +2,7 @@
namespace api\module;
use \manager\sessionManager;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \manager\ManagerError;
use \database\core\Repo;
@ -33,10 +33,11 @@
=========================================================*/
$_SESSION['userid'] = $user['id_user'];
$_SESSION['username'] = $user['login'];
$_SESSION['permission'] = ['admin'];
$_SESSION['permission'] = explode( ',', str_replace(' ', '', $user['permission']) );
/* [4] Retour de l'id user
=========================================================*/
return [
'ModuleError' => ManagerError::Success,
'id_user' => $user['id_user']
@ -53,8 +54,6 @@
$_SESSION['userid'] = null;
$_SESSION['username'] = null;
$_SESSION['permission'] = [];
return ['ModuleError' => ManagerError::Success];
}
@ -78,6 +77,11 @@
// Si aucun utilisateur n'est trouve
if( count($user_data) == 0 ) return ['ModuleError' => ManagerError::ModuleError];
/* [2] On met les permissions au bon format (string -> array)
=========================================================*/
$user_data[0]['permission'] = explode( ',', str_replace(' ', '', $user_data[0]['permission']) );
/* [3] Gestion du retour
=========================================================*/
return [
@ -103,6 +107,11 @@
// Si aucun utilisateur n'est trouve
if( $users_data === false ) return ['ModuleError' => ManagerError::ModuleError];
/* [2] On met les permissions au bon format (string -> array)
=========================================================*/
foreach($users_data as $i=>$user)
$users_data[$i]['permission'] = explode( ',', str_replace(' ', '', $user['permission']) );
/* [3] Gestion du retour
=========================================================*/
return [
@ -120,6 +129,8 @@
* @login<String> Login (identifiant) de l'utilisateur
* @password<String> Password de l'utilisateur
* @mail<String> Adresse mail de l'utilisateur
* @reference<int> Reference vers une Personne (sinon NULL)
* @permissions<String> Liste des permissions de l'utilisateur
*
* @return id_user<int> Renvoie l'id de l'utilisateur cree
*
@ -130,11 +141,13 @@
/* [0] Verification et formattage des INPUT
=========================================================*/
$password = sessionManager::sha1($password);
$reference = (is_numeric($reference)) ? (int) $reference : null;
$permission = ($permission=='admin') ? 'admin' : 'subject';
/* [1] Creation de l'utilisateur
=========================================================*/
$create = new Repo('user/create', [$login, $password, $mail]);
$create = new Repo('user/create', [$login, $password, $mail, $reference, $permission]);
$created_id = $create->answer();
// Si erreur de creation, on retourne une erreur

View File

@ -4,167 +4,84 @@
use \manager\ManagerError;
class DataBaseDriver{
class DataBase{
/* STATIC ATTRIBUTES */
private static function conf(){
// YOUR CONFIGURATION BEHIND
$path = __CONFIG__.'/database-driver.json';
/* (1) Checks the file */
if( !is_file($path) )
return [];
/* (2) Checks json */
$parsed = json_decode( file_get_contents($path), true );
if( !is_array($parsed) )
return [];
/* (3) Returns configuration */
return $parsed;
/* ATTRIBUTS STATIQUES */
public static function config_path(){
return [
'local' => __CONFIG__.'/database-local.json',
'remote' => __CONFIG__.'/database.json'
];
}
private static $pdo;
private static $instance;
private static $path; // Databases configurations files
private static $config; // PDO configurations
private static $instance = []; // Database driver instance list
public $error;
/* ATTRIBUTES */
/* ATTRIBUTS */
private $host;
private $dbname;
private $username;
private $password;
private $pdo;
public static $error;
/* CONSTRUCTOR OF A DATABASE DRIVER
*
* @host<String> Database Server's host
* @dbname<String> Database name
* @username<String> Database username
* @password<String> Database password
*
*/
private function __construct($host, $dbname, $username, $password){
/* (2) Stores configuration */
public function __construct($host, $dbname, $username, $password){
$this->host = $host;
$this->dbname = $dbname;
$this->username = $username;
$this->password = $password;
try{
$this->pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
// On signale que tout s'est bien passe
$this->error = ManagerError::Success;
self::$error = ManagerError::Success;
}catch(Exception $e){
// On signale qu'il y a une erreur
$this->error = ManagerError::PDOConnection;
self::$error = ManagerError::PDOConnection;
}
}
/* retourne une instance de la classe */
public static function getInstance(){
if( self::$instance == null || self::$error != ManagerError::Success ){ // Si aucune instance existante OU erreur de connection
/************************************************
**** Multiton Management (static) ****
************************************************/
/* ADDS A NEW CONNECTION
*
* @label<String> [optional] Database Label
*
* @return status<Boolean> If added successfully
*
*/
private static function add($label=null){
$conf = self::conf();
/* [1] Default values
=========================================================*/
/* (1) If label isn't given */
is_null($label) && ($label = 'default');
/* (2) If label and no path */
if( $label !== 'default' && !isset($conf[$label]) )
return false;
/* [3] Instanciates the driver
=========================================================*/
try{
/* (1) If local -> instanciates with local configuration */
// chargement de la configuration du server SQL
if( !checkdnsrr($_SERVER['SERVER_NAME'], 'NS') )
self::$instance[$label] = new DatabaseDriver($conf[$label]['local']['host'], $conf[$label]['local']['dbname'], $conf[$label]['local']['user'], $conf[$label]['local']['password']);
/* (2) If Remote -> instanciates with Remote configuration */
$conf = json_decode( file_get_contents(self::config_path()['local']), true );
else
self::$instance[$label] = new DatabaseDriver($conf[$label]['remote']['host'], $conf[$label]['remote']['dbname'], $conf[$label]['remote']['user'], $conf[$label]['remote']['password']);
$conf = json_decode( file_get_contents(self::config_path()['remote']), true );
return true;
}catch(\Exception $e){
/* (3) If fails */
return false;
// creation de l'instance en fonction des parametres
self::$instance = new DataBase($conf['host'], $conf['dbname'], $conf['user'], $conf['password']);
}
return self::$instance;
}
/* GET A DATABASE DRIVER INSTANCE
*
* @label<String> [optional] Driver's label
*
* @return driver<Database> Multiton
*
*/
public static function get($label=null){
$conf = self::conf();
/* [1] Checks arguments
=========================================================*/
/* (1) Label default value */
is_null($label) && ($label = 'default');
/* (2) If no label, or unknown label */
if( is_null($label) || !isset(self::$instance[$label]) ){
/* (2.1) Try to add the configuration if exists */
if( isset($conf[$label]) ){
self::add($label);
return self::get($label);
}
throw new \Exception('Database @label is incorrect.');
}
/* [2] Returns instance
=========================================================*/
return self::$instance[$label];
}
/* retourne la connection statique */
public static function getPDO($label=null){
$instance = self::get($label);
public static function getPDO(){
$instance = self::getInstance();
return $instance->pdo;
return self::$pdo;
}
public function getConfig(){
return [
'host' => $this->host,
'dbname' => $this->dbname,
'username' => $this->username
];
}
@ -208,10 +125,8 @@
for( $i = 0 ; $i < count($fetchData) ; $i++ ) // pour tout les utilisateurs
foreach($fetchData[$i] as $col => $val){ // pour toutes les entrées
if( \mb_detect_encoding($val) === 'UTF-8' )
if( !\mb_detect_encoding($val, 'UTF-8') )
$fetchData[$i][$col] = utf8_encode($val);
else
$fetchData[$i][$col] = utf8_encode(utf8_decode($val));
if( is_int($col) ){ // Si indice numerique
if( $nextEquivalent ) // Si suit un indice textuel
@ -231,10 +146,8 @@
// on supprime les doublons des entrées (indice numérique)
foreach($fetchData as $i=>$val){ // pour toutes les entrées
if( \mb_detect_encoding($val) === 'UTF-8' )
if( !\mb_detect_encoding($val, 'UTF-8') )
$fetchData[$i] = utf8_encode($val);
else
$fetchData[$i] = utf8_encode(utf8_decode($val));
if( is_int($i) ){ // Si indice numerique
if( $nextEquivalent ) // Si suit un indice textuel

View File

View File

@ -1,7 +1,7 @@
<?php
namespace database\repo;
use \database\core\DatabaseDriver;
use \database\core\Database;
class parentRepo{
@ -30,8 +30,8 @@
/* [2] On charge la liste des colonnes de la table
=========================================================*/
$getColumns = DatabaseDriver::getPDO()->query('SHOW COLUMNS FROM '.static::table_name());
$cols = DatabaseDriver::delNumeric( $getColumns->fetchAll() );
$getColumns = Database::getPDO()->query('SHOW COLUMNS FROM '.static::table_name());
$cols = Database::delNumeric( $getColumns->fetchAll() );
$table_columns = [
'_PRIMARY_' => [] // Contiendra les champs de la clé primaire
@ -84,7 +84,7 @@
$getRequestString .= ' ORDER BY 1 ASC';
// On prépare la requête
$getRequest = DatabaseDriver::getPDO()->prepare($getRequestString);
$getRequest = Database::getPDO()->prepare($getRequestString);
/* [5] On exécute la requête
@ -107,7 +107,7 @@
/* [6] On récupère le résultat
=========================================================*/
return DatabaseDriver::delNumeric( $getRequest->fetchAll() );
return Database::delNumeric( $getRequest->fetchAll() );
}
}

View File

@ -4,7 +4,7 @@
namespace database\repo;
use \manager\sessionManager;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \api\core\Checker;
class token extends parentRepo{
@ -38,14 +38,14 @@
public static function getAll(){
/* [1] On prepare et execute la requete
=========================================================*/
$request = DatabaseDriver::getPDO()->query("SELECT id_token, name, token, expires, (CURDATE() > expires) as expired
$request = Database::getPDO()->query("SELECT id_token, name, token, expires, (CURDATE() > expires) as expired
FROM api_token
ORDER BY expires DESC");
/* [3] On retourne les donnees
=========================================================*/
return DatabaseDriver::delNumeric( $request->fetchAll() );
return Database::delNumeric( $request->fetchAll() );
}
@ -66,7 +66,7 @@
/* [1] Verification dans la base de donnees
=========================================================*/
$check = DatabaseDriver::getPDO()->prepare("SELECT id_token, permission
$check = Database::getPDO()->prepare("SELECT id_token, permission
FROM api_token
WHERE CURDATE() <= expires
AND token = :token");
@ -112,7 +112,7 @@
$token = sessionManager::sha1(uniqid());
// Verification dans la BDD
$check = DatabaseDriver::getPDO()->prepare("SELECT id_token FROM api_token WHERE token = :token");
$check = Database::getPDO()->prepare("SELECT id_token FROM api_token WHERE token = :token");
$check->execute( array( ':token' => $token ) );
// VRAI un token est identique
@ -122,7 +122,7 @@
/* [2] On cree le token
=========================================================*/
$create = DatabaseDriver::getPDO()->prepare("INSERT INTO api_token(id_token, token, name, expires)
$create = Database::getPDO()->prepare("INSERT INTO api_token(id_token, token, name, expires)
VALUES(DEFAULT, :token, :name, :expiration)");
$create->execute(array(
':token' => $token,
@ -132,7 +132,7 @@
/* [3] On verifie qu'il a bien ete cree
=========================================================*/
$created = DatabaseDriver::getPDO()->prepare("SELECT id_token FROM api_token
$created = Database::getPDO()->prepare("SELECT id_token FROM api_token
WHERE token = :token
AND name = :name");
$created->execute(array(
@ -175,7 +175,7 @@
/* [2] Suppression du token
=========================================================*/
$remove = DatabaseDriver::getPDO()->prepare("DELETE FROM api_token
$remove = Database::getPDO()->prepare("DELETE FROM api_token
WHERE id_token = :id_token");
$remove->execute(array( ':id_token' => $id_token ));

View File

@ -1,7 +1,7 @@
<?php
namespace database\repo;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \api\core\Checker;
use \manager\sessionManager;
use \database\repo\parentRepo;
@ -32,7 +32,7 @@
/* [1] On verifie son login/password dans la BDD
=========================================================*/
$check = DatabaseDriver::getPDO()->prepare("SELECT id_user, login
$check = Database::getPDO()->prepare("SELECT id_user, login, permission
FROM users
WHERE ( login = :username OR mail = :mail ) AND password = :password");
$check->execute(array(
@ -49,7 +49,7 @@
// On retourne le resultat
return DatabaseDriver::delNumeric( $result );
return Database::delNumeric( $result );
}
@ -62,16 +62,20 @@
* @login<String> Login (identifiant) de l'utilisateur
* @password<String> Password de l'utilisateur
* @mail<String> Adresse mail de l'utilisateur
* @reference<int> Reference vers une Personne (sinon NULL)
* @permissions<Array> Liste des permissions de l'utilisateur
*
* @return id_user<int> Renvoie l'id de l'utilisateur cree ou FALSE si erreur
*
*/
public static function create($login, $password, $mail){
public static function create($login, $password, $mail, $reference, $permission){
/* [0] Verification et formattage des INPUT
=========================================================*/
$checkInput = Checker::run('hash', $password);
$checkInput = $checkInput && Checker::run('varchar(3, 30)', $login);
$checkInput = $checkInput && Checker::run('mail', $mail);
$checkInput = $checkInput && ( Checker::run('id', $reference) || is_null($reference) );
$checkInput = $checkInput && in_array($permission, ['admin', 'subject']);
// Si erreur en entree, on retourne FAUX
if( !$checkInput ) return false;
@ -79,13 +83,15 @@
/* [1] On verifie que le login/mail et reference sont uniques
=========================================================*/
$checkUnique = DatabaseDriver::getPDO()->prepare("SELECT id_user
$checkUnique = Database::getPDO()->prepare("SELECT id_user
FROM users
WHERE login = :login
OR mail = :mail ");
OR mail = :mail
OR ( reference = :reference AND reference is not NULL )");
$checkUnique->execute(array(
':login' => $login,
':mail' => $mail
':mail' => $mail,
':reference' => $reference
));
// Si un utilisateur a le meme LOGIN/MAIL ou REFERENCE qu'un autre, on retourne une erreur
@ -94,25 +100,48 @@
/* [2] Creation de l'utilisateur
=========================================================*/
$create = DatabaseDriver::getPDO()->prepare("INSERT INTO users(id_user, login, password, mail)
VALUES(DEFAULT, :login, :password, :mail)");
$create->execute(array(
':login' => $login,
':password' => $password,
':mail' => $mail
));
/* (1) Si reference NULL */
if( $reference == null ){
$create = Database::getPDO()->prepare("INSERT INTO users(id_user, login, password, mail, reference, permission)
VALUES(DEFAULT, :login, :password, :mail, NULL, :permission)");
$create->execute(array(
':login' => $login,
':password' => $password,
':mail' => $mail,
':permission' => $permission
));
/* (2) Si reference est defini */
}else{
$create = Database::getPDO()->prepare("INSERT INTO users(id_user, login, password, mail, reference, permission)
VALUES(DEFAULT, :login, :password, :mail, :reference, :permission)");
$create->execute(array(
':login' => $login,
':password' => $password,
':mail' => $mail,
':reference' => (int) $reference,
':permission' => $permission
));
}
/* [3] Verification de la creation + recuperation id
=========================================================*/
$checkCreate = DatabaseDriver::getPDO()->prepare("SELECT id_user
$checkCreate = Database::getPDO()->prepare("SELECT id_user
FROM users
WHERE login = :login
AND password = :password
AND mail = :mail");
AND mail = :mail
AND ( reference = :reference OR reference is NULL )
AND permission = :permission");
$checkCreate->execute(array(
':login' => $login,
':password' => $password,
':mail' => $mail
':mail' => $mail,
':reference' => (int) $reference,
':permission' => $permission
));
// On recupere l'id de l'utilisateur
@ -142,7 +171,7 @@
public static function remove($id_user){
/* [1] On effectue la suppression
=========================================================*/
$getUser = DatabaseDriver::getPDO()->prepare("DELETE FROM users WHERE id_user = :id_user");
$getUser = Database::getPDO()->prepare("DELETE FROM users WHERE id_user = :id_user");
$getUser->execute(array( ':id_user' => $id_user ));
}

View File

@ -2,6 +2,7 @@
namespace lightdb\core;
class lightdb{
// REPERTOIRE RACINE DE TOUTES LES BDD
@ -12,7 +13,6 @@
private $dbname;
private $dir;
private $index;
private $date;
private $driver;
private $line;
@ -53,62 +53,42 @@
$index = json_decode( $fIndex->fgets(), true );
// Si erreur de parsage, on retourne une erreur
if( is_null($index) ) throw new \Exception('[lightdb] index is null');
if( is_null($index) ) return;
$this->index = $index;
/* [3] Initialisation du gestionnaire d'acces (SplFileObject)
=========================================================*/
/* (1) Si le fichier n'existe pas, on le crée */
$this->data = $this->dir.'data';
if( !file_exists($this->data) )
file_put_contents($this->data, '' );
if( !file_exists($this->dir.'data') )
file_put_contents($this->dir.'data', '' );
/* (2) On place un 'driver' sur le fichier */
$this->driver = new \SplFileObject($this->data, 'r+');
$this->driver = new \SplFileObject($this->dir.'data', 'r+');
// $this->driver->setFlags( \SplFileObject::SKIP_EMPTY );
/* (3) On récupère le nombre de lignes */
$this->line = -1;
while( $this->driver->valid() ){
while( !$this->driver->eof() ){
$this->line++;
$this->driver->fgetcsv();
}
}
public function close(){ $this->driver = null; }
/* FLUSH LA BDD (erase all)
/* RETOURNE LA LISTE DES INDEX
*
*/
public function flush(){
/* (1) On flush les index */
$fIndex = new \SplFileObject($this->dir.'index', 'w');
$fIndex->fwrite('[]');
$fIndex = null;
$this->line = 0;
$this->index = [];
/* (2) On flush les data */
file_put_contents($this->dir.'data', '' );
}
/* RETOURNE UN INDEX
*
* @i<String> [OPT] Index pour lequel on veut la ligne et le hash
* @i<String> Index pour lequel on veut la ligne et le hash
*
* @return Index<Array> Tableau associatif contenant le hash et la ligne
*
*/
public function index($i=null){
return is_numeric($i) ? $this->index[$i] : $this->index;
return is_numeric($i) ? $this->index : $this->index;
}
@ -123,21 +103,25 @@
public function insert($key, $data){
/* (1) On vérifie que la clé est unique */
if( array_key_exists($key, $this->index) )
return false;
return true;
$key = (string) $key;
/* (2) On ajoute les données aux fichier */
$json_data = json_encode($data);
$this->driver->seek($this->line);
$written = $this->driver->fwrite( $json_data."\n" );
$this->line++;
$written = $this->driver->fwrite( $json_data.PHP_EOL );
// Si erreur d'écriture, on retourne FALSE
if( is_null($written) )
return false;
/* (3) On enregistre l'index */
$this->index[$key] = [ 'line' => $this->line++ ];
$this->index[$key] = [
'line' => $this->line - 1,
'hash' => sha1($json_data)
];
/* (4) On enregistre le fichier index */
$fIndex = new \SplFileObject($this->dir.'index', 'w');
@ -168,13 +152,13 @@
foreach($dataset as $key=>$data){
$json_data = json_encode($data);
$this->line++;
$written = $this->driver->fwrite( $json_data."\n" );
$written = $this->driver->fwrite( $json_data.PHP_EOL );
/* (3) On enregistre les index */
$this->index[$key] = [
'line' => $this->line - 1//,
//'hash' => sha1($json_data)
'line' => $this->line - 1,
'hash' => sha1($json_data)
];
}
@ -189,31 +173,34 @@
}
/* RENVOIE LES DONNEES ASSOCIEES A UNE CLE DONNEE
*
* @key<String> Clé associée à la valeur à récupérer
*
* @return data<mixed*> Renvoie la valeur associée à la clé, FALSE si erreur
*
*/
public function fetch($key){
/* (1) On vérifie que la clé existe bien */
if( !array_key_exists($key, $this->index) )
return false;
/* RENVOIE LES DONNEES ASSOCIEES A UNE CLE DONNEE
*
* @key<String> Clé associée à la valeur à récupérer
*
* @return data<mixed*> Renvoie la valeur associée à la clé, FALSE si erreur
*
*/
public function fetch($key){
/* (1) On vérifie que la clé existe bien */
if( !array_key_exists($key, $this->index) )
return false;
/* (2) On récupère la ligne */
$line = $this->index[$key]['line'];
/* (2) On récupère la ligne */
$line = $this->index[$key]['line'];
/* (3) On récupère le contenu */
$this->driver->seek($line);
$json = json_decode( $this->driver->current(), true );
// Si erreur de parsage
if( is_null($json) )
return false;
return $json;
}
/* (3) On récupère le contenu */
$this->driver->seek($line);
$json = json_decode( $this->driver->current(), true );
// Si erreur de parsage
if( is_null($json) )
return false;
return $json;
}
/* RENVOIE LES DONNEES ASSOCIEES AUX CLES DONNEES
*
@ -261,25 +248,22 @@
public function delete($key){
/* (1) On vérifie l'existence de la clé */
if( !array_key_exists($key, $this->index) )
return false; // On considère que l'action souhaitée est effectuée
return true; // On considère que l'action souhaitée est effectuée
$line = $this->index[$key]['line'];
/* (2) On réarrange la bd pour supprimer la ligne */
$tmpfilename = __TMP__.'/'.uniqid().'.dat';
$tmpfilename = __BUILD__.'/tmp/'.uniqid().'.dat';
$tmpfile = new \SplFileObject($tmpfilename, 'w');
$this->driver->seek(0);
// On recopie toutes les lignes sauf celle à supprimer dans un fichier temporaire
foreach($this->driver as $k=>$content){
// Only valuable lines (not the last linebreak)
if( $k >= $this->line )
break;
while( $this->driver->key() < $this->line ){
// On n'écrit pas la ligne à supprimer
if( $k != $line )
$tmpfile->fwrite( $content );
if( $this->driver->key() != $line )
$tmpfile->fwrite( $this->driver->current() );
$this->driver->next();
}
// On décrémente le nb de lignes
@ -333,9 +317,6 @@
$keyLines[$key] = $this->index[$key]['line'];
}
if( count($keyLines) == 0 )
return true;
/* [2] On trie les clés en fonction de leur ligne
=========================================================*/
$sorted = [];
@ -361,19 +342,18 @@
/* [3] On supprime les lignes à supprimer
=========================================================*/
/* (1) On réarrange la bd pour supprimer la ligne */
$tmpfilename = __TMP__.'/'.uniqid().'.dat';
$tmpfilename = __BUILD__.'/tmp/'.uniqid().'.dat';
$tmpfile = new \SplFileObject($tmpfilename, 'w');
$this->driver->seek(0);
/* (2) On recopie toutes les lignes sauf celles à supprimer dans un fichier temporaire */
foreach($this->driver as $key=>$content){
// Only valuable lines (not the last linebreak)
if( $key >= $this->line ) break;
while( $this->driver->key() < $this->line ){
// On n'écrit pas la ligne à supprimer
if( !in_array($key, $sorted) )
$tmpfile->fwrite( $content );
// Si la ligne en cours n'est pas dans la liste des lignes à supprimer
if( !in_array($this->driver->key(), $sorted) )
$tmpfile->fwrite( $this->driver->current() ); // On l'écrit dans le nouveau fichier
$this->driver->next();
}
$tmpfile = null;
@ -412,7 +392,51 @@
return true;
}
/* RENVOIE LES DONNEES ASSOCIEES A UN CHAMP DE RECHERCHE
*
* @nomParam<typeParam> Description du param
*
* @return nomRetour<typeRetour> Description du retour
*
*/
public function filter($data){
/* (1) Si @data est un tableau associatif */
if( is_array($data) ){
$filtered = [];
foreach($this->index as $i=>$indexData){
$this->driver->seek( $indexData['line'] );
$dbData = json_decode( $this->driver->fgets(), true );
foreach($data as $key=>$value)
if( isset($dbData[$key]) && preg_match("#$value#", $dbData[$key]) ){
$filtered[$i] = $dbData;
break;
}
}
return $filtered;
/* (2) Sinon on compare @data en tant que valeur simple */
}else{
$this->tmp = sha1( json_encode($data) );
return array_filter($this->index, [$this, 'simpleFilter']);
}
}
protected function simpleFilter($e){ return $e['hash'] == $this->tmp; }
}

View File

@ -0,0 +1,158 @@
{
"logs": {
"direction": { "0": "INCOMING", "1": "OUTGOING", "2": "MISSED" },
"type": { "0": "PHONE", "1": "SMS" }
},
"contacts": {
"sexe": { "0":"Homme", "1":"Femme", "2":"Indéterminé" },
"age": {
".": "NA",
"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"
},
"studies1": {
".": "NA",
"0": "Inconnu",
"1": "< BAC",
"2": "BAC",
"3": "BAC+2",
"4": "BAC+3",
"5": "BAC+4 et plus"
},
"studies2": {
".": "NA",
"0": "Inconnue",
"01": "Pas de scolarité",
"02": "Aucun diplôme mais scolarité jusqu'en école primaire ou au collège",
"03": "Aucun diplôme mais scolarité au-delà du collège",
"04": "Certificat d'études primaires (CEP)",
"05": "BEPC, brevet élémentaire, brevet des collèges",
"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) 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": {
".": "NA",
"10": "Agriculteurs exploitants (Agriculteurs, maraîchers, viticulteurs…)",
"21": "Artisans (Maçons, électriciens, couturiers, boulangers, garagistes, coiffeurs…)",
"22": "Commerçants et assimilés (Commerçants en détail ou en gros, buralistes, cafetiers, agents immobiliers…)",
"23": "Chefs d'entreprise de 10 salariés ou plus",
"31": "Professions libérales et assimilés (Médecins, avocats, notaires, architectes libéraux…)",
"32": "Cadres de la fonction publique, professions intellectuelles et artistiques (Personnels administratifs de catégorie A, professeurs de lenseignement secondaire ou supérieur, médecins hospitaliers, artistes…)",
"36": "Cadres d'entreprise (Cadres administratifs, cadres commerciaux, ingénieurs…)",
"41": "Professions intermédiaires de l'enseignement, de la santé, de la fonction publique et assimilés (Personnels administratifs de catégorie B, instituteurs, infirmiers, travailleurs sociaux…)",
"46": "Professions intermédiaires administratives et commerciales des entreprises (Comptables, chargés de clientèles…)",
"47": "Techniciens (Techniciens détudes, techniciens de contrôle, dessinateurs en bâtiment, géomètres…)",
"48": "Contremaîtres, agents de maîtrise (Conducteurs de travaux, chefs déquipe…)",
"51": "Employés de la fonction publique (Personnels de catégorie C, agents administratifs, agents de service…)",
"54": "Employés administratifs d'entreprise (Secrétaires, agents daccueil…)",
"55": "Employés de commerce (Vendeurs, caissiers…)",
"56": "Personnels des services directs aux particuliers (Serveurs, coiffeurs, assistantes maternelles…)",
"61": "Ouvriers qualifiés de type industriel ou artisanal (Mécaniciens, chauffeurs, cuisiniers…)",
"66": "Ouvriers non qualifiés de type industriel ou artisanal (Ouvrier de production, manœuvres…)",
"69": "Ouvriers agricoles (Bergers, ouvriers de la viticulture, bûcherons, ouvrier forestiers…)",
"71": "Anciens agriculteurs exploitants",
"72": "Anciens artisans, commerçants, chefs d'entreprise",
"73": "Anciens cadres",
"74": "Anciennes professions intermédiaires",
"75": "Anciens employés",
"76": "Anciens ouvriers",
"81": "Chômeurs n'ayant jamais travaillé",
"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 dautres 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)",
"2": "En couple sans enfants",
"3": "En couple avec enfants"
},
"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 proche",
"7": "Ami",
"8": "Relation de service (médecin, ...)",
"9": "Inconnu"
},
"dist": {
".": "NA",
"0": "- de 5 minutes",
"1": "de 5 à 15 minutes",
"2": "de 15 à 60 minutes",
"3": "+ d'une heure"
},
"freq": {
"0": "plusieurs fois par semaine",
"1": "1 fois par semaine",
"2": "1 fois par mois",
"3": "1 fois par an ou moins",
"4": "Jamais"
},
"connect": {
"0": "Oui",
"1": "Non"
}
},
"relations": {
"type": {
"0": "Aucune relation",
"1": "Relation alter-alter",
"2": "Relation cellulaire mineure",
"3": "Relation facebook mineure",
"4": "Top 10 des appels",
"5": "Top 10 des sms",
"6": "Top 10 de l'historique Facebook",
"7": "Top 10 de Facebook Messenger"
}
}
}

View File

@ -0,0 +1 @@
[]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"1":{"line":0,"hash":"10a358a685d0fbdff78068d891fdd08f06011be4"},"2":{"line":1,"hash":"dad8b6bc0c54a329075ae2a5f55e188dc1fd13fa"},"":{"line":2,"hash":"847db4a9bf7f5397425f60a0c596910216ab8f7c"}}

View File

@ -0,0 +1,8 @@
{"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}}

View File

@ -0,0 +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"}}

View File

@ -0,0 +1 @@
361

View File

View File

@ -0,0 +1,127 @@
<?php
namespace manager;
class ManagerError{
/* SUCCESS */
const Success = 0;
/* Parsage json */
const ParsingFailed = 1;
/* ResourceDispatcher */
// Drapeaux invalides
const InvalidFlags = 2;
// Fichier inexistant
const UnreachableResource = 3;
/* ModuleRequest */
// Le @path n'est pas renseigne
const MissingPath = 4;
// Verification de la coherence du chemin (existe dans la conf)
const WrongPathModule = 5;
// Module non specifie dans la conf
const UnknownModule = 6;
// Methode non specifie pour ce Module dans la conf
const UnknownMethod = 7;
// Methode inamorcable
const UncallableMethod = 8;
// Erreur de parametre(s)
const ParamError = 9;
// Erreur dans le traitement
const ModuleError = 10;
/* Repo */
// Verification de la coherence du chemin (existe dans la conf)
const WrongPathRepo = 11;
// Module non specifie dans la conf
const UnknownRepo = 12;
// Erreur dans le traitement
const RepoError = 13;
/* Database */
// Erreur lors de la creation d'un objet PDO (connection)
const PDOConnection = 14;
/* API token */
// Token inexistant ou faux
const TokenError = 15;
const PermissionError = 16;
/* Erreur d'UPLOAD */
const UploadError = 17;
// Mauvais format de fichier
const FormatError = 18;
/* Erreur au niveau javascript */
//const JavascriptError = 19; // -> géré en js
/* EXPLICITE UN CODE D'ERREUR
*
* @error<Integer> Code d'erreur
*
* @return explicit<String> Description explicite du code d'erreur
*
*/
public static function explicit($error){
switch($error){
case self::Success: return "Tout s'est bien deroulé."; break;
case self::ParsingFailed: return "La lecture du fichier JSON ou XML a echouée."; break;
case self::InvalidFlags: return "Les spécifications (drapeaux) sont incorrects."; break;
case self::UnreachableResource: return "La ressource n'existe pas (404)."; break;
case self::MissingPath: return "Le chemin de délégation n'a pas été renseigné."; break;
case self::WrongPathModule: return "Le chemin de délégation est incorrect ('nomModule/nomMethode')."; break;
case self::WrongPathRepo: return "Le chemin de délégation est incorrect ('nomRepo/nomMethode')."; break;
case self::UnknownModule: return "Le module n'existe pas."; break;
case self::UnknownRepo: return "Le repo n'existe pas."; break;
case self::UnknownMethod: return "Le methode n'existe pas."; break;
case self::UncallableMethod: return "Le methode n'est pas amorçable."; break;
case self::ParamError: return "Un ou plusieurs paramètres sont manquants ou incorrects."; break;
case self::ModuleError: return "Erreur lors du traitement du module."; break;
case self::RepoError: return "Erreur lors du traitement du repo."; break;
case self::PDOConnection: return "La connexion avec la base de données a echouée."; break;
case self::TokenError: return "Le token de connection est absent, érroné ou expiré."; break;
case self::PermissionError: return "Vous n'avez pas la permission d'effectuer cette action."; break;
case self::UploadError: return "Une erreur d'upload est survenue."; break;
case self::FormatError: return "Le fichier n'est pas au bon format."; break;
default: return "Description d'erreur inconnue..."; break;
}
// Erreur inconnue
return null;
}
public static function setHttpCode($error){
http_response_code( $error == self::Success ? 200 : 417 );
}
}
?>

View File

View File

@ -58,7 +58,8 @@
/* AMORCEUR */
/************/
public static function session_start(){
return \session_start();
\session_start();
return;
/* [1] Génération et Gestion des donnees a utiliser

View File

@ -2,7 +2,7 @@
namespace orm\core;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \orm\core\SQLBuilder;
@ -31,18 +31,12 @@
const SEL_DISTINCT = true;
// {3} Gestion du Order By //
const ORDER_ASC = '__ASC__';
const ORDER_DESC = '__DESC__';
// {3} Constantes d'insertion //
const INSERT_DEFAULT = '__DEFAULT__'; // Valeur DEFAULT (pour insertion)
/* Attributs */
private $driver; // Database driver label
private $where; // Tableau associatif contenant les conditions
private $select; // Tableau contenant la liste des champs à afficher
private $orderby; // Tableau contenant la liste des orderby
private $unique; // VRAI si on attend une valeur unique
private $schema; // Tableau contenant les informations associées aux données
private $joined; // Tableau contenant les Rows liés
@ -51,33 +45,30 @@
/* CONSTRUCTEUR
*
* @schema<Array> Tableau contenant les informations de la requête
* @driver<String> [optional] DatabaseDriver label
*
*/
public function __construct($schema, $driver=null){
/* (1) Database Driver */
$this->driver = $driver;
/* (2) On récupère les informations */
public function __construct($schema){
/* (1) On récupère les informations */
$this->schema = $schema;
/* (3) On initialise les conditions */
/* (2) On initialise les conditions */
$this->where = [];
/* (4) On initialise les champs à retourner */
/* (3) On initialise les champs à retourner */
$this->select = [];
/* (5) On initialise l'ordonnancement' */
$this->orderby = [];
/* (6) On initialise le caractère 'unique' du résultat */
/* (4) On initialise le caractère 'unique' du résultat */
$this->unique = false;
/* (7) On initialise les jointures */
/* (5) On initialise les jointures */
$this->joined = [];
}
/* FILTRE LES ENTREES D'UNE TABLE AVEC LA CLE PRIMAIRE SPECIFIEE
*
* @primary<mixed> Clé primaire simple
@ -167,6 +158,10 @@
}
/* FILTRAGE DYNAMIQUES
*
* @method<String> Nom de la méthode
@ -188,17 +183,16 @@
$column_name = '';
/* (1) formatte la requête 'MyAttribute' -> 'my_attribute' */
for( $l = 0, $ll = strlen($regex[1]) ; $l < $ll ; $l++ ){
for( $l = 0 ; $l < strlen($regex[1]) ; $l++ ){
$letter = $regex[1][$l];
// Si la lettre est en majuscule mais que c'est pas la première ni un seul mot
// Si la lettre est en majuscule mais que c'est pas la première
if( strtoupper($letter) == $letter && $l > 0 )
$column_name .= '_';
$column_name .= strtolower($letter);
}
/* (2) On vérifie que la colonne existe */
if( !isset($this->schema['columns'][$column_name]) )
return $this; // si n'existe pas, on ne fait rien
@ -206,97 +200,57 @@
/* [2] On vérifie le type du paramètre
=========================================================*/
// On délègue
$args = array_merge([$column_name], $a);
return call_user_func_array([$this, 'where'], $args);
}
public function where($field){
// get arguments
$args = array_slice(func_get_args(), 1);
/* [1] Vérification de l'argument @field
=========================================================*/
/* (1) Type de @field */
if( !is_string($field) )
/* (1) Si aucun param, on quitte */
if( count($a) == 0 )
return $this;
/* (2) On vérifie que la colonne existe */
if( !isset($this->schema['columns'][$field]) )
return $this; // si n'existe pas, on ne fait rien
/* (2) Si c'est un paramètre seul, on ajoute par défaut self::COND_EQUAL */
if( !is_array($a[0]) )
$a[0] = [ $a[0], self::COND_EQUAL ];
/* [2] On vérifie le type du paramètre
=========================================================*/
/* (1) Si au moins 1 param */
if( count($args) < 1 )
/* (3) Si type INT et pas numérique */
if( $this->schema['columns'][$column_name]['type'] == 'int' && !is_numeric($a[0][0]) )
return $this;
/* [3] If `IN` condition
=========================================================*/
$defaultWhere = $this->where;
$inCond = count($args[0]) > 1 && is_array($args[0][0]) && $args[0][1] == self::COND_IN;
// erreur
if( is_array($args[0][0]) && !$inCond )
/* (4) Si type FLOAT et pas numérique */
if( $this->schema['columns'][$column_name]['type'] == 'float' && !is_numeric($a[0][0]) )
return $this;
/* (1) Si c'est une condition "IN"
---------------------------------------------------------*/
if( $inCond ){
/* (5) Si type STRING et pas string */
if( $this->schema['columns'][$column_name]['type'] == 'text' && !is_string($a[0][0]) )
return $this;
/* (1) On vérifie le type de chaque valeur du IN */
$type = $this->schema['columns'][$field]['type'];
foreach($args[0][0] as $value){
if( $type == 'int' && !is_numeric($value) ) return $this;
if( $type == 'float' && !is_numeric($value) ) return $this;
if( in_array($type, ['text', 'varchar']) && !is_string($value) ) return $this;
}
/* (2) Si c'est une condition "simple"
---------------------------------------------------------*/
}else{
/* (1) Si le type de condition est manquant, on met EQUAL par défaut */
if( !is_array($args[0]) )
$args[0] = [ $args[0], self::COND_EQUAL ];
/* (2) On vérifie le type de chaque valeur */
$type = $this->schema['columns'][$field]['type'];
if( $type == 'int' && !is_numeric($args[0][0]) ) return $this;
if( $type == 'float' && !is_numeric($args[0][0]) ) return $this;
if( in_array($type, ['text', 'varchar']) && !is_string($args[0][0]) ) return $this;
}
/* [3] Si type OK, on enregistre la condition
=========================================================*/
/* (1) Si aucune condition pour ce champ, on crée un tableau */
if( !isset($this->where[$field]) )
$this->where[$field] = [];
if( !isset($this->where[$column_name]) )
$this->where[$column_name] = [];
/* (2) On ajoute la condition */
$this->where[$field][] = $args[0];
$this->where[$column_name][] = $a[0];
// On retourne l'object courant
return $this;
}
/* SELECTIONNE UNIQUEMENT LE CHAMP SELECTIONNE
*
* @field<String> Libellé du champ à afficher
* @func<CONST> Fonction d'aggrégation (ou NULL)
* @distinct<Boolean> Clause DISTINCT
* @alias<String> Alias du champ
*
* @return this<Rows> Retourne l'object courant
*
*/
public function select($field=null, $func=null, $distinct=false, $alias=null){
public function select($field=null, $func=null, $distinct=false){
/* [1] On formatte les champs
=========================================================*/
/* (1) On vérifie le type de @field */
@ -314,32 +268,15 @@
if( !is_null($func) && !in_array($func, $funcList) )
return $this;
// If CONCAT -> force type to TEXT
if( $func === Rows::SEL_CONCAT )
$this->schema['columns'][$field]['type'] = 'text';
/* (4) On met la valeur par défaut à @distinct si type mauvais */
$distinct = !is_bool($distinct) ? false : $distinct;
/* (5) Si @alias incorrect, on met @field par défaut */
if( !is_string($alias) )
$alias = $field;
/* [2] On enregistre le champ
=========================================================*/
/* (1) Si "SELECT *" on ajout tous les champs */
if( $field === '*' ){
foreach($this->schema['columns'] as $f=>$c)
if( !isset($this->select[$f]) )
$this->select[$f] = [$func, $distinct, $f];
/* (2) Si aucun SELECT pour ce champ, on le crée */
}else{
if( !isset($this->select[$field]) )
$this->select[$field] = [$func, $distinct, $alias];
}
/* (1) Si aucun SELECT pour ce champ, on le crée */
if( !isset($this->select[$field]) )
$this->select[$field] = [$func, $distinct];
/* [3] On retourne l'object courant
@ -348,47 +285,10 @@
}
/* SELECTIONNE L'ORDONNANCEMENT DES RESULTATS
*
* @field<String> Libellé du champ à afficher
* @order<CONST> Gestion de l'ordre ASC/DESC (ou NULL)
*
* @return this<Rows> Retourne l'object courant
*
*/
public function orderby($field=null, $order=null){
/* [1] On formatte les champs
=========================================================*/
/* (1) On vérifie le type de @field */
if( !is_string($field) )
return $this;
/* (2) On vérifie que la colonne @field existe, sinon on quitte */
if( !isset($this->schema['columns'][$field]) && $field != '*' )
return $this;
/* (3) On vérifie @order */
$orderList = [self::ORDER_ASC, self::ORDER_DESC];
// Valeur si NULL
$order = is_null($order) ? $orderList[0] : $order;
// Si ordre non référencée, on quitte
if( !in_array($order, $orderList) )
return $this;
/* [2] On enregistre le champ
=========================================================*/
/* (1) On crée le ORDER_BY pour ce champ */
$this->orderby[$field] = $order;
/* [3] On retourne l'object courant
=========================================================*/
return $this;
}
/* JOINT UNE SECONDE TABLE ()
*
@ -469,6 +369,11 @@
}
/* PERMET DE DIRE QUE L'ON VEUT UN RESULTAT UNIQUE
*
* @return this<Rows> Retourne l'object courant
@ -486,6 +391,11 @@
}
/* MODIFIE DES ENTREES (SANS MODIFICATION DE CLE PRIMAIRE POSSIBLE)
*
* @updates<Array> Tableau associatif contenant les nouvelles valeurs
@ -601,7 +511,7 @@
$requestString = SQLBuilder::BUILD($requestS).';';
/* (2) On prépare la requête */
$request = DatabaseDriver::getPDO($this->driver)->prepare($requestString);
$request = Database::getPDO()->prepare($requestString);
@ -614,6 +524,10 @@
return $updated;
}
/* AJOUTE UNE ENTREE DANS LA TABLE
*
* @entry<Array> Tableau associatif de la forme (colonne => valeur)
@ -722,7 +636,7 @@
/* [2] On bind les paramètres et exécute la requête
=========================================================*/
/* (0) On initialise la requête et les paramètres */
$request = DatabaseDriver::getPDO($this->driver)->prepare($requestS.';');
$request = Database::getPDO()->prepare($requestS.';');
$bound = [];
/* (1) On bind les paramètres */
@ -741,6 +655,8 @@
}
/* SUPPRIME LES ENTREES
*
* @return status<Boolean> Retourne si TRUE ou FALSE les entrées ont bien été supprimées
@ -812,7 +728,7 @@
$requestString = SQLBuilder::BUILD($requestS).';';
/* (2) On prépare la requête */
$request = DatabaseDriver::getPDO($this->driver)->prepare($requestString);
$request = Database::getPDO()->prepare($requestString);
/* [5] On exécute la requête et retourne le résultat
=========================================================*/
@ -824,9 +740,13 @@
}
/* RETOURNE LES DONNEES / NULL si une erreur survient
*
* @execute<Boolean> VRAI si on veut exécuter la requête, sinon renvoie [requete, boundParams]
* @execute<Boolean> VRAI si on veut exécuter la requête, sinon renvoie [requete, boundParams]
*
* @return data<Array> Tableau contenant les champs sélectionnés
* @return data<mixed> Valeur du champ sélectionné (si 1 seul champ)
@ -848,6 +768,7 @@
$joinedFetched[$field] = $data['object']->fetch(false);
/* [1] On rédige la clause SELECT
=========================================================*/
/* (1) On formatte les données */
@ -873,6 +794,7 @@
$requestS['SELECT'] = SQLBuilder::SELECT($selectTables);
/* [2] On rédige la clause FROM
========================================================*/
/* (0) On initialise la clause */
@ -887,6 +809,8 @@
// On ajoute la clause FROM de jointure à la clause FROM locale //
$requestS['FROM'] = array_merge($data['request']['FROM'], $requestS['FROM']);
/* [5] On rédige la clause WHERE/AND
=========================================================*/
/* (1) On met les conditions locales */
@ -919,6 +843,8 @@
}
/* [6] Clause GROUP BY
=========================================================*/
/* (0) On initialise la liste des @rows non aggrégés */
@ -950,27 +876,7 @@
if( count($groupBy) > 0)
$requestS['GROUPBY'] = SQLBuilder::GROUPBY($groupBy);
/* [6] Clause ORDER BY
=========================================================*/
/* (1) On formatte les données */
$orderTables = [];
/* (2) On ajoute les champs locaux */
if( count($this->orderby) > 0 )
$orderTables[$this->schema['table']] = $this->orderby;
/* (4) On ajoute les champs des jointures (récursif)*/
foreach($joinedFetched as $field=>$data){
foreach($data['request']['ORDERBY'] as $table=>$fields) // pour chaque ensemble de champ de chaque table
foreach($fields as $field=>$orderBy) // Pour chaque orderby de chaque champ
if( count($orderBy) > 0 )
$orderTables[$table][$field] = $orderBy;
}
/* (3) On génère la clause SELECT */
$requestS['ORDERBY'] = SQLBuilder::ORDERBY($orderTables);
/* [6] Clause LIMIT
=========================================================*/
@ -985,11 +891,10 @@
/* (2) On compose la requête */
$requestString = SQLBuilder::BUILD($requestS).';';
// var_dump($requestString);
/* (3) On prépare la requête */
$request = DatabaseDriver::getPDO($this->driver)->prepare($requestString);
$request = Database::getPDO()->prepare($requestString);
// var_dump($requestString);
/* [8] On exécute la requête et retourne le résultat
=========================================================*/
@ -1005,6 +910,10 @@
}
/* ON FORMATTE LES DONNEES DE SORTIE
*
* @data<Array> Données / Tableau de données
@ -1052,45 +961,32 @@
if( !$twoDimensions )
$formatted = [$formatted];
/* (2) On récupère les noms des champs à partir des select (alias) */
/* (2) On retire les indices numériques */
// {1} On récupère les colonnes locales //
$existingColumns = [];
foreach($this->select as $field=>$data)
$existingColumns[$data[2]] = $this->schema['columns'][$field];
$existingColumns = $this->schema['columns'];
// {2} On ajoute les colonnes des jointures //
foreach($this->joined as $j)
foreach($j['object']->select as $field=>$data)
$existingColumns[$data[2]] = $j['object']->schema['columns'][$field];
$existingColumns = array_merge( $existingColumns, $j['object']->schema['columns'] );
// {3} On vérifie chaque clé, si c'est une colonne qui existe //
foreach($formatted as $i=>$entry)
// Pour chaque champ
foreach($entry as $index=>$value){
foreach($entry as $index=>$value)
// Si la colonne existe on applique le type
if( isset($existingColumns[$index]) ){
if( $existingColumns[$index]['type'] == 'int' )
$formatted[$i][$index] = intval( $value );
elseif( $existingColumns[$index]['type'] == 'float' )
else if( $existingColumns[$index]['type'] == 'float' )
$formatted[$i][$index] = floatval( $value );
// String utf8 management
elseif( \mb_detect_encoding($value) === 'UTF-8' )
$formatted[$i][$index] = utf8_encode($value);
else
$formatted[$i][$index] = utf8_encode(utf8_decode($value));
// Si pas non plus une aggrégation et si indice numérique, on le retire
}else if( !preg_match('/^agg_.+/', $index) && is_numeric($index) )
}else if( !preg_match('/^agg_.+/', $index) && is_numeric($index) )
unset($formatted[$i][$index]);
}
/* (3) On remet 1 dimension si 1 dimension à la base */
if( !$twoDimensions )

View File

@ -2,7 +2,7 @@
namespace orm\core;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \orm\core\Rows;
@ -21,16 +21,10 @@
}
/* CONSTRUIT LA REQUETE FORMATTEE "ORDER BY" AVEC UNE LISTE DE CHAMPS
*
* @tables<Array> Liste de champs : [table => fields]
*
* @return sql<Array> Renvoie un tableau formatté
*
*/
public static function ORDERBY($tables){
return $tables;
}
/* CONSTRUIT LA REQUETE FORMATTEE "GROUP BY" AVEC UNE LISTE DE CHAMPS
*
@ -44,6 +38,10 @@
}
/* CONSTRUIT LA REQUETE FORMATTEE "FROM" AVEC UNE LISTE DE TABLES
*
* @tables<Array> Liste de tables OU SQL PUR
@ -56,6 +54,10 @@
}
/* CONSTRUIT LA REQUETE FORMATTEE "UPDATE" AVEC LA TABLE EN QUESTION
*
* @table<String> Table en question
@ -68,6 +70,10 @@
}
/* CONSTRUIT LA REQUETE FORMATTEE "DELETE" AVEC LA TABLE EN QUESTION
*
* @table<String> Table en question
@ -80,6 +86,10 @@
}
/* CONSTRUIT LA REQUETE TEXTUELLE "IN" AVEC UNE LISTE DE TABLES
*
* @field<Array> Tableau contenant [table, field]
@ -113,7 +123,13 @@
}
return $sql.")";
} /* CONSTRUIT LA REQUETE TEXTUELLE "WHERE" AVEC UNE LISTE DE TABLES
}
/* CONSTRUIT LA REQUETE TEXTUELLE "WHERE" AVEC UNE LISTE DE TABLES
*
* @field<Array> Tableau contenant [table, field]
* @valeur<Array> Valeurs de la clause WHERE [valeur, opérateur]
@ -144,7 +160,13 @@
return $sql;
} /* CONSTRUIT LA REQUETE FORMATTEE "SET" AVEC UNE LISTE DE TABLES
}
/* CONSTRUIT LA REQUETE FORMATTEE "SET" AVEC UNE LISTE DE TABLES
*
* @values<Array> Tableau de la forme [ field=>value, field2=>value2 ]
* @bound<Arary> Tableau associatif contenant les variables "bindés" -> ajout des champs
@ -174,7 +196,13 @@
}
return $sql;
} /* CONSTRUIT LA REQUETE FORMATTEE "LIMIT" AVEC UN NOMBRE D'ENTREES
}
/* CONSTRUIT LA REQUETE FORMATTEE "LIMIT" AVEC UN NOMBRE D'ENTREES
*
* @count<int> Nombre limite
*
@ -195,6 +223,18 @@
return $sql;
}
/* CONSTRUIT LA REQUETE A PARTIR D'UNE REQUETTE FORMATTEE
*
* @request<Arary> Requête formattée
@ -218,7 +258,7 @@
case 'SELECT':
$sql .= "SELECT ";
$c = 0;
foreach($statements as $table=>$fields){
foreach($statements as $table=>$fields)
foreach($fields as $field=>$select){
/* (1) On construit le nom du champ */
@ -234,11 +274,7 @@
/* (4) On ajoute l'alias */
// si défini
if( isset($select[2]) )
$fieldStr = "$fieldStr as ".$select[2];
// si func et non défini
elseif( isset($select[0]) && !is_null($select[0]) )
if( isset($select[0]) && !is_null($select[0]) )
$fieldStr = "$fieldStr as agg_$field";
else
$fieldStr = "$fieldStr";
@ -247,7 +283,6 @@
$c++;
}
}
$sql .= "\n";
break;
@ -301,6 +336,7 @@
case 'UPDATE':
$sql .= "UPDATE $statements\n";
break;
break;
/* (7) Clause SET
@ -328,35 +364,17 @@
$sql .= "\n";
break;
/* (9) Clause ORDER BY
---------------------------------------------------------*/
case 'ORDERBY':
// si aucun ORDER BY, on quitte
if( count($statements) == 0 )
continue;
$sql .= 'ORDER BY ';
$c = 0;
foreach($statements as $table=>$fields)
foreach($fields as $field=>$order){
if( $c > 0 ) $sql .= ', ';
$sql .= "$table.$field ". substr($order, 2, -2);
$c++;
}
$sql .= "\n";
break;
}
}
/* [2] On retourne le résultat
=========================================================*/
return $sql;

View File

@ -3,7 +3,7 @@
namespace orm\core;
use \database\core\DatabaseDriver;
use \database\core\Database;
use \manager\ManagerError;
use \orm\core\Rows;
@ -11,20 +11,21 @@
// CLASSE MAITRE
class Table{
private static $database = 'logauth';
/* RENVOIE LES DONNEES D'UNE TABLE
*
* @table<String> Nom de la table à selectionner
* @driver<String> [optional] DatabaseDriver label
*
* @return this<ORM> Retourne une instance de l'ORM
*
*/
public static function get($table_name, $driver=null){
public static function get($table_name){
/* [0] Initialisation des attributs
=========================================================*/
$schema = [
'database' => DatabaseDriver::get($driver)->getConfig()['dbname'],
'database' => self::$database,
'table' => null,
'columns' => null
];
@ -33,13 +34,13 @@
/* [1] On vérifie que la table existe
=========================================================*/
/* (1) Requête */
$checkTable = DatabaseDriver::getPDO($driver)->query("SHOW tables FROM ".$schema['database']);
$checkTableResult = DatabaseDriver::delNumeric( $checkTable->fetchAll() );
$checkTable = Database::getPDO()->query("SHOW tables FROM ".self::$database);
$checkTableResult = Database::delNumeric( $checkTable->fetchAll() );
/* (2) On met en forme les données */
$tables = [];
foreach($checkTableResult as $table)
$tables[] = $table['Tables_in_'.$schema['database']];
$tables[] = $table['Tables_in_'.self::$database];
/* (3) Si n'existe pas, on renvoie une erreur */
if( !in_array($table_name, $tables) )
@ -53,8 +54,8 @@
/* [2] Si la table existe, on récupère les colonnes
=========================================================*/
/* (1) On récupère les colonnes */
$getColumns = DatabaseDriver::getPDO($driver)->query("SHOW columns FROM ".$schema['database'].'.'.$table_name);
$columnsResult = DatabaseDriver::delNumeric( $getColumns->fetchAll() );
$getColumns = Database::getPDO()->query("SHOW columns FROM ".self::$database.'.'.$table_name);
$columnsResult = Database::delNumeric( $getColumns->fetchAll() );
/* (2) On met en forme les données */
$columns = [];
@ -84,7 +85,7 @@
/* [3] On récupère les clés étrangères
=========================================================*/
/* (1) On récupère le texte du 'CREATE TABLE' */
$getCreateTable = DatabaseDriver::getPDO($driver)->query("show create table ".$table_name);
$getCreateTable = Database::getPDO()->query("show create table ".$table_name);
if( is_bool($getCreateTable) )
throw new \Exception('[*] Cannot fetch constrains');
$create_table = $getCreateTable->fetch()['Create Table'];
@ -101,7 +102,7 @@
/* [3] On renvoie une instance de 'Rows'
=========================================================*/
return new Rows($schema, $driver);
return new Rows($schema);
}

View File

View File

0
config/.htaccess → subDir/config/.htaccess Executable file → Normal file
View File

View File

@ -0,0 +1,6 @@
{
"host" : "localhost",
"dbname" : "nxtic",
"user" : "php",
"password" : "Qt358nUdyeTxLDM8"
}

View File

@ -0,0 +1,6 @@
{
"host" : "xdrm.io",
"dbname" : "nxtic",
"user" : "php",
"password" : "QbzjZACndQM6NmuD"
}

0
config/menu.json → subDir/config/menu.json Executable file → Normal file
View File

49
config/modules.json → subDir/config/modules.json Executable file → Normal file
View File

@ -34,6 +34,7 @@
"parameters": {}
},
"markdown": {
"description": "Retourne une description en markdown des différents modules de l'API",
"permissions": [],
@ -41,6 +42,7 @@
"parameters": {}
},
"apiBlueprint": {
"description": "Retourne une documentation de l'API au format API Blueprint.",
"permissions": [],
@ -64,10 +66,11 @@
"logout": {
"description": "Deconnexion",
"permissions": ["admin"],
"permissions": [],
"parameters": {}
},
"getById": {
"description": "Retourne les informations d'un utilisateur.",
"permissions": ["admin"],
@ -79,6 +82,7 @@
}
},
"getAll": {
"description": "Retourne les informations de tous les utilisateurs.",
"permissions": ["admin"],
@ -88,19 +92,23 @@
}
},
"create": {
"description": "Creation d'un nouvel administrateur.",
"description": "Creation d'un nouvel utilisateur.",
"permissions": ["admin"],
"parameters": {
"login": { "description": "Login de l'administrateur, 30 caracteres maximum.", "type": "varchar(3,30)" },
"password": { "description": "Mot de passe de l'administrateur.", "type": "text" },
"mail": { "description": "Adresse mail de l'administrateur.", "type": "mail" }
"login": { "description": "Login de l'utilisateur, 30 caracteres maximum.", "type": "varchar(3,30)" },
"password": { "description": "Mot de passe de l'utilisateur.", "type": "text" },
"mail": { "description": "Adresse mail de l'utilisateur.", "type": "mail" },
"reference": { "description": "UID d'une personne d'un sondage, peut etre vide.", "type": "text" },
"permission": { "description": "Permissions de l'utilisateur : 'admin' ou 'subject'", "type": "varchar(5,7)" }
},
"output": {
"id_user": { "description": "Identifiant de l'administrateur créé", "type": "id" }
"id_user": { "description": "Identifiant de l'utilisateur créé", "type": "id" }
}
},
"remove": {
"description": "Suppression d'un utilisateur.",
"permissions": ["admin"],
@ -121,6 +129,7 @@
}
},
"generate": {
"description": "Création d'un token de nom et de durée donnée",
"permissions": ["admin"],
@ -140,7 +149,7 @@
"description": "Recherche d'un sujet par nom",
"permissions": ["admin"],
"parameters": {
"name": { "description": "Le nom du sujet", "type": "varchar(0,50)" }
"name": { "description": "Le nom du sujet", "type": "varchar(1,50)" }
},
"output": {
"results": { "description": "Liste des sujet associés aux mots-clés.", "type": "array<array<mixed>>" }
@ -167,6 +176,7 @@
}
},
"create": {
"description": "Creation d'un nouveau sujet.",
"permissions": ["admin"],
@ -182,26 +192,11 @@
"input": {
"survey": {
"description": "Enregistre les données d'une enquête téléphonique.",
"permissions": ["admin"],
"parameters": {
"subject": { "description": "Données du sujet (id, etc)", "type": "array<mixed>" },
"contacts": { "description": "Données des contacts de l'enquête.", "type": "array<array>" },
"mini": { "description": "Mini fiches relations sur les contacts de l'enquête.", "type": "array<array>" },
"fiches": { "description": "Fiches relation sur les plus proches contacts de l'enquête.", "type": "array<array>" },
"matrice": { "description": "Matrice contenant les relations entre les plus proches contacts", "type": "array<array>", "optional": true }
},
"output": {
"subject_id": { "description": "Identifiant du sujet complété", "type": "id" }
}
},
"phone": {
"description": "Enregistre les données d'une enquête téléphonique.",
"permissions": ["admin"],
"parameters": {
"subject": { "description": "Données du sujet (id, etc)", "type": "array<mixed>" },
"subject": { "description": "Données sur le sujet de l'enquête.", "type": "array" },
"contacts": { "description": "Données des contacts de l'enquête.", "type": "array<array>" },
"mini": { "description": "Mini fiches relations sur les contacts de l'enquête.", "type": "array<array>" },
"fiches": { "description": "Fiches relation sur les plus proches contacts de l'enquête.", "type": "array<array>" },
@ -216,7 +211,7 @@
"description": "Enregistre les données d'une enquête facebook.",
"permissions": ["admin"],
"parameters": {
"subject": { "description": "Données du sujet (id, etc)", "type": "array<mixed>" },
"subject": { "description": "Données sur le sujet de l'enquête.", "type": "array" },
"contacts": { "description": "Données des contacts de l'enquête.", "type": "array<array>" },
"mini": { "description": "Mini fiches relations sur les contacts de l'enquête.", "type": "array<array>" },
"fiches": { "description": "Fiches relation sur les plus proches contacts de l'enquête.", "type": "array<array>" },
@ -253,6 +248,9 @@
"options": { "download": true },
"parameters": {
"subjects": { "description": "Identifiants des sujets d'enquêtes à intégrer.", "type": "array<id>", "optional": true },
"phone": { "description": "Si vaut TRUE, renvoie les sujets cellulaires.", "type": "boolean", "optional": true },
"facebook": { "description": "Si vaut TRUE, renvoie les sujet facebook.", "type": "boolean", "optional": true },
"survey": { "description": "Si vaut TRUE, renvoie les sujets ResTIC.", "type": "boolean", "optional": true },
"all": { "description": "Si vaut TRUE, renvoie tous les sujets enregistrés.", "type": "boolean", "optional": true }
}
},
@ -263,6 +261,9 @@
"options": { "download": true },
"parameters": {
"subjects": { "description": "Identifiants des sujets d'enquêtes à intégrer.", "type": "array<id>", "optional": true },
"phone": { "description": "Si vaut TRUE, renvoie les sujets cellulaires.", "type": "boolean", "optional": true },
"facebook": { "description": "Si vaut TRUE, renvoie les sujet facebook.", "type": "boolean", "optional": true },
"survey": { "description": "Si vaut TRUE, renvoie les sujets ResTIC.", "type": "boolean", "optional": true },
"all": { "description": "Si vaut TRUE, renvoie tous les sujets enregistrés.", "type": "boolean", "optional": true }
}
},

Some files were not shown because too many files have changed in this diff Show More