Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
asiafood.bdcloud.fr /
compta /
stats /
Delete
Unzip
Name
Size
Permission
Date
Action
ca_carrefour
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
vraiscript
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
byratecountry.php
17.88
KB
-rwxr-xr-x
2021-01-30 17:41
ca_custom_csv.php
9.11
KB
-rwxr-xr-x
2021-03-24 12:26
cabyprodserv.php
16.2
KB
-rwxr-xr-x
2021-03-24 23:43
cabyprodserv.php_NEW
16.27
KB
-rwxr-xr-x
2021-03-24 15:27
cabyuser.php
17.36
KB
-rwxr-xr-x
2021-01-30 17:41
carrefour_file.php
11.41
KB
-rwxr-xr-x
2021-03-24 23:35
casoc.php
22.38
KB
-rwxr-xr-x
2021-01-30 17:41
file_carrefour_download.csv
2.53
KB
-rwxr-xr-x
2021-03-24 12:26
index.php
23.3
KB
-rwxr-xr-x
2021-01-30 17:41
supplier_turnover.php
16.77
KB
-rwxr-xr-x
2021-01-30 17:41
supplier_turnover_by_prodserv.php
15.49
KB
-rwxr-xr-x
2021-01-30 17:41
supplier_turnover_by_thirdparty.php
20.31
KB
-rwxr-xr-x
2021-01-30 17:41
Save
Rename
<?php // Global variables $version='1.10'; $error=0; require_once("../../master.inc.php"); global $db, $langs, $user, $conf; $langs->load("main"); @set_time_limit(0); $year_curr = date('Y'); $years = ""; for($i=2018;$i<=$year_curr;$i++) { $years[]= $i; } foreach($years as $year) { //delete previous files $month_array = array( "Janvier"=>"01", "Fevrier"=>"02", "Mars"=>"03", "Avril"=>"04", "Mai"=>"05", "Juin"=>"06", "Juillet"=>"07", "Aout"=>"08", "Septembre"=>"09", "Octobre"=>"10", "Novembre"=>"11", "Decembre"=>"12" ); $ca_carrefour_delis_table[]= array( "C.A. CARREFOUR ".$year ); $ca_carrefour_delis_table[]= array( "-" ); $headerCSV1 = ";CATEGORIE/MOIS;"; foreach($month_array as $month_name => $month) { $headerCSV1.=$month_name.";"; } $ca_carrefour_delis_table[]= array( $headerCSV1.";TOTAL_HT" ); $totalline1 = ";CA_DELIS_HT;"; $totalline2 = ";KG_DELIS;"; $totalyear_ht1 = 0; foreach($month_array as $month_name => $month) { //generate new files $sql = " SELECT sum(l.total_ht) as amount,sum(p.weight*l.qty) as poids FROM llx_facture as f, llx_facturedet as l, llx_product as p, llx_societe as s, llx_categorie as c, llx_categorie_product as cp WHERE s.rowid=f.fk_soc AND f.fk_soc IN(2254,2255,2256,2257,2258,2261,2267,2269,2270,2271,2272,2274,2275,2277,2279,2283,2284,2294,2296,2297,2298,2299,2300,2303,2304,2305,2306,2307,2308,2313,2314,2320,2321,2323,2324,2325,2326,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2356,2357,2358,2359,2360,2361,2364,2365,2366,2368,2369,2370,2371,2372,2373,2374,2375,2392,2395,2432,2434,2457,2479,2480,2481,2571,2572,2573,2574,2588,2616,2617,2618,2620,2621,2622,2624,2625,2627,2629,2631,2634,2635,2636,2639,2642,2643,2645,2649,2650,2652,2657,2658,2662,2663,2664,2666,2667,2668,2669,2670,2673,2675,2676,2678,2679,2680,2681,2686,2689,2699,2700,2701,2705,2706,2707,2708,2709,2710,2712,2713,2715,2716,2718,2719,2720,2721,2722,2723,2724,2725,2727,2729,2730,2731,2732,2735,2736,2737,2742,2743,2746,2748,2751,2752,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2769,2772,2773,2774,2780,2781,2782,2783,2784,2785,2786,2789,2792,2793,2799,2801,2802,2803,2805,2806,2808,2809,2812,2813,2814,2815,2819,2820,2822,2823,2825,2827,2828,2829,2830,2831,2832,2835,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2853,2854,2857,2860,2861,2865,2867,2868,2869,2870,2871,2882,2885,2886,2887,2889,2890,2891,2892,2893,2894,2895,2900,2902,2903,2906,2907,2908,2910,2911,2918,2919,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932,2937,2938,2940) AND l.fk_product = p.rowid AND l.fk_facture = f.rowid AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3) AND f.datef >= '".$year."".$month."01000000' AND f.datef <= '".$year."".$month."31235959' AND (c.rowid = 6) AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid AND f.entity = 1 ORDER BY p.ref "; $res = $db->query($sql); $ca_carrefour_delis = $db->fetch_object($res); //print("<pre>".print_r($ca_carrefour_delis,true)."</pre>"); //print $ca_carrefour_delis->amount."<br>"; $totalline1 .= round($ca_carrefour_delis->amount,2).";"; $totalline2 .= round($ca_carrefour_delis->poids,2).";"; $totalyear_ht1 = $totalyear_ht1 + $ca_carrefour_delis->amount; } $ca_carrefour_delis_table[]= array( $totalline1.";".$totalyear_ht1 ); $ca_carrefour_delis_table[]= array( $totalline2 ); $ca_carrefour_delis_table[]= array( " " ); $totalline3 = ";CA_AUTRES_HT;"; $totalline4 = ";KG_AUTRES;"; $totalyear_ht2 = 0; foreach($month_array as $month_name => $month) { //generate new files $sql = " SELECT sum(l.total_ht) as amount, sum(p.weight*l.qty) as poids FROM llx_facture as f, llx_facturedet as l, llx_product as p, llx_societe as s WHERE s.rowid=f.fk_soc AND f.fk_soc IN(2254,2255,2256,2257,2258,2261,2267,2269,2270,2271,2272,2274,2275,2277,2279,2283,2284,2294,2296,2297,2298,2299,2300,2303,2304,2305,2306,2307,2308,2313,2314,2320,2321,2323,2324,2325,2326,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2356,2357,2358,2359,2360,2361,2364,2365,2366,2368,2369,2370,2371,2372,2373,2374,2375,2392,2395,2432,2434,2457,2479,2480,2481,2571,2572,2573,2574,2588,2616,2617,2618,2620,2621,2622,2624,2625,2627,2629,2631,2634,2635,2636,2639,2642,2643,2645,2649,2650,2652,2657,2658,2662,2663,2664,2666,2667,2668,2669,2670,2673,2675,2676,2678,2679,2680,2681,2686,2689,2699,2700,2701,2705,2706,2707,2708,2709,2710,2712,2713,2715,2716,2718,2719,2720,2721,2722,2723,2724,2725,2727,2729,2730,2731,2732,2735,2736,2737,2742,2743,2746,2748,2751,2752,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2769,2772,2773,2774,2780,2781,2782,2783,2784,2785,2786,2789,2792,2793,2799,2801,2802,2803,2805,2806,2808,2809,2812,2813,2814,2815,2819,2820,2822,2823,2825,2827,2828,2829,2830,2831,2832,2835,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2853,2854,2857,2860,2861,2865,2867,2868,2869,2870,2871,2882,2885,2886,2887,2889,2890,2891,2892,2893,2894,2895,2900,2902,2903,2906,2907,2908,2910,2911,2918,2919,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932,2937,2938,2940) AND l.fk_product = p.rowid AND l.fk_facture = f.rowid AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3) AND f.datef >= '".$year."".$month."01000000' AND f.datef <= '".$year."".$month."31235959' AND f.entity = 1 ORDER BY p.ref "; $res = $db->query($sql); $ca_carrefour_autres = $db->fetch_object($res); $sql = " SELECT sum(l.total_ht) as amount,sum(p.weight*l.qty) as poids FROM llx_facture as f, llx_facturedet as l, llx_product as p, llx_societe as s, llx_categorie as c, llx_categorie_product as cp WHERE s.rowid=f.fk_soc AND f.fk_soc IN(2254,2255,2256,2257,2258,2261,2267,2269,2270,2271,2272,2274,2275,2277,2279,2283,2284,2294,2296,2297,2298,2299,2300,2303,2304,2305,2306,2307,2308,2313,2314,2320,2321,2323,2324,2325,2326,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2356,2357,2358,2359,2360,2361,2364,2365,2366,2368,2369,2370,2371,2372,2373,2374,2375,2392,2395,2432,2434,2457,2479,2480,2481,2571,2572,2573,2574,2588,2616,2617,2618,2620,2621,2622,2624,2625,2627,2629,2631,2634,2635,2636,2639,2642,2643,2645,2649,2650,2652,2657,2658,2662,2663,2664,2666,2667,2668,2669,2670,2673,2675,2676,2678,2679,2680,2681,2686,2689,2699,2700,2701,2705,2706,2707,2708,2709,2710,2712,2713,2715,2716,2718,2719,2720,2721,2722,2723,2724,2725,2727,2729,2730,2731,2732,2735,2736,2737,2742,2743,2746,2748,2751,2752,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2769,2772,2773,2774,2780,2781,2782,2783,2784,2785,2786,2789,2792,2793,2799,2801,2802,2803,2805,2806,2808,2809,2812,2813,2814,2815,2819,2820,2822,2823,2825,2827,2828,2829,2830,2831,2832,2835,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2853,2854,2857,2860,2861,2865,2867,2868,2869,2870,2871,2882,2885,2886,2887,2889,2890,2891,2892,2893,2894,2895,2900,2902,2903,2906,2907,2908,2910,2911,2918,2919,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932,2937,2938,2940) AND l.fk_product = p.rowid AND l.fk_facture = f.rowid AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3) AND f.datef >= '".$year."".$month."01000000' AND f.datef <= '".$year."".$month."31235959' AND (c.rowid = 6) AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid AND f.entity = 1 ORDER BY p.ref "; $res = $db->query($sql); $ca_carrefour_delis = $db->fetch_object($res); //print("<pre>".print_r($ca_carrefour_autres,true)."</pre>"); //print $ca_carrefour_autres->amount."<br>"; $totalline3 .= round( ($ca_carrefour_autres->amount - $ca_carrefour_delis->amount),2).";"; $totalline4 .= round( ($ca_carrefour_autres->poids - $ca_carrefour_delis->poids),2).";"; $totalyear_ht2 = $totalyear_ht2 + ($ca_carrefour_autres->amount - $ca_carrefour_delis->amount); } $ca_carrefour_delis_table[]= array( $totalline3.";".$totalyear_ht2 ); $ca_carrefour_delis_table[]= array( $totalline4 ); $ca_carrefour_delis_table[]= array( " " ); $ca_carrefour_delis_table[]= array( ";;;;;;;;;;;;;;;".($totalyear_ht1+$totalyear_ht2) ); } //print("<pre>".print_r($ca_carrefour_delis_table,true)."</pre>"); $FILE_NAME1 = "ca_carrefour/ca_carrefour_delis.csv"; $FILE_FULL_PATH1 = getcwd()."/".$FILE_NAME1; $f = fopen($FILE_FULL_PATH1, 'w'); foreach ($ca_carrefour_delis_table as $fields) { fputcsv($f, $fields ); } fseek($f, 0); fpassthru($f); fclose($f); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($FILE_FULL_PATH1).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($FILE_FULL_PATH1)); flush(); // Flush system output buffer readfile($FILE_FULL_PATH1); exit; ?>