From f5a75bb5885dbdd9747eb4614a511849b25e9d88 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 20 May 2016 19:14:30 +0200 Subject: [PATCH] =?UTF-8?q?Issue=20#13;=20Dans=20l'exportation=20des=20don?= =?UTF-8?q?n=C3=A9es,=20les=20fichiers=20'contacts.csv'=20et=20'dict.csv'?= =?UTF-8?q?=20sont=20mis=20en=20commun=20Pour=20DOWNLOAD/FACEBOOK=20aussi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/module/download.php | 12 +++++++++--- tmp/content_573f459f9cbbf.php | Bin 0 -> 3967 bytes tmp/content_573f45b0713e5.php | Bin 0 -> 3967 bytes tmp/download_573f459f9cb5c.php | 9 +++++++++ tmp/download_573f45b071380.php | 9 +++++++++ view/js/data-min.js | 3 ++- view/js/data.js | 16 ++++++++++++++++ 7 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 tmp/content_573f459f9cbbf.php create mode 100644 tmp/content_573f45b0713e5.php create mode 100644 tmp/download_573f459f9cb5c.php create mode 100644 tmp/download_573f45b071380.php diff --git a/manager/module/download.php b/manager/module/download.php index b459517..ab2dab2 100644 --- a/manager/module/download.php +++ b/manager/module/download.php @@ -257,6 +257,7 @@ $db = new lightdb('facebook_db', __ROOT__.'/src/dynamic/'); + $contacts = ''; /* [1] On construit les fichiers de chaque sujet =========================================================*/ foreach($subjects as $s=>$subjectId){ @@ -270,24 +271,29 @@ /* (2) On construit le CSV */ $output[$s] = array( - 'contacts' => self::parseCSV($subjectData['contacts'], $dict['contacts']), 'relations' => self::parseCSV($subjectData['relations'], array()) ); + /* (3) On ajoute les contacts à la liste */ + $contacts .= self::parseCSV($subjectData['contacts'], $dict['contacts'], strlen($contacts) == 0 ); // On affiche les colonnes pour la première fois uniquement + } // On ferme l'instance de la base de données $db->close(); - $ouptut['all'] = array( + $output['all'] = array( 'contacts' => '', 'dict' => '' ); + // Pour le nom du répertoire + $subjects['all'] = 'all'; + /* [2] On assemble tous les contacts =========================================================*/ - + $output['all']['contacts'] = $contacts; /* [3] On ajoute le dictionnaire =========================================================*/ diff --git a/tmp/content_573f459f9cbbf.php b/tmp/content_573f459f9cbbf.php new file mode 100644 index 0000000000000000000000000000000000000000..db244ce24bd1487422a822b6dfb043444aa1028c GIT binary patch literal 3967 zcmaJ^XEYq#)*fBNC^35PqIV*q4IvSucZo1$5Js;rMu{-G2uANMMDK0F3?>;8qP;>8 zy_ZBwv@7@falbcf-Fwb@_C9-^^*n3;+G{@sx{z;0u25k?8pWNNn8u+UxVfv@^}81va|wO!*D|HBVC#?8f=p!v6SAsN4#x>H|c1` zK)teL(ggn$Ul$SnP)G~_s9v`YycU;$y2E|!pg#ZZx!-aJvZY9Kf&SbRIYFkDshI!8 zmf(vnZIn1klmAsUq1-~Z^U!d#=6vWqfkJ|#SFU9bY20#r5|d!c2ZINiHG+sop96Rg z`59{ikoiM;hBc))bw-&K&lnJoC;AZN}7?+}~8M%fD@Wj(80Dn*=pXL>y@ zEC-N7cwgS$KtV|>(PGE(^(9EPxYc|GP`BmHN9l4ICNai?u~BGIR_%jwxF0J9Tgh=e zZPbH%w%#d6P~3t-bml%Wv1pY6JxEt-lo@7+Nna`7Zfsv}Xw`H&`~I(&7K1!b!^8Mbw-kv*`OVZ3)w(f_x-n_GI9NvVCyrj*q=j1T{VCq% zG;Jh3cP$&C#LGa>PNnQA$O}E`6Y1FWZ(drP#_(6AS zAE3(#9WysIi%BjT7Ny&2wojRpQ3fi(Q3+?FhTDg?IbKh(R>pZ^V_y!hzS|~?gWZ03 z4Cdb)EZF|07~Uer%UxpacWbNrT<;Zi)|5P|{>S2D_}NwUB*$vYgFc?;)rDVep}?Q& zvXdi)*Ts}I6nN3Y@|@{#(gL$@z#?KXV(UPHSBd#Rkv^vXj0C?^+ZeGz`@*d5Jnx|h zfKAPXM27BU!m3yCi?%CC>O#nbndF*M$ckCrPwqoANkQ-hvALwS5??=kJd1XQO)uNt z;mCEYK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D!cO&B*<2+2%+1#LK-mW*N}jXdOp%m}$9I%hM7OOr`)r`(zHxW1!Tkry!@>r%~bcPxbB})Dj4oJ*4{pS{( z$ADvu2}S#tDz^*N*i$PXz-QSkYgI9D-VTI&WvxH5G^8P@GzSJ0svF=IKGwA>9T2J* z?1yvNm=)~|{xVzC%xpfkezCqsUe6hD7b$1h^R2QIO79fgJ0#5BM$Nqa+)9&H2VvwC z$u^);c3IM_M6LK_YgOkV$w8!T6`yQiEPWcatfD<{`*4S1(KeU^_CzE1mNgg~_a0`y zHVqEVhEC0HU{kaTt=2VIgG3@{Gp(5*YfJeFDu1OrIbArizf#4}nQF256yHz~Hp3W)ysNbE55g&1n3Vd7G2F>|9mx z@C;cq)FhK_c*G89^`)COaPr&Fs4|GO^`Ux?n*V|6cV6FVwmIcP#_Y~>7J?JSlfb-z zl-yEbp*J9A64D^P2geuM8Jl;+o@m*4YQC68_bncX8$gtA1nV`{F^q#TmN#4QdlK>F z$)qUQ(Fr$&K=+69xi?(-?T$>mgl>xh8)yC8i03&>e63~K>n`F z@$OeD+x92azo{Z#*G{d0Dwm(@hFZEfLg6R~E|8=G=qPr2j>M#gFAw-CzHX~5gM$R! z`iv>i)c%A&{59)(Ifw<`(b>}a(m4`M1(jP2qTZhOrA50JwMC>nU5epwGb2!)?wGaR zS>M@yliPqMO146v_4RSGB=_&!ygZB8 z4Ng`b95QIz<&~l)UgaP9_CO}VrvJ@0Be&9CSm&KKt r(?b4--E#f>hoStF`sc>>A8G{2|J&aTbV*2me-U5bo$DM-^}G5PTV6Q% literal 0 HcmV?d00001 diff --git a/tmp/download_573f459f9cb5c.php b/tmp/download_573f459f9cb5c.php new file mode 100644 index 0000000..355f3c7 --- /dev/null +++ b/tmp/download_573f459f9cb5c.php @@ -0,0 +1,9 @@ + diff --git a/tmp/download_573f45b071380.php b/tmp/download_573f45b071380.php new file mode 100644 index 0000000..4be296a --- /dev/null +++ b/tmp/download_573f45b071380.php @@ -0,0 +1,9 @@ + diff --git a/view/js/data-min.js b/view/js/data-min.js index 92cd385..6b11cac 100644 --- a/view/js/data-min.js +++ b/view/js/data-min.js @@ -1,2 +1,3 @@ var subjectList=$("#subject-list"),subjectAdd=$("#add-subject"),exportDeflater=new FormDeflater(document.getElementById("export-form"),["input"],["data-name"]);subjectAdd.addEventListener("click",function(a){a=document.createElement("input");a.type="number";a.dataset.name="subjects";a.placeholder="Sujet";a.style="width: 5em; display: block;";subjectList.appendChild(a)},!1); -$("#export-form #export-all").addEventListener("click",function(a){a=(new FormDeflater(subjectList,["input"],["data-name"])).deflate().subjects;for(var c=[],b=0;b