Le script a débuté sur jeu. 30 juin 2022 07:56:44 CEST
]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ ./icirelais.sh
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 15
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 22
PHP Notice: Undefined index: language in /home/www-lp/www/admin/call_icirelais_file_synchronize.php on line 23
PHP Warning: include_once(includes/languages/french/icirelais_file_synchronize.php): failed to open stream: No such file or directory in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Warning: include_once(): Failed opening 'includes/languages/french/icirelais_file_synchronize.php' for inclusion (include_path='.:/opt/php5.3/php5.3.29/lib/php') in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Notice: Use of undefined constant DOWNLOAD_OK - assumed 'DOWNLOAD_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 144
PHP Notice: Use of undefined constant UNCOMPRESS_OK - assumed 'UNCOMPRESS_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 189
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 INSERT INTO icirelais (file_id, relay_id, insee, owner_name, adresse_1, adresse_2, adresse_3, postal_code, city, shop_name, coord_lat, coord_long, pda_equipment, start_validity_date, end_validity_date, last_shippment_date, new_shippment_date, text, monday_opening_hours, tuesday_opening_hours, wednesday_opening_hours, thursday_opening_hours, friday_opening_hours, saturday_opening_hours, sunday_opening_hours, closing_period_start_date_1, closing_period_end_date_1, closing_period_start_date_2, closing_period_end_date_2, closing_period_start_date_3, closing_period_end_date_3, required_time) VALUES [TEP STOP] ]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ ls incl^C
]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ ^C
]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ cat icirelais.sh
#!/bin/bash
source $HOME/.bashrc
cd $HOME ; php www/admin/call_icirelais_file_synchronize.php
/bin/rm -f /tmp/ICIRELAIS*
]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ pwd
/home/www-lp/script
]0;www-lp@vps575036: ~/script[01;32mwww-lp@vps575036[00m:[01;34m~/script[00m$ cd
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ php www/admin/call_icirelais_file_synchronize.php
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 15
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 22
PHP Notice: Undefined index: language in /home/www-lp/www/admin/call_icirelais_file_synchronize.php on line 23
PHP Warning: include_once(includes/languages/french/icirelais_file_synchronize.php): failed to open stream: No such file or directory in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Warning: include_once(): Failed opening 'includes/languages/french/icirelais_file_synchronize.php' for inclusion (include_path='.:/opt/php5.3/php5.3.29/lib/php') in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Notice: Use of undefined constant DOWNLOAD_OK - assumed 'DOWNLOAD_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 144
PHP Notice: Use of undefined constant UNCOMPRESS_OK - assumed 'UNCOMPRESS_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 189
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 INSERT INTO icirelais (file_id, relay_id, insee, owner_name, adresse_1, adresse_2, adresse_3, postal_code, city, shop_name, coord_lat, coord_long, pda_equipment, start_validity_date, end_validity_date, last_shippment_date, new_shippment_date, text, monday_opening_hours, tuesday_opening_hours, wednesday_opening_hours, thursday_opening_hours, friday_opening_hours, saturday_opening_hours, sunday_opening_hours, closing_period_start_date_1, closing_period_end_date_1, closing_period_start_date_2, closing_period_end_date_2, closing_period_start_date_3, closing_period_end_date_3, required_time) VALUES [TEP STOP] ]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ vi ^C
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find -na[K[K[K. -name icirelais_file_synchronize.php
./www/exapaq/catalog/admin/includes/languages/french/icirelais_file_synchronize.php
./www/exapaq/catalog/admin/includes/languages/english/icirelais_file_synchronize.php
./www/admin/includes/languages/french/icirelais_file_synchronize.php
./www/admin/includes/languages/english/icirelais_file_synchronize.php
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ vi /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php
[?1000h[?1049h[?1h=[2;1H▽[6n[2;1H [1;1H]11;?[1;51r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[51;1H"~/www/admin/includes/classes/icirelais_file_synchronize_V2.php" 345L, 10521C[>c[27m[23m[m[H[2J[2;9H[38;5;224m}[m[4;9H[96m//=========================================================================================================================[6;9H/**
* [m[38;5;81m@param [m[96mstring $value
* [m[38;5;81m@return [m[96mstring
*/[m[10;9H[38;5;81mfunction[m _valueFilter[38;5;224m([m[93m$[m[1m[96mvalue[m[38;5;224m)[m [38;5;224m{[m[11;17H[93mif[m[38;5;224m([m[93m$[m[1m[96mvalue[m [93m==[m [95m'-'[m[38;5;224m)[m [38;5;224m{[m[12;25H[93m$[m[1m[96mvalue[m [93m=[m [38;5;121mnull[m;[13;17H[38;5;224m}[m[14;17H[93mreturn[m [93m$[m[1m[96mvalue[m;[15;9H[38;5;224m}[m[17;9H[96m//=========================================================================================================================[m[19;9H[38;5;81mfunction[m _icirelais_fields [38;5;224m()[m [38;5;224m{[m[20;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m [95m'file_id'[m,[21;49H[95m'relay_id'[m,[22;49H[95m'insee'[m,[23;49H[95m'owner_name'[m,[24;49H[95m'adresse_1'[m,[25;49H[95m'adresse_2'[m,[26;49H[95m'adresse_3'[m,[27;49H[95m'postal_code'[m,[28;49H[95m'city'[m,[29;49H[95m'shop_name'[m,[30;49H[95m'coord_lat'[m,[31;49H[95m'coord_long'[m,[32;49H[95m'pda_equipment'[m,[33;49H[95m'start_validity_date'[m,[34;49H[95m'end_validity_date'[m,[35;49H[95m'last_shippment_date'[m,[36;49H[95m'new_shippment_date'[m,[37;49H[95m'text'[m,[38;49H[95m'monday_opening_hours'[m,[39;49H[95m'tuesday_opening_hours'[m,[40;49H[95m'wednesday_opening_hours'[m,[41;49H[95m'thursday_opening_hours'[m,[42;49H[95m'friday_opening_hours'[m,[43;49H[95m'saturday_opening_hours'[m,[44;49H[95m'sunday_opening_hours'[m,[45;49H[95m'closing_period_start_date_1'[m,[46;49H[95m'closing_period_end_date_1'[m,[47;49H[95m'closing_period_start_date_2'[m,[48;49H[95m'closing_period_end_date_2'[m,[49;49H[95m'closing_period_start_date_3'[m,[50;49H[95m'closing_period_end_date_3'[m,[51;178H305,18-60 94%
"~/www/admin/includes/classes/icirelais_file_synchronize_V2.php" 345L, 10521C[100C [25;60H[?1000l[?1002h[?12l[?25h[?25l[51;168H:[25;60H[51;1H[K[51;1H:[?12l[?25h1[?25l[?12l[?25h8[?25l[?12l[?25h9[?25l[?12l[?25h
[?25l[25;17H[27m[23m[m[H[2J[2;17H[96m// Open the local file[m[3;17H[93m$[m[1m[96mfile[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[93m.[mDIRECTORY_SEPARATOR[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m][m;[4;17H[93mif[m[38;5;224m([m[93m![m[38;5;224m([m[93m$[m[1m[96mhandle2[m [93m=[m @[1m[96mfopen[m[38;5;224m([m[93m$[m[1m[96mfile[m, [95m'w+'[m[38;5;224m)))[m [38;5;224m{[m[5;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FOPEN_FAILED[93m.$[m[1m[96mfile[m[38;5;224m)[m;[6;17H[38;5;224m}[m[8;17H[93mif[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile [93m===[m [38;5;121mnull[m[38;5;224m)[m [38;5;224m{[m[9;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FILE_DOESNOT_EXIST[93m.$[m[1m[96mthis[m[38;5;121m->[m_tmpFile[38;5;224m)[m;[10;17H[38;5;224m}[m[12;17H[96m// Open the compresses file[m[13;17H[93mif[m[38;5;224m([m[93m!$[m[1m[96mzp[m [93m=[m @[1m[96mgzopen[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile, [95m'r'[m[38;5;224m)){[m[14;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m GZOPEN_FAILED[93m.$[m[1m[96mthis[m[38;5;121m->[m_tmpFile[38;5;224m)[m;[15;17H[38;5;224m}[m[17;17H[96m// read the compress temporary file and write it in an uncompressed one[m[18;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mfwrite[m[38;5;224m([m[93m$[m[1m[96mhandle2[m, [1m[96mgzread[m[38;5;224m([m[93m$[m[1m[96mzp[m, [95m9999999[m[38;5;224m)))[m [38;5;224m{[m[19;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FWRITE_FAILED[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m])[m;[20;17H[38;5;224m}[m[22;17H@[1m[96mfclose[m[38;5;224m([m[93m$[m[1m[96mhandle2[m[38;5;224m)[m;[23;17H@[1m[96mgzclose[m[38;5;224m([m[93m$[m[1m[96mzp[m[38;5;224m)[m;[25;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m UNCOMPRESS_OK[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[26;9H[38;5;224m}[m[28;9H[96m//=========================================================================================================================[30;9H/**
* Get ICI Relais files content, truncate table and insert new datas
*
* [m[38;5;81m@return [m[96marray
* - 'result' boolean
* - 'msg' varchar
*/[m[39;9H[38;5;81mfunction[m get_content_and_save [38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[41;17H[93m$[m[1m[96mlocal_file[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[93m.[mDIRECTORY_SEPARATOR[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m][m;[43;17H[96m// check if it is a file[m[44;17H[93mif[m[38;5;224m([m[93m![m[1m[96mis_file[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m))[m [38;5;224m{[m[45;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m NOT_A_FILE[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[46;17H[38;5;224m}[m[48;17H[96m// check if the file is empty[m[49;17H[93mif[m[38;5;224m([m[1m[96mfilesize[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m)[m [93m==[m [95m0[m[38;5;224m)[m [38;5;224m{[m[50;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FILE_EMPTY[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[51;178H189,3-17 55%[25;17H[?12l[?25h[?25l[51;168Hk[25;17H[51;168H [24;16H[51;180H8,2-16[24;16H[?12l[?25h[?25l[51;168Hk[24;16H[51;168H [23;17H[51;180H7,3-17[23;17H[?12l[?25h[?25l[51;168Hk[23;17H[51;168H [22;17H[51;180H6[22;17H[?12l[?25h[?25l[51;168Hk[22;17H[51;168H [21;16H[51;180H5,2-16[21;16H[?12l[?25h[?25l[51;168Hk[21;16H[51;168H [20;17H[18;62H[38;5;224m[46m{[20;17H}[m[51;180H4,3-17[20;17H[?12l[?25h[?25l[51;168Hk[20;17H[51;168H [19;24H[18;62H[38;5;224m{[20;17H}[m[51;180H3,3-24[19;24H[?12l[?25h[?25l[51;168Hk[19;24H[51;168H [18;17H[51;180H2,3-17[18;17H[?12l[?25h[?25l[51;168Hk[18;17H[51;168H [17;17H[51;180H1[17;17H[?12l[?25h[?25l[51;168Hk[17;17H[51;168H [16;1H[51;180H0,0-1 [16;1H[?12l[?25h[?25l[51;168Hk[16;1H[51;168H [15;17H[13;57H[38;5;224m[46m{[15;17H}[m[51;179H79,3-17[15;17H[?12l[?25h[?25l[51;168Hk[15;17H[51;168H [14;24H[13;57H[38;5;224m{[15;17H}[m[51;180H8,3-24[14;24H[?12l[?25h[?25l[51;168Hk[14;24H[51;168H [13;17H[51;180H7,3-17[13;17H[?12l[?25h[?25l[51;168Hk[13;17H[51;168H [12;17H[51;180H6[12;17H[?12l[?25h[?25l[51;168Hk[12;17H[51;168H [11;16H[51;180H5,2-16[11;16H[?12l[?25h[?25l[51;168Hk[11;16H[51;168H [10;17H[8;46H[38;5;224m[46m{[10;17H}[m[51;180H4,3-17[10;17H[?12l[?25h[?25l[51;168Hk[10;17H[51;168H [9;24H[8;46H[38;5;224m{[10;17H}[m[51;180H3,3-24[9;24H[?12l[?25h[?25l[51;168Hk[9;24H[51;168H [8;17H[51;180H2,3-17[8;17H[?12l[?25h[?25l[51;168Hk[8;17H[51;168H [7;16H[51;180H1,2-16[7;16H[?12l[?25h[?25l[51;168Hk[7;16H[51;168H [6;17H[4;55H[38;5;224m[46m{[6;17H}[m[51;180H0,3-17[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;24H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[5;55H{[7;17H}[m[51;178H[K[51;178H169,3-24 55%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;25H@[1m[96mchmod[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir, [95m0777[m[38;5;224m)[m;[51;178H[K[51;178H168,3-17 54%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m [93melse[m [38;5;224m{[m[51;178H[K[51;178H167,3-17 54%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;25H@[1m[96mmkdir[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir, [95m0777[m, [95mtrue[m[38;5;224m)[m;[51;178H[K[51;178H166,3-17 54%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[93mif[m[38;5;224m([m[93m![m[1m[96mis_dir[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[38;5;224m))[m [38;5;224m{[m[51;178H[K[51;178H165,2-16 53%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[96m// If the download directory doesn't exist, create it[m[4;24H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H164,3-17 53%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;24H[1;50r[1;1H[L[1;51r[5;24H[38;5;224m{[7;17H}[m[51;178H[K[51;178H163,3-24 53%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;9H[38;5;81mfunction[m uncompress[38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[4;51H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H162,3-17 52%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;24H[1;50r[1;1H[L[1;51r[5;51H[38;5;224m{[7;17H}[m[51;178H[K[51;178H161,3-24 52%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;1H[96m */[m[51;178H[K[51;178H160,3-17 52%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;1H[96m * - 'msg' varchar[m[51;178H[K[51;178H159,3-17 51%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;1H[96m * - 'result' boolean[m[51;178H[K[51;178H158,2-16 51%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;1H[96m * [m[38;5;81m@return [m[96marray[m[51;178H[K[51;178H157,10-17 51%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;8H[1;50r[1;1H[L[1;51r[1;1H[96m *[m[51;178H[K[51;178H156,1-8[7C50%[6;8H[?12l[?25h[?25l[51;168Hk[6;8H[51;168H [6;12H[1;50r[1;1H[L[1;51r[1;1H[96m * Uncompress ICI Relais files in temporary files[m[51;178H[K[51;178H155,5-12 50%[6;12H[?12l[?25h[?25l[51;168Hk[6;12H[51;168H [6;24H[1;50r[1;1H[L[1;51r[1;9H[96m/**[m[51;178H[K[51;178H154,6-24 50%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;24H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H153,6-24 49%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;9H[96m//=========================================================================================================================[m[51;178H[K[51;178H152,10-17 49%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;11H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H151,4-11 49%[6;11H[?12l[?25h[?25l[51;168Hk[6;11H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;9H[38;5;224m}[m[51;178H[K[51;178H150,10-17 48%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;11H[1;50r[1;1H[L[1;51r[1;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m DOWNLOAD_OK[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[51;178H[K[51;178H149,4-11 48%[6;11H[?12l[?25h[?25l[51;168Hk[6;11H[51;168H [6;8H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H148,1-8[7C48%[6;8H[?12l[?25h[?25l[51;168Hk[6;8H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H@[1m[96mftp_close[m[38;5;224m([m[93m$[m[1m[96mconn[m[38;5;224m)[m;[51;178H[K[51;178H147,10-17 47%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;8H[1;50r[1;1H[L[1;51r[1;17H@[1m[96mfclose[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m;[51;178H[K[51;178H146,1-8[7C47%[6;8H[?12l[?25h[?25l[51;168Hk[6;8H[51;168H [6;9H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H145,2-9[7C47%[6;9H[?12l[?25h[?25l[51;168Hk[6;9H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m[51;178H[K[51;178H144,3-17 46%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_GET_FAILED[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[51;178H[K[51;178H143,2-16 46%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mftp_fget[m[38;5;224m([m[93m$[m[1m[96mconn[m, [93m$[m[1m[96mhandle[m, [93m$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m][m, FTP_BINARY, [95m0[m[38;5;224m))[m [38;5;224m{[m[51;178H[K[51;178H142,3-17 46%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[96m// Get the compressed file in the temporary file[m[51;178H[K[51;178H141,3-17 45%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;16H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H140,2-16 45%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m[4;86H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H139,3-17 45%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;24H[1;50r[1;1H[L[1;51r[1;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FOPEN_FAILED[93m.$[m[1m[96mthis[m[38;5;121m->[m_tmpFile[38;5;224m)[m;[5;86H[38;5;224m{[7;17H}[m[51;178H[K[51;178H138,3-24 44%[6;24H[?12l[?25h[?25l[51;168Hk[6;24H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[93mif[m[38;5;224m([m[93m![m[38;5;224m([m[93m$[m[1m[96mhandle[m [93m=[m @[1m[96mfopen[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile, [95m'w+'[m[38;5;224m)))[m [38;5;224m{[m[51;178H[K[51;178H137,3-17 44%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile [93m=[m [1m[96mtempnam[m[38;5;224m([m[95m'/tmp'[m, [95m'ICIRELAIS'[m[38;5;224m)[m;[51;178H[K[51;178H136,3-17 44%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[96m// Create a temporary file for the compressed file[m[51;178H[K[51;178H135,2-16 43%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[4;64H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H134,3-17 43%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;24H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[5;64H{[7;17H}[m[51;178H[K[51;178H133,3-24 43%[6;24H[?12l[?25h[?25l[51;168H:[6;24H[51;168H[K[51;1H:[?12l[?25hq[?25l[?12l[?25h
[?25l[?1002l[51;1H[K[51;1H[?1l>[?12l[?25h[?1049l]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ vi ^C
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find . (-name [K[K[K[K[K[K[K-name '*.hp'[K[K[Kphp' -exec grep 'INTO icirelais (file_id, relay_id' {} \; -print
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find . -name '*.php' -exec grep 'INTO icirelais (file_id, relay_id' {} \; -print[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find . -name '*.php' -exec grep '(file_id, relay_id' {} \; -print[15@INTO icirelais [C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P[1P
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find . -name '*.php' -exec grep 'INTO icirelais' {} \; -print[1P[1P[1P[1P[1P
// -> 0000003: icirelais/exapaq
require_once(DIR_WS_FUNCTIONS . 'icirelais_function.php');
./old/www/includes/application_top.php
// -> 0000003: icirelais/exapaq
// -> 0000003: icirelais/exapaq
if($tab_shipping[0] == 'icirelais') {
$check_address_query = tep_db_query("select count(*) as total from icirelais where relay_id = '" . $tab_shipping[1] . "' ");
//$sendto = $HTTP_POST_VARS['shipping']; if we rewrite sentdo, icirelais_get_point will find the wrong address
// -> 0000003: icirelais/exapaq
if($tab_shipping[0] == 'icirelais') {
$icirelais_id = null;
$icirelais_id = $key;
'title' => (($free_shipping == true) ? $quote[0]['methods'][$icirelais_id]['title'] : (isset($quote[0]['methods'][$icirelais_id]['text']) ? $quote[0]['methods'][$icirelais_id]['text'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][$icirelais_id]['title'] . ')')),
0000003: icirelais/exapaq ?>
- 1/ on conserve ce code déclarant Prototype, (styles CSS, script JS et plugin Window JS), mais on le commente, on ne commente pas icirelais.css ou icirelais.js ni maps.google.com
- ce faux-bouton-texte est censé afficher une MODALE via la fonction openDialog() déclarée dans: /includes/icirelais.js
-1- /exapaq/catalog/includes/classes/icirelais_get_point_PHP5.php
-2- /includes/classes/icirelais_get_point_PHP5.php
-3- /exapaq/catalog/includes/classes/icirelais_get_point.php
-4- /includes/classes/icirelais_get_point.php
donc commenter ce code me paraît plus qu'important, à l'exception du /includes/icirelais.js
- intercepter et réécrire (tout en masquant) l'ancien système d'affichage de détail du point-relais icirelais
- 24/ on a besoin de traiter différemment l'affichage des moyens d'expéditions, certains comme icirelais ou devisChronopost sont alors traités différemment, voir les étapes respectives pour tout ça
0000003: icirelais/exapaq ?>
// -> 0000003: icirelais/exapaq
if($quotes[$i]['id'] == 'icirelais') {
0000003: icirelais/exapaq ?>
// -> 0000003: icirelais/exapaq
if($quotes[$i]['id'] == 'icirelais') {
case 'icirelais':
./www/checkout_shipping.php
if($tab_shipping[0] == 'icirelais') {
$check_address_query = tep_db_query("select count(*) as total from icirelais where relay_id = '" . $tab_shipping[1] . "' ");
//$sendto = $HTTP_POST_VARS['shipping']; if we rewrite sentdo, icirelais_get_point will find the wrong address
if($tab_shipping[0] == 'icirelais') {
$icirelais_id = null;
$icirelais_id = $key;
'title' => (($free_shipping == true) ? $quote[0]['methods'][$icirelais_id]['title'] : (isset($quote[0]['methods'][$icirelais_id]['text']) ? $quote[0]['methods'][$icirelais_id]['text'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][$icirelais_id]['title'] . ')')),
if($quotes[$i]['id'] == 'icirelais') {
if($quotes[$i]['id'] == 'icirelais') {
./www/exapaq/catalog/checkout_shipping.php
'
' . (empty($statuses['comments']) ? ' ' : /*icirelais_function optionnal */ display_htmllink_if_web_address(nl2br(tep_output_string_protected($statuses['comments'])))) . ' ' . "\n" .
./www/exapaq/catalog/account_history_info.php
class icirelais {
function icirelais() {
$this->code = 'icirelais';
require_once(DIR_WS_CLASSES.'icirelais_get_point.php');
$icirelais_get_point = new icirelais_get_point(array(
$this->quotes = $icirelais_get_point->get_point();
if (file_exists(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/icirelais.php')) {
require_once(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/icirelais.php');
require_once(DIR_FS_CATALOG_LANGUAGES . '/english/modules/shipping/icirelais.php');
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('', 'MODULE_SHIPPING_ICIRELAIS_SYNC', ' ', '', '6', '14', 'disappear(', now())");
./www/exapaq/catalog/includes/modules/shipping/icirelais.php
require_once(DIR_WS_FUNCTIONS . 'icirelais_function.php');
./www/exapaq/catalog/includes/application_top.php
from icirelais
./www/exapaq/catalog/includes/functions/icirelais_function.php
* @package icirelais_shipping_mode
class icirelais_get_point {
function icirelais_get_point($input){
require_once('includes/languages/'.$input['language'].'/modules/shipping/icirelais.php');
FROM icirelais
./www/exapaq/catalog/includes/classes/icirelais_get_point_PHP5.php
if($tab[0] == 'icirelais') {
from icirelais ab
./www/exapaq/catalog/includes/classes/order.php
* @package icirelais_shipping_mode
class icirelais_get_point {
function icirelais_get_point($input){
require_once('includes/languages/'.$input['language'].'/modules/shipping/icirelais.php');
FROM icirelais
./www/exapaq/catalog/includes/classes/icirelais_get_point.php
require_once(DIR_WS_FUNCTIONS . 'icirelais_function.php');
./www/exapaq/catalog/admin/includes/application_top.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
class icirelais_file_synchronize {
'table_name' => 'icirelais'
include_once('includes/languages/'.$input['language'].'/icirelais_file_synchronize.php');
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
protected function _icirelais_fields () {
./www/exapaq/catalog/admin/includes/classes/icirelais_file_synchronize_V1.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
class icirelais_file_synchronize {
'table_name' => 'icirelais'
function icirelais_file_synchronize($input){
include_once('includes/languages/'.$input['language'].'/icirelais_file_synchronize.php');
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
function _icirelais_fields () {
./www/exapaq/catalog/admin/includes/classes/icirelais_file_synchronize_V2.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
require_once(DIR_WS_CLASSES . 'icirelais_file_synchronize_V2.php');
$icirelais_file_synchronize = new icirelais_file_synchronize(array(
$res_icirelais_file_synchronize = $icirelais_file_synchronize->file_synchronize_action();
if(!alert("'.$res_icirelais_file_synchronize['msg'].'")) {
document.location.href="modules.php?set=shipping&module=icirelais";
document.location.href="modules.php?set=shipping&module=icirelais";
./www/exapaq/catalog/admin/call_icirelais_file_synchronize.php
' ' . /*icirelais_function optionnal */ display_htmllink_if_web_address(nl2br(tep_db_output($orders_history['comments']))) . ' ' . "\n" .
./www/exapaq/catalog/admin/orders.php
if($tab[0] == 'icirelais') {
./www/exapaq/catalog/checkout_process.php
// -> 0000003: icirelais/exapaq
. (empty($statuses['comments']) ? ' ' : /*icirelais_function optionnal */ display_htmllink_if_web_address(nl2br(tep_output_string_protected($statuses['comments'])))) .
./www/account_history_info.php
class icirelais {
function icirelais() {
$this->code = 'icirelais';
$this->icon = DIR_WS_DESIGN . 'logo/logo_icirelais_50x50.png';
if ( file_exists(DIR_WS_CLASSES.'icirelais_get_point.php') )
require_once(DIR_WS_CLASSES.'icirelais_get_point.php');
$icirelais_get_point = new icirelais_get_point(array(
$this->quotes = $icirelais_get_point->get_point();
if (file_exists(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/icirelais.php')) {
require_once(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/icirelais.php');
require_once(DIR_FS_CATALOG_LANGUAGES . '/english/modules/shipping/icirelais.php');
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('', 'MODULE_SHIPPING_ICIRELAIS_SYNC', ' ', '', '6', '14', 'disappear(', now())");
./www/includes/modules/shipping/icirelais.php
// -> 0000003: icirelais/exapaq
./www/includes/languages/french/checkout_shipping.php
// -> 0000003: icirelais/exapaq
./www/includes/languages/english/checkout_shipping.php
// -> 0000003: icirelais/exapaq
require_once(DIR_WS_FUNCTIONS . 'icirelais_function.php');
./www/includes/application_top.php
from icirelais
./www/includes/functions/icirelais_function.php
* @package icirelais_shipping_mode
class icirelais_get_point {
function icirelais_get_point($input){
require_once('includes/languages/'.$input['language'].'/modules/shipping/icirelais.php');
FROM icirelais
./www/includes/classes/icirelais_get_point_PHP5.php
// -> 0000003: icirelais/exapaq
if($tab[0] == 'icirelais') {
from icirelais ab
./www/includes/classes/order.php
* @package icirelais_shipping_mode
class icirelais_get_point {
function icirelais_get_point($input){
require_once('includes/languages/'.$input['language'].'/modules/shipping/icirelais.php');
FROM icirelais
./www/includes/classes/icirelais_get_point.php
if ( strstr($row_orders['shipping_module'], "icirelais_" ) != "" ) {
$point_relais = str_replace("icirelais_", "", $row_orders['shipping_module']);
./www/admin/exportexapaq.php
// -> 0000003: icirelais/exapaq
./www/admin/includes/languages/french/orders_backup.php
// -> 0000003: icirelais/exapaq
./www/admin/includes/languages/french/edit_orders.php
// -> 0000003: icirelais/exapaq
./www/admin/includes/languages/french/orders.php
// -> 0000003: icirelais/exapaq
./www/admin/includes/languages/english/edit_orders.php
// -> 0000003: icirelais/exapaq
./www/admin/includes/languages/english/orders.php
// -> 0000003: icirelais/exapaq
require_once(DIR_WS_FUNCTIONS . 'icirelais_function.php');
./www/admin/includes/application_top.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
class icirelais_file_synchronize {
'table_name' => 'icirelais'
include_once('includes/languages/'.$input['language'].'/icirelais_file_synchronize.php');
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
protected function _icirelais_fields () {
./www/admin/includes/classes/icirelais_file_synchronize_V1.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
class icirelais_file_synchronize {
'table_name' => 'icirelais'
function icirelais_file_synchronize($input){
include_once('includes/languages/'.$input['language'].'/icirelais_file_synchronize.php');
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
function _icirelais_fields () {
./www/admin/includes/classes/icirelais_file_synchronize_V2.php
* Calling to icirelais_file_synchronize's class in order to
* - truncate tables icirelais (relais point and backup)
* - insert new icirelais datas
require_once(DIR_WS_CLASSES . 'icirelais_file_synchronize_V2.php');
$icirelais_file_synchronize = new icirelais_file_synchronize(array(
$res_icirelais_file_synchronize = $icirelais_file_synchronize->file_synchronize_action();
if(!alert("'.$res_icirelais_file_synchronize['msg'].'")) {
document.location.href="modules.php?set=shipping&module=icirelais";
document.location.href="modules.php?set=shipping&module=icirelais";
./www/admin/call_icirelais_file_synchronize.php
0000003: icirelais/exapaq ?>
./www/admin/commissions.php
0000003: icirelais/exapaq ?>
// -> 0000003: icirelais/exapaq
0000003: icirelais/exapaq ?>
./www/admin/edit_orders.php
// -> 0000003: icirelais/exapaq
./www/admin/modules.php
0000003: icirelais/exapaq ?>
// -> 0000003: icirelais/exapaq
' ' . /*icirelais_function optionnal */ display_htmllink_if_web_address(nl2br(tep_db_output($orders_history['comments']))) . ' ' . "\n" .
0000003: icirelais/exapaq ?>
./www/admin/orders.php
// -> 0000003: icirelais/exapaq
if($tab[0] == 'icirelais') {
./www/checkout_process.php
// -> 0000003: icirelais/exapaq
if($tab[0] == 'icirelais') {
./www/ext/modules/payment/Etransactions/Etransactions.php
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ vi ./www/admin/includes/classes/icirelais_file_synchronize_V2.php
[?1000h[?1049h[?1h=[2;1H▽[6n[2;1H [1;1H]11;?[1;51r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[51;1H"./www/admin/includes/classes/icirelais_file_synchronize_V2.php" 345L, 10521C[>c[27m[23m[m[H[2J[2;9H[38;5;81mfunction[m download[38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[4;17H[96m// FTP Connection [m[5;17H[93m$[m[1m[96mconn[m [93m=[m @[1m[96mftp_connect[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m][m, [95m0[m, [95m5[m[38;5;224m)[m;[6;17H[93mif[m[38;5;224m([m[93m!$[m[1m[96mconn[m[38;5;224m)[m [38;5;224m{[m[7;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_CONNECT_FAILED[38;5;224m)[m;[8;17H[38;5;224m}[m[9;17H[96m// FTP login[m[10;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mftp_login[m[38;5;224m([m[93m$[m[1m[96mconn[m, [38;5;224m([m[38;5;121mstring[m[38;5;224m)[m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_USER'[m[38;5;224m][m, [38;5;224m([m[38;5;121mstring[m[38;5;224m)[m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_PASSWORD'[m[38;5;224m]))[m [38;5;224m{[m[11;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_AUTHENTIFICATION_FAILED[38;5;224m)[m;[12;17H[38;5;224m}[m[14;17H[96m// FTP Passive mode active (in case of firewall)[m[15;17H@[1m[96mftp_pasv[m[38;5;224m([m[93m$[m[1m[96mconn[m, [95mtrue[m[38;5;224m)[m;[17;17H[96m// FTP change directory[m[18;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mftp_chdir[m[38;5;224m([m[93m$[m[1m[96mconn[m, [38;5;224m([m[38;5;121mstring[m[38;5;224m)[m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_DIRECTORY'[m[38;5;224m])){[m[19;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_CHDIR_FAILED[38;5;224m)[m;[20;17H[38;5;224m}[m[22;17H[96m// Create a temporary file for the compressed file[m[23;17H[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile [93m=[m [1m[96mtempnam[m[38;5;224m([m[95m'/tmp'[m, [95m'ICIRELAIS'[m[38;5;224m)[m;[24;17H[93mif[m[38;5;224m([m[93m![m[38;5;224m([m[93m$[m[1m[96mhandle[m [93m=[m @[1m[96mfopen[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_tmpFile, [95m'w+'[m[38;5;224m)))[m [38;5;224m{[m[25;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FOPEN_FAILED[93m.$[m[1m[96mthis[m[38;5;121m->[m_tmpFile[38;5;224m)[m;[26;17H[38;5;224m}[m[28;17H[96m// Get the compressed file in the temporary file[m[29;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mftp_fget[m[38;5;224m([m[93m$[m[1m[96mconn[m, [93m$[m[1m[96mhandle[m, [93m$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m][m, FTP_BINARY, [95m0[m[38;5;224m))[m [38;5;224m{[m[30;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_GET_FAILED[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[31;17H[38;5;224m}[m[33;17H@[1m[96mfclose[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m;[34;17H@[1m[96mftp_close[m[38;5;224m([m[93m$[m[1m[96mconn[m[38;5;224m)[m;[36;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m DOWNLOAD_OK[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[37;9H[38;5;224m}[m[39;9H[96m//=========================================================================================================================[41;9H/**
* Uncompress ICI Relais files in temporary files
*
* [m[38;5;81m@return [m[96marray
* - 'result' boolean
* - 'msg' varchar
*/[m[49;9H[38;5;81mfunction[m uncompress[38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[51;178H133,3-24 36%
"./www/admin/includes/classes/icirelais_file_synchronize_V2.php" 345L, 10521C[100C [25;24H[?1000l[?1002h[?12l[?25h[?25l[51;168H/[25;24H[51;1H[K[51;1H/[?12l[?25hI[?25l[25;74H[7mI[m[51;178H133,53-74 36%[51;178H[K[51;3H[?12l[?25hN[?25l[25;74HI[29;75H[7mIN[m[51;178H137,61-75 36%[51;178H[K[51;4H[?12l[?25hS[?25l[27m[23m[m[H[2J[2;9H[38;5;81mfunction[m get_content_and_save [38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[4;17H[93m$[m[1m[96mlocal_file[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[93m.[mDIRECTORY_SEPARATOR[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m][m;[6;17H[96m// check if it is a file[m[7;17H[93mif[m[38;5;224m([m[93m![m[1m[96mis_file[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m))[m [38;5;224m{[m[8;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m NOT_A_FILE[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[9;17H[38;5;224m}[m[11;17H[96m// check if the file is empty[m[12;17H[93mif[m[38;5;224m([m[1m[96mfilesize[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m)[m [93m==[m [95m0[m[38;5;224m)[m [38;5;224m{[m[13;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FILE_EMPTY[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[14;17H[38;5;224m}[m[16;17H[96m// truncate table[m[17;17H[93m$[m[1m[96mquery[m [93m=[m [95m"TRUNCATE "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m;[18;17H[93m$[m[1m[96mtruncate_table[m [93m=[m tep_db_query[38;5;224m([m[93m$[m[1m[96mquery[m[38;5;224m)[m;[20;17H[96m// get table fields[m[21;17H[93m$[m[1m[96mfunction[m [93m=[m [95m"_"[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m"_fields"[m;[22;17H[93m$[m[1m[96mfields[m [93m=[m [93m$[m[1m[96mthis[m[93m->$[m[1m[96mfunction[m[38;5;224m()[m;[24;17H[96m// Query construction 1/2 (field part)[m[25;17H[93m$[m[1m[96minsert[m [93m=[m [95m"[m[7m[95mINS[m[95mERT INTO "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m" ("[m;[26;17H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mfields[m [93mas[m [93m$[m[1m[96mfiled_name[m[38;5;224m)[m [38;5;224m{[m[27;25H[93m$[m[1m[96minsert[m [93m.=[m [93m$[m[1m[96mfiled_name[m[93m.[m[95m", "[m;[28;17H[38;5;224m}[m[29;17H[93m$[m[1m[96minsert[m [93m=[m [1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96minsert[m,[95m0[m,[1m[96mstrlen[m[38;5;224m([m[93m$[m[1m[96minsert[m[38;5;224m)[m[95m-2[m[38;5;224m)[m[93m.[m[95m") VALUES "[m;[31;17H[96m// Read file, get content into a variable and send frequently to the database[m[32;17H[93m$[m[1m[96mhas_begin[m [93m=[m [95m0[m;[33;17H[93m$[m[1m[96mhas_end[m [93m=[m [95m0[m;[34;17H[93m$[m[1m[96mi[m [93m=[m [95m0[m;[35;17H[93m$[m[1m[96mvalues[m [93m=[m [95m""[m;[37;17H[93m$[m[1m[96mhandle[m [93m=[m @[1m[96mfopen[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m, [95m"r"[m[38;5;224m)[m;[38;17H[93mif[m [38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m [38;5;224m{[m[39;25H[93mwhile[m [38;5;224m([m[93m![m[1m[96mfeof[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m))[m [38;5;224m{[m[40;33H[96m// Save to database frequently[m[41;33H[93mif[m[38;5;224m([m[93m$[m[1m[96mi[m [93m==[m [95m1000[m[38;5;224m){[m[42;41H[93m$[m[1m[96mvalues[m [93m=[m [1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96mvalues[m,[95m0[m,[1m[96mstrlen[m[38;5;224m([m[93m$[m[1m[96mvalues[m[38;5;224m)[m[95m-1[m[38;5;224m)[m;[43;41H[93m$[m[1m[96minsert_to_database[m [93m=[m tep_db_query[38;5;224m([m[93m$[m[1m[96minsert[m[93m.$[m[1m[96mvalues[m[38;5;224m)[m;[44;41H[93m$[m[1m[96mvalues[m [93m=[m [95m""[m;[45;41H[93m$[m[1m[96mi[m [93m=[m [95m0[m;[46;33H[38;5;224m}[m[48;33H[96m// Get the current line[m[49;33H[93m$[m[1m[96mline[m [93m=[m [1m[96mfgets[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m;[50;33H[93mif[m[38;5;224m([m[1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96mline[m,[95m0[m,[95m1[m[38;5;224m)[m [93m==[m [95m"D"[m[38;5;224m){[m[51;178H226,14-28 68%
/INS[51;178H[K[51;5H[?12l[?25hE[?25l[25;31H[7m[95mE[m[51;178H226,14-28 68%[51;178H[K[51;6H[?12l[?25hR[?25l[25;32H[7m[95mR[m[51;178H226,14-28 68%[51;178H[K[51;7H[?12l[?25hT[?25l[25;33H[7m[95mT[m[51;178H226,14-28 68%[51;178H[K[51;8H[?12l[?25h
[?25l[25;28H[95mINSERT[m[51;178H226,14-28 68%[25;28H[?12l[?25h[?25l[51;168Hj[25;28H[51;168H [26;28H[51;180H7[26;28H[?12l[?25h[?25l[51;168Hj[26;28H[51;168H [27;28H[51;180H8,7-28 [27;28H[?12l[?25h[?25l[51;168Hj[27;28H[51;168H [28;17H[26;49H[38;5;224m[46m{[28;17H}[m[51;180H9,3-17[28;17H[?12l[?25h[?25l[51;168Hj[28;17H[51;168H [29;28H[26;49H[38;5;224m{[28;17H}[m[51;179H30,14-28[29;28H[?12l[?25h[?25l[51;168Hj[29;28H[51;168H [30;16H[51;180H1,2-16 [30;16H[?12l[?25h[?25l[51;168Hj[30;16H[51;168H [31;28H[51;180H2,14-28[31;28H[?12l[?25h[?25l[51;168Hj[31;28H[51;168H [32;28H[51;180H3[32;28H[?12l[?25h[?25l[51;168Hj[32;28H[51;168H [33;28H[51;180H4[33;28H[?12l[?25h[?25l[51;168Hj[33;28H[51;168H [34;23H[51;180H5,9-23 [34;23H[?12l[?25h[?25l[51;168Hj[34;23H[51;168H [35;28H[51;180H6,14-28[35;28H[?12l[?25h[?25l[51;168Hj[35;28H[51;168H [36;16H[51;180H7,2-16 [36;16H[?12l[?25h[?25l[51;168Hj[36;16H[51;168H [37;28H[51;180H8,14-28[37;28H[?12l[?25h[?25l[51;168Hj[37;28H[51;168H [38;28H[38;20H[38;5;224m[46m([7C)[m[51;180H9[38;28H[?12l[?25h[?25l[51;168Hj[38;28H[51;168H [39;28H[38;20H[38;5;224m([7C)[m[51;179H40,7-28 [39;28H[?12l[?25h[?25l[51;168Hj[39;28H[51;168H [40;32H[51;180H1,4-32[40;32H[?12l[?25h[?25l[51;168Hj[40;32H[51;168H [41;32H[51;180H2[41;32H[?12l[?25h[?25l[51;168Hj[41;32H[51;168H [42;32H[51;180H3[42;32H[?12l[?25h[?25l[51;168Hj[42;32H[51;168H [43;32H[51;180H4[43;32H[?12l[?25h[?25l[51;168Hj[43;32H[51;168H [44;32H[51;180H5[44;32H[?12l[?25h[?25l[51;168Hj[44;32H[51;168H [45;32H[51;180H6[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[96m// The file has a good begenning[m[51;1H[K[51;178H247,4-32 68%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[93m$[m[1m[96mhas_begin[m [93m=[m [95m1[m;[51;178H[K[51;178H248,4-32 68%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;33H[38;5;224m}[m [93melseif[m[38;5;224m([m[1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96mline[m,[95m0[m,[95m1[m[38;5;224m)[m [93m==[m [95m"F"[m[38;5;224m){[m[51;178H[K[51;178H249,4-32 69%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[96m// The file has a good end[m[51;178H[K[51;178H250,4-32 69%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[93m$[m[1m[96mhas_end[m [93m=[m [95m1[m;[51;178H[K[51;178H251,4-32 69%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;33H[38;5;224m}[m [93melse[m [38;5;224m{[m[51;178H[K[51;178H252,4-32 70%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[93m$[m[1m[96mdata[m [93m=[m [1m[96mexplode[m[38;5;224m([m[95m";"[m,[93m$[m[1m[96mline[m[38;5;224m)[m;[51;178H[K[51;178H253,4-32 70%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[96m// We have to check $data[0] because empty line can't be treated[m[51;178H[K[51;178H254,4-32 70%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[93mif[m[38;5;224m([m[1m[96mis_array[m[38;5;224m([m[93m$[m[1m[96mdata[m[38;5;224m)[m [93m&&[m [93m!empty[m[38;5;224m([m[93m$[m[1m[96mdata[m[38;5;224m[[m[95m0[m[38;5;224m])){[m[51;178H[K[51;178H255,4-32 71%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;49H[93m$[m[1m[96mvalues[m [93m.=[m [95m"("[m;[51;178H[K[51;178H256,4-32 71%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;49H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mdata[m [93mas[m [93m$[m[1m[96mvalue[m[38;5;224m)[m [38;5;224m{[m[51;178H[K[51;178H257,4-32 71%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;57H[93m$[m[1m[96mvalues[m [93m.=[m [95m"'"[m[93m.$[m[1m[96mthis[m[38;5;121m->[m_valueFilter[38;5;224m([m[93m$[m[1m[96mvalue[m[38;5;224m)[m[93m.[m[95m"',"[m;[51;178H[K[51;178H258,4-32 72%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;49H[38;5;224m}[m[51;178H[K[51;178H259,4-32 72%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;49H[93m$[m[1m[96mvalues[m [93m=[m [1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96mvalues[m,[95m0[m,[1m[96mstrlen[m[38;5;224m([m[93m$[m[1m[96mvalues[m[38;5;224m)[m[95m-1[m[38;5;224m)[m[93m.[m[95m"),"[m;[51;178H[K[51;178H260,4-32 72%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;49H[93m$[m[1m[96mi[m[93m++[m;[51;178H[K[51;178H261,4-32 73%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;41H[38;5;224m}[m[51;178H[K[51;178H262,4-32 73%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;33H[38;5;224m}[m[51;178H[K[51;178H263,4-32 73%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[51;178H[K[51;178H264,4-32 74%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;25H[38;5;224m}[m[51;178H[K[51;178H265,4-32 74%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;25H[1m[96mfclose[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m;[51;178H[K[51;178H266,4-32 74%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;25H[93m$[m[1m[96mvalues[m [93m=[m [1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96mvalues[m,[95m0[m,[1m[96mstrlen[m[38;5;224m([m[93m$[m[1m[96mvalues[m[38;5;224m)[m[95m-1[m[38;5;224m)[m;[51;178H[K[51;178H267,4-32 75%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;25H[93m$[m[1m[96minsert_to_database[m [93m=[m tep_db_query[38;5;224m([m[93m$[m[1m[96minsert[m[93m.$[m[1m[96mvalues[m[38;5;224m)[m;[51;178H[K[51;178H268,4-32 75%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;32H[1;50r[50;1H
[1;51r[50;17H[38;5;224m}[m[51;178H[K[51;178H269,4-32 75%[45;32H[?12l[?25h[?25l[51;168Hj[45;32H[51;168H [45;25H[1;50r[50;1H
[1;51r[15;48H[38;5;224m[46m{[45;25H}[m[51;178H[K[51;178H270,4-25 76%[45;25H[?12l[?25h[?25l[51;168Hj[45;25H[51;168H [45;28H[1;50r[50;1H
[1;51r[14;48H[38;5;224m{[44;25H}[m[50;17H[93mif[m[38;5;224m([m[93m$[m[1m[96mhas_begin[m [93m==[m [95m1[m [93m&&[m [93m$[m[1m[96mhas_end[m [93m==[m [95m1[m[38;5;224m){[m[51;178H[K[51;178H271,7-28 76%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;28H[1;50r[50;1H
[1;51r[50;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m GET_CONTENT_OK[93m.$[m[1m[96mlocal_file[m[93m.[m[95m' s[m[38;5;224m\'[m[95mest bien dé[50;108Hroulé[50;113He'[m[38;5;224m)[m;[51;178H[K[51;178H272,7-28 76%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;28H[1;50r[50;1H
[1;51r[50;17H[38;5;224m}[m [93melse[m [38;5;224m{[m[51;178H[K[51;178H273,7-28 77%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;17H[1;50r[50;1H
[1;51r[10;30H[38;5;224m[46m{[45;17H}[m[50;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m GET_CONTENT_NEARLY_OK[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[51;178H[K[51;178H274,3-17 77%[45;17H[?12l[?25h[?25l[51;168Hj[45;17H[51;168H [45;1H[1;50r[50;1H
[1;51r[9;30H[38;5;224m{[44;17H}[50;17H}[m[51;178H[K[51;178H275,0-1[7C77%[45;1H[?12l[?25h[?25l[51;168Hj[45;1H[51;168H [45;28H[1;50r[50;1H
[1;51r[51;178H[K[51;178H276,14-28 78%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;28H[1;50r[50;1H
[1;51r[50;9H[38;5;224m}[m[51;178H[K[51;178H277,7-28 78%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;24H[1;50r[50;1H
[1;51r[45;24H[38;5;224m[46m{[47;17H}[m[51;178H[K[51;178H278,10-24 78%[45;24H[?12l[?25h[?25l[51;168Hj[45;24H[51;168H [45;28H[1;50r[50;1H
[1;51r[44;24H[38;5;224m{[46;17H}[m[50;9H[96m//=========================================================================================================================[m[51;178H[K[51;178H279,7-28 79%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;17H[1;50r[50;1H
[1;51r[43;24H[38;5;224m[46m{[45;17H}[m[51;178H[K[51;178H280,3-17 79%[45;17H[?12l[?25h[?25l[51;168Hj[45;17H[51;168H [45;16H[1;50r[50;1H
[1;51r[42;24H[38;5;224m{[44;17H}[m[50;9H[96m/**[m[51;178H[K[51;178H281,2-16 80%[45;16H[?12l[?25h[?25l[51;168Hj[45;16H[51;168H [45;9H[1;50r[50;1H
[1;51r[50;1H[96m * [m[38;5;81m@param [m[96mstring $value[m[51;178H[K[51;178H282,2-9[7C80%[45;9H[?12l[?25h[?25l[51;168Hj[45;9H[51;168H [45;8H[1;50r[50;1H
[1;51r[50;1H[96m * [m[38;5;81m@return [m[96mstring[m[51;178H[K[51;178H283,1-8[7C80%[45;8H[?12l[?25h[?25l[51;168Hj[45;8H[51;168H [45;28H[1;50r[50;1H
[1;51r[50;1H[96m */[m[51;178H[K[51;178H284,21-28 81%[45;28H[?12l[?25h[?25l[51;168Hj[45;28H[51;168H [45;8H[1;50r[50;1H
[1;51r[50;9H[38;5;81mfunction[m _valueFilter[38;5;224m([m[93m$[m[1m[96mvalue[m[38;5;224m)[m [38;5;224m{[m[51;178H[K[51;178H285,1-8[7C81%[45;8H[?12l[?25h[?25l[51;168Hk[45;8H[51;168H [44;28H[51;180H4,21-28[44;28H[?12l[?25h[?25l[51;168Hk[44;28H[51;168H [43;8H[51;180H3,1-8 [43;8H[?12l[?25h[?25l[51;168Hk[43;8H[51;168H [42;9H[51;180H2,2-9[42;9H[?12l[?25h[?25l[51;168Hk[42;9H[51;168H [41;16H[51;180H1,2-16[41;16H[?12l[?25h[?25l[51;168Hk[41;16H[51;168H [40;17H[38;24H[38;5;224m[46m{[40;17H}[m[51;180H0,3-17[40;17H[?12l[?25h[?25l[51;168Hk[40;17H[51;168H [39;28H[38;24H[38;5;224m{[40;17H}[m[51;179H79,7-28[39;28H[?12l[?25h[?25l[51;168Hk[39;28H[51;168H [38;24H[38;5;224m[46m{[40;17H}[m[51;180H8,10-24[38;24H[?12l[?25h[?25l[51;168Hk[38;24H[51;168H [37;28H[38;24H[38;5;224m{[40;17H}[m[51;180H7,7-28 [37;28H[?12l[?25h[?25l[51;168Hk[37;28H[51;168H [36;28H[51;180H6,14-28[36;28H[?12l[?25h[?25l[51;168Hk[36;28H[51;168H [35;1H[51;180H5,0-1 [35;1H[?12l[?25h[?25l[51;168Hk[35;1H[51;168H [34;17H[51;180H4,3-17[34;17H[?12l[?25h[?25l[51;168Hk[34;17H[51;168H [33;28H[51;180H3,7-28[33;28H[?12l[?25h[?25l[51;168Hk[33;28H[51;168H [32;28H[51;180H2[32;28H[?12l[?25h[?25l[51;168Hk[32;28H[51;168H [31;28H[51;180H1[31;28H[?12l[?25h[?25l[51;168Hk[31;28H[51;168H [30;25H[51;180H0,4-25[30;25H[?12l[?25h[?25l[51;168Hk[30;25H[51;168H [29;32H[51;179H69,4-32[29;32H[?12l[?25h[?25l[51;168Hk[29;32H[51;168H [28;32H[51;180H8[28;32H[?12l[?25h[?25l[51;168Hk[28;32H[51;168H [27;32H[51;180H7[27;32H[?12l[?25h[?25l[51;168Hk[27;32H[51;168H [26;32H[51;180H6[26;32H[?12l[?25h[?25l[51;168Hk[26;32H[51;168H [25;32H[51;180H5[25;32H[?12l[?25h[?25l[51;168Hk[25;32H[51;168H [24;32H[51;180H4[24;32H[?12l[?25h[?25l[51;168Hk[24;32H[51;168H [23;32H[51;180H3[23;32H[?12l[?25h[?25l[51;168Hk[23;32H[51;168H [22;32H[51;180H2[22;32H[?12l[?25h[?25l[51;168Hk[22;32H[51;168H [21;32H[51;180H1[21;32H[?12l[?25h[?25l[51;168Hk[21;32H[51;168H [20;32H[51;180H0[20;32H[?12l[?25h[?25l[51;168Hk[20;32H[51;168H [19;32H[51;179H59[19;32H[?12l[?25h[?25l[51;168Hk[19;32H[51;168H [18;32H[51;180H8[18;32H[?12l[?25h[?25l[51;168Hk[18;32H[51;168H [17;32H[51;180H7[17;32H[?12l[?25h[?25l[51;168Hk[17;32H[51;168H [16;32H[51;180H6[16;32H[?12l[?25h[?25l[51;168Hk[16;32H[51;168H [15;32H[51;180H5[15;32H[?12l[?25h[?25l[51;168Hk[15;32H[51;168H [14;32H[51;180H4[14;32H[?12l[?25h[?25l[51;168Hk[14;32H[51;168H [13;32H[51;180H3[13;32H[?12l[?25h[?25l[51;168Hk[13;32H[51;168H [12;32H[51;180H2[12;32H[?12l[?25h[?25l[51;168Hk[12;32H[51;168H [11;32H[51;180H1[11;32H[?12l[?25h[?25l[51;168Hk[11;32H[51;168H [10;32H[51;180H0[10;32H[?12l[?25h[?25l[51;168Hk[10;32H[51;168H [9;32H[51;179H49[9;32H[?12l[?25h[?25l[51;168Hk[9;32H[51;168H [8;32H[51;180H8[8;32H[?12l[?25h[?25l[51;168Hk[8;32H[51;168H [7;32H[51;180H7[7;32H[?12l[?25h[?25l[51;168Hk[7;32H[51;168H [6;32H[51;180H6[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;32H[1;50r[1;1H[L[1;51r[1;25H[93mwhile[m [38;5;224m([m[93m![m[1m[96mfeof[m[38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m))[m [38;5;224m{[m[51;178H[K[51;178H245,4-32 81%[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;32H[1;50r[1;1H[L[1;51r[1;17H[93mif[m [38;5;224m([m[93m$[m[1m[96mhandle[m[38;5;224m)[m [38;5;224m{[m[51;178H[K[51;178H244,4-32 80%[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;32H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mhandle[m [93m=[m @[1m[96mfopen[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m, [95m"r"[m[38;5;224m)[m;[51;178H[K[51;178H243,4-32 80%[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;32H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H242,4-32 80%[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;32H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mvalues[m [93m=[m [95m""[m;[51;178H[K[51;178H241,4-32 79%[6;32H[?12l[?25h[?25l[51;168Hk[6;32H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mi[m [93m=[m [95m0[m;[51;178H[K[51;178H240,7-28 79%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mhas_end[m [93m=[m [95m0[m;[6;20H[38;5;224m[46m([7C)[m[51;178H[K[51;178H239,14-28 78%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mhas_begin[m [93m=[m [95m0[m;[7;20H[38;5;224m([7C)[m[51;178H[K[51;178H238,14-28 78%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[96m// Read file, get content into a variable and send frequently to the database[m[51;178H[K[51;178H237,2-16 78%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H236,14-28 77%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;23H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96minsert[m [93m=[m [1m[96msubstr[m[38;5;224m([m[93m$[m[1m[96minsert[m,[95m0[m,[1m[96mstrlen[m[38;5;224m([m[93m$[m[1m[96minsert[m[38;5;224m)[m[95m-2[m[38;5;224m)[m[93m.[m[95m") VALUES "[m;[51;178H[K[51;178H235,9-23 77%[6;23H[?12l[?25h[?25l[51;168Hk[6;23H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m[51;178H[K[51;178H234,14-28 77%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;25H[93m$[m[1m[96minsert[m [93m.=[m [93m$[m[1m[96mfiled_name[m[93m.[m[95m", "[m;[51;178H[K[51;178H233,14-28 76%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mfields[m [93mas[m [93m$[m[1m[96mfiled_name[m[38;5;224m)[m [38;5;224m{[m[51;178H[K[51;178H232,14-28 76%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96minsert[m [93m=[m [95m"INSERT INTO "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m" ("[m;[51;178H[K[51;178H231,2-16 76%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[96m// Query construction 1/2 (field part)[m[51;178H[K[51;178H230,14-28 75%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;17H[1;50r[1;1H[L[1;51r[4;49H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H229,3-17 75%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mfields[m [93m=[m [93m$[m[1m[96mthis[m[93m->$[m[1m[96mfunction[m[38;5;224m()[m;[5;49H[38;5;224m{[7;17H}[m[51;178H[K[51;178H228,7-28 75%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mfunction[m [93m=[m [95m"_"[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m"_fields"[m;[51;178H[K[51;178H227,14-28 74%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[96m// get table fields[m[51;178H[K[51;178H226,14-28 74%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H225,14-28 74%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mtruncate_table[m [93m=[m tep_db_query[38;5;224m([m[93m$[m[1m[96mquery[m[38;5;224m)[m;[51;178H[K[51;178H224,2-16 73%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mquery[m [93m=[m [95m"TRUNCATE "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m;[51;178H[K[51;178H223,14-28 73%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[96m// truncate table[m[51;178H[K[51;178H222,14-28 73%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H221,14-28 72%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m[51;178H[K[51;178H220,2-16 72%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FILE_EMPTY[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[51;178H[K[51;178H219,14-28 72%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93mif[m[38;5;224m([m[1m[96mfilesize[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m)[m [93m==[m [95m0[m[38;5;224m)[m [38;5;224m{[m[51;178H[K[51;178H218,14-28 71%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[96m// check if the file is empty[m[51;178H[K[51;178H217,14-28 71%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H216,2-16 71%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[38;5;224m}[m[4;48H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H215,3-17 70%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m NOT_A_FILE[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[5;48H[38;5;224m{[7;17H}[m[51;178H[K[51;178H214,7-28 70%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[93mif[m[38;5;224m([m[93m![m[1m[96mis_file[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m))[m [38;5;224m{[m[6;28H[38;5;224m[46m([11C)[m[51;178H[K[51;178H213,14-28 70%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;17H[96m// check if it is a file[m[7;28H[38;5;224m([11C)[m[51;178H[K[51;178H212,14-28 69%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H211,2-16 69%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;17H[1;50r[1;1H[L[1;51r[1;17H[93m$[m[1m[96mlocal_file[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[93m.[mDIRECTORY_SEPARATOR[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m][m;[4;43H[38;5;224m[46m{[6;17H}[m[51;178H[K[51;178H210,3-17 69%[6;17H[?12l[?25h[?25l[51;168Hk[6;17H[51;168H [6;28H[1;50r[1;1H[L[1;51r[5;43H[38;5;224m{[7;17H}[m[51;178H[K[51;178H209,7-28 68%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;9H[38;5;81mfunction[m get_content_and_save [38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[6;28H[38;5;224m[46m([11C)[m[51;178H[K[51;178H208,14-28 68%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[7;28H[38;5;224m([11C)[m[51;178H[K[51;178H207,14-28 68%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H206,2-16 67%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;1H[96m */[m[51;178H[K[51;178H205,14-28 67%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;16H[1;50r[1;1H[L[1;51r[1;1H[96m * - 'msg' varchar[m[51;178H[K[51;178H204,2-16 67%[6;16H[?12l[?25h[?25l[51;168Hk[6;16H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;1H[96m * - 'result' boolean[m[51;178H[K[51;178H203,21-28 66%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;8H[1;50r[1;1H[L[1;51r[1;1H[96m * [m[38;5;81m@return [m[96marray[m[51;178H[K[51;178H202,1-8[7C66%[6;8H[?12l[?25h[?25l[51;168Hk[6;8H[51;168H [6;8H[1;50r[1;1H[L[1;51r[1;1H[96m *[m[51;178H[K[51;178H201,1-8[7C66%[6;8H[?12l[?25h[?25l[51;168Hk[6;8H[51;168H [6;12H[1;50r[1;1H[L[1;51r[1;1H[96m * Get ICI Relais files content, truncate table and insert new datas[m[51;178H[K[51;178H200,5-12 65%[6;12H[?12l[?25h[?25l[51;168Hk[6;12H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;9H[96m/**[m[51;178H[K[51;178H199,10-28 65%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;28H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H198,10-28 65%[6;28H[?12l[?25h[?25l[51;168Hk[6;28H[51;168H [6;25H[1;50r[1;1H[L[1;51r[1;9H[96m//=========================================================================================================================[m[51;178H[K[51;178H197,18-25 64%[6;25H[?12l[?25h[?25l[51;168Hk[6;25H[51;168H [6;11H[1;50r[1;1H[L[1;51r[51;178H[K[51;178H196,4-11 64%[6;11H[?12l[?25h[?25l[51;168Hk[6;11H[51;168H [6;28H[1;50r[1;1H[L[1;51r[1;9H[38;5;224m}[m[51;178H[K[51;178H195,21-28 64%[6;28H[?12l[?25h[?25l[51;168Hj[6;28H[51;168H [7;11H[51;180H6,4-11 [7;11H[?12l[?25h[?25l[51;168Hj[7;11H[51;168H [8;25H[51;180H7,18-25[8;25H[?12l[?25h[?25l[51;168Hj[8;25H[51;168H [9;28H[51;180H8,10-28[9;28H[?12l[?25h[?25l[51;168Hj[9;28H[51;168H [10;28H[51;180H9[10;28H[?12l[?25h[?25l[51;168Hj[10;28H[51;168H [11;12H[51;178H200,5-12 [11;12H[?12l[?25h[?25l[51;168Hj[11;12H[51;168H [12;8H[51;180H1,1-8 [12;8H[?12l[?25h[?25l[51;168Hj[12;8H[51;168H [13;8H[51;180H2[13;8H[?12l[?25h[?25l[51;168Hj[13;8H[51;168H [14;28H[51;180H3,21-28[14;28H[?12l[?25h[?25l[51;168Hj[14;28H[51;168H [15;16H[51;180H4,2-16 [15;16H[?12l[?25h[?25l[51;168Hj[15;16H[51;168H [16;28H[51;180H5,14-28[16;28H[?12l[?25h[?25l[51;168Hj[16;28H[51;168H [17;16H[51;180H6,2-16 [17;16H[?12l[?25h[?25l[51;168Hj[17;16H[51;168H [18;28H[51;180H7,14-28[18;28H[?12l[?25h[?25l[51;168Hj[18;28H[51;168H [19;28H[38;5;224m[46m([11C)[m[51;180H8[19;28H[?12l[?25h[?25l[51;168Hj[19;28H[51;168H [20;28H[19;28H[38;5;224m([11C)[m[51;180H9,7-28 [20;28H[?12l[?25h[?25l[51;168Hj[20;28H[51;168H [21;17H[19;43H[38;5;224m[46m{[21;17H}[m[51;179H10,3-17[21;17H[?12l[?25h[?25l[51;168Hj[21;17H[51;168H [22;16H[19;43H[38;5;224m{[21;17H}[m[51;180H1,2-16[22;16H[?12l[?25h[?25l[51;168Hj[22;16H[51;168H [23;28H[51;180H2,14-28[23;28H[?12l[?25h[?25l[51;168Hj[23;28H[51;168H [24;28H[38;5;224m[46m([11C)[m[51;180H3[24;28H[?12l[?25h[?25l[51;168Hj[24;28H[51;168H [25;28H[24;28H[38;5;224m([11C)[m[51;180H4,7-28 [25;28H[?12l[?25h[?25l[51;168Hj[25;28H[51;168H [26;17H[24;48H[38;5;224m[46m{[26;17H}[m[51;180H5,3-17[26;17H[?12l[?25h[?25l[51;168Hj[26;17H[51;168H [27;16H[24;48H[38;5;224m{[26;17H}[m[51;180H6,2-16[27;16H[?12l[?25h[?25l[51;168Hj[27;16H[51;168H [28;28H[51;180H7,14-28[28;28H[?12l[?25h[?25l[51;168Hj[28;28H[51;168H [29;28H[51;180H8[29;28H[?12l[?25h[?25l[51;168Hj[29;28H[51;168H [30;28H[51;180H9[30;28H[?12l[?25h[?25l[51;168Hj[30;28H[51;168H [31;16H[51;179H20,2-16 [31;16H[?12l[?25h[?25l[51;179H19,14-28[30;28H[?12l[?25h[?25l[51;168Hl[30;28H[51;168H [30;29H[51;183H5-29[30;29H[?12l[?25h[?25l[51;168Hk[30;29H[51;168H [29;29H[51;180H8[29;29H[?12l[?25h[?25l[51;168Hk[29;29H[51;168H [28;29H[51;180H7[28;29H[?12l[?25h[?25l[51;168Hk[28;29H[51;168H [27;16H[51;180H6,2-16 [27;16H[?12l[?25h[?25l[51;168Hk[27;16H[51;168H [26;17H[24;48H[38;5;224m[46m{[26;17H}[m[51;180H5,3-17[26;17H[?12l[?25h[?25l[51;168Hk[26;17H[51;168H [25;29H[24;48H[38;5;224m{[26;17H}[m[51;180H4,8-29[25;29H[?12l[?25h[?25l[51;168Hk[25;29H[51;168H [24;29H[51;180H3,15-29[24;29H[?12l[?25h[?25l[51;168Hk[24;29H[51;168H [23;29H[51;180H2[23;29H[?12l[?25h[?25l[51;168Hk[23;29H[51;168H [22;16H[51;180H1,2-16 [22;16H[?12l[?25h[?25l[51;168Hk[22;16H[51;168H [21;17H[19;43H[38;5;224m[46m{[21;17H}[m[51;180H0,3-17[21;17H[?12l[?25h[?25l[51;168Hk[21;17H[51;168H [20;29H[19;43H[38;5;224m{[21;17H}[m[51;179H09,8-29[20;29H[?12l[?25h[?25l[51;168Hk[20;29H[51;168H [19;29H[51;180H8,15-29[19;29H[?12l[?25h[?25l[51;168Hk[19;29H[51;168H [18;29H[51;180H7[18;29H[?12l[?25h[?25l[51;168Hk[18;29H[51;168H [17;16H[51;180H6,2-16 [17;16H[?12l[?25h[?25l[51;168Hk[17;16H[51;168H [16;29H[51;180H5,15-29[16;29H[?12l[?25h[?25l[51;168Hk[16;29H[51;168H [15;16H[51;180H4,2-16 [15;16H[?12l[?25h[?25l[51;168Hk[15;16H[51;168H [14;29H[51;180H3,22-29[14;29H[?12l[?25h[?25l[51;168H*[14;29H[51;1H/\[51;168H[K[51;1H[38;5;224mLa recherche a atteint le BAS, et continue en HAUT[25;44H[27m[23m[m[H[2J[1;17H[1m[96mset_time_limit[m[38;5;224m([m[95m0[m[38;5;224m)[m;[3;17H[96m// FTP param control[m[4;17H[93mif[m[38;5;224m(([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m][m [93m==[m [95m''[m[38;5;224m)[m[5;25H[93m&&[m [38;5;224m([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_USER'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_USER'[m[38;5;224m][m [93m==[m [95m''[m [38;5;224m)[m[6;25H[93m&&[m [38;5;224m([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_PASSWORD'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_PASSWORD'[m[38;5;224m][m [93m==[m [95m''[m[38;5;224m)){[m[7;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_PARAM_EMPTY[38;5;224m)[m;[8;17H[38;5;224m}[m[10;17H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_files [93mas[m [93m$[m[1m[96mcurrent_file_info[m[38;5;224m){[m[12;25H[96m// step 1 : download the file[m[13;25H[93m$[m[1m[96mres_download[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[mdownload[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[14;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_download[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[15;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_download[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[16;25H[38;5;224m}[m[18;25H[96m// step 2 : uncompress the file[m[19;25H[93m$[m[1m[96mres_uncompress[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[muncompress[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[20;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_uncompress[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[21;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_uncompress[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[22;25H[38;5;224m}[m[24;25H[96m// step 3 : ckeck[m[25;25H[93m$[m[1m[96mres_init[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[mget_content_and_save[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[26;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_init[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[27;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_init[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[28;25H[38;5;224m}[30;17H}[m[32;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m SYNC_OK[38;5;224m)[m;[34;9H[38;5;224m}[m[36;9H[96m//=========================================================================================================================[38;9H/**
* Download ICI Relais files from FTP
*
* [m[38;5;81m@return [m[96marray
* - 'result' boolean
* - 'msg' varchar
*/[m[46;9H[38;5;81mfunction[m download[38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[48;17H[96m// FTP Connection [m[49;17H[93m$[m[1m[96mconn[m [93m=[m @[1m[96mftp_connect[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m][m, [95m0[m, [95m5[m[38;5;224m)[m;[50;17H[93mif[m[38;5;224m([m[93m!$[m[1m[96mconn[m[38;5;224m)[m [38;5;224m{[m[51;178H89,23-44 21%
[38;5;224mLa recherche a atteint le BAS, et continue en HAUT[m[51;178H[K[51;178H89,23-44 21%[25;44H[?12l[?25h[?25l[51;168Hn[25;44H[51;1H/\[51;26H[K[51;1H[25;18H[27m[23m[m[H[2J[1;17H[38;5;224m}[m[3;17H[96m// read the compress temporary file and write it in an uncompressed one[m[4;17H[93mif[m[38;5;224m([m[93m![m@[1m[96mfwrite[m[38;5;224m([m[93m$[m[1m[96mhandle2[m, [1m[96mgzread[m[38;5;224m([m[93m$[m[1m[96mzp[m, [95m9999999[m[38;5;224m)))[m [38;5;224m{[m[5;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FWRITE_FAILED[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m])[m;[6;17H[38;5;224m}[m[8;17H@[1m[96mfclose[m[38;5;224m([m[93m$[m[1m[96mhandle2[m[38;5;224m)[m;[9;17H@[1m[96mgzclose[m[38;5;224m([m[93m$[m[1m[96mzp[m[38;5;224m)[m;[11;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m UNCOMPRESS_OK[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'remote_file'[m[38;5;224m])[m;[12;9H[38;5;224m}[m[14;9H[96m//=========================================================================================================================[16;9H/**
* Get ICI Relais files content, truncate table and insert new datas
*
* [m[38;5;81m@return [m[96marray
* - 'result' boolean
* - 'msg' varchar
*/[m[25;9H[38;5;81mfunction[m get_content_and_save [38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[27;17H[93m$[m[1m[96mlocal_file[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[m_download_dir[93m.[mDIRECTORY_SEPARATOR[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'local_file'[m[38;5;224m][m;[29;17H[96m// check if it is a file[m[30;17H[93mif[m[38;5;224m([m[93m![m[1m[96mis_file[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m))[m [38;5;224m{[m[31;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m NOT_A_FILE[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[32;17H[38;5;224m}[m[34;17H[96m// check if the file is empty[m[35;17H[93mif[m[38;5;224m([m[1m[96mfilesize[m[38;5;224m([m[93m$[m[1m[96mlocal_file[m[38;5;224m)[m [93m==[m [95m0[m[38;5;224m)[m [38;5;224m{[m[36;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FILE_EMPTY[93m.$[m[1m[96mlocal_file[m[38;5;224m)[m;[37;17H[38;5;224m}[m[39;17H[96m// truncate table[m[40;17H[93m$[m[1m[96mquery[m [93m=[m [95m"TRUNCATE "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m;[41;17H[93m$[m[1m[96mtruncate_table[m [93m=[m tep_db_query[38;5;224m([m[93m$[m[1m[96mquery[m[38;5;224m)[m;[43;17H[96m// get table fields[m[44;17H[93m$[m[1m[96mfunction[m [93m=[m [95m"_"[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m"_fields"[m;[45;17H[93m$[m[1m[96mfields[m [93m=[m [93m$[m[1m[96mthis[m[93m->$[m[1m[96mfunction[m[38;5;224m()[m;[47;17H[96m// Query construction 1/2 (field part)[m[48;17H[93m$[m[1m[96minsert[m [93m=[m [95m"INSERT INTO "[m[93m.$[m[1m[96minput[m[38;5;224m[[m[95m'table_name'[m[38;5;224m][m[93m.[m[95m" ("[m;[49;17H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mfields[m [93mas[m [93m$[m[1m[96mfiled_name[m[38;5;224m)[m [38;5;224m{[m[50;25H[93m$[m[1m[96minsert[m [93m.=[m [93m$[m[1m[96mfiled_name[m[93m.[m[95m", "[m;[51;178H203,11-18 60%[25;18H[?12l[?25h[?25l[51;168Hn[25;18H[51;1H/\[51;168H[K[51;1H[38;5;224mLa recherche a atteint le BAS, et continue en HAUT[25;44H[27m[23m[m[H[2J[1;17H[1m[96mset_time_limit[m[38;5;224m([m[95m0[m[38;5;224m)[m;[3;17H[96m// FTP param control[m[4;17H[93mif[m[38;5;224m(([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m][m [93m==[m [95m''[m[38;5;224m)[m[5;25H[93m&&[m [38;5;224m([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_USER'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_USER'[m[38;5;224m][m [93m==[m [95m''[m [38;5;224m)[m[6;25H[93m&&[m [38;5;224m([m[93m!isset[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_PASSWORD'[m[38;5;224m])[m [93m||[m [93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_PASSWORD'[m[38;5;224m][m [93m==[m [95m''[m[38;5;224m)){[m[7;25H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m FTP_PARAM_EMPTY[38;5;224m)[m;[8;17H[38;5;224m}[m[10;17H[93mforeach[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_files [93mas[m [93m$[m[1m[96mcurrent_file_info[m[38;5;224m){[m[12;25H[96m// step 1 : download the file[m[13;25H[93m$[m[1m[96mres_download[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[mdownload[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[14;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_download[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[15;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_download[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[16;25H[38;5;224m}[m[18;25H[96m// step 2 : uncompress the file[m[19;25H[93m$[m[1m[96mres_uncompress[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[muncompress[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[20;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_uncompress[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[21;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_uncompress[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[22;25H[38;5;224m}[m[24;25H[96m// step 3 : ckeck[m[25;25H[93m$[m[1m[96mres_init[m [93m=[m [93m$[m[1m[96mthis[m[38;5;121m->[mget_content_and_save[38;5;224m([m[93m$[m[1m[96mcurrent_file_info[m[38;5;224m)[m;[26;25H[93mif[m[38;5;224m([m[93m$[m[1m[96mres_init[m[38;5;224m[[m[95m'result'[m[38;5;224m][m [93m!==[m [95mtrue[m[38;5;224m)[m [38;5;224m{[m[27;33H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mfalse[m, [95m'msg'[m [93m=>[m [93m$[m[1m[96mres_init[m[38;5;224m[[m[95m'msg'[m[38;5;224m])[m;[28;25H[38;5;224m}[30;17H}[m[32;17H[93mreturn[m [38;5;121marray[m[38;5;224m([m[95m'result'[m [93m=>[m [95mtrue[m, [95m'msg'[m [93m=>[m SYNC_OK[38;5;224m)[m;[34;9H[38;5;224m}[m[36;9H[96m//=========================================================================================================================[38;9H/**
* Download ICI Relais files from FTP
*
* [m[38;5;81m@return [m[96marray
* - 'result' boolean
* - 'msg' varchar
*/[m[46;9H[38;5;81mfunction[m download[38;5;224m([m[93m$[m[1m[96minput[m[38;5;224m)[m [38;5;224m{[m[48;17H[96m// FTP Connection [m[49;17H[93m$[m[1m[96mconn[m [93m=[m @[1m[96mftp_connect[m[38;5;224m([m[93m$[m[1m[96mthis[m[38;5;121m->[m_configuration_key[38;5;224m[[m[95m'MODULE_SHIPPING_ICIRELAIS_FTP_HOST'[m[38;5;224m][m, [95m0[m, [95m5[m[38;5;224m)[m;[50;17H[93mif[m[38;5;224m([m[93m!$[m[1m[96mconn[m[38;5;224m)[m [38;5;224m{[m[51;178H89,23-44 21%
[38;5;224mLa recherche a atteint le BAS, et continue en HAUT[m[51;178H[K[51;178H89,23-44 21%[25;44H[?12l[?25h[?25l[51;168Hk[25;44H[51;168H [24;41H[51;179H8,20-41[24;41H[?12l[?25h[?25l[51;168Hk[24;41H[51;168H [23;24H[51;179H7,3-24 [23;24H[?12l[?25h[?25l[51;168Hk[23;24H[51;168H [22;25H[20;64H[38;5;224m[46m{[22;25H}[m[51;179H6,4-25[22;25H[?12l[?25h[?25l[51;168Hk[22;25H[51;168H [21;44H[20;64H[38;5;224m{[22;25H}[m[51;179H5,16-44[21;44H[?12l[?25h[?25l[51;168Hk[21;44H[51;168H [20;44H[51;179H4,23[20;44H[?12l[?25h[?25l[51;168Hk[20;44H[51;168H [19;44H[51;179H3[19;44H[?12l[?25h[?25l[51;168Hk[19;44H[51;168H [18;44H[51;179H2[18;44H[?12l[?25h[?25l[51;168Hk[18;44H[51;168H [17;24H[51;179H1,3-24 [17;24H[?12l[?25h[?25l[51;168Hk[17;24H[51;168H [16;25H[14;62H[38;5;224m[46m{[16;25H}[m[51;179H0,4-25[16;25H[?12l[?25h[?25l[51;168Hk[16;25H[51;168H [15;44H[14;62H[38;5;224m{[16;25H}[m[51;178H79,16-44[15;44H[?12l[?25h[?25l[51;168Hk[15;44H[51;168H [14;44H[51;179H8,23[14;44H[?12l[?25h[?25l[51;168H:[14;44H[51;1H[K[51;1H:[?12l[?25h[?25l[14;44H[51;178H78,23-44 21%[14;44H[?12l[?25h[?25l[51;168H:[14;44H[51;1H[K[51;1H:[?12l[?25hQ[?25l[?12l[?25h
[?25l[97m[41mE492: Commande inconnue: Q[14;44H[m[51;178H78,23-44 21%[14;44H[?12l[?25h[?25l[51;168H:[14;44H[51;1H[K[51;1H:[?12l[?25hq[?25l[?12l[?25h
[?25l[?1002l[51;1H[K[51;1H[?1l>[?12l[?25h[?1049l]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ vi ./www/admin/includes/classes/icirelais_file_synchronize_V2.php
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[9Pfind . -name '*.php' -exec grep 'icirelais' {} \; -print[5@INTO [C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[4@(file_id, relay_id[C[C[C[C[C[C[C[C[C[C[C[C[C[C^C
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ touch /tmp/gop[K[K[Khop
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ touch /tmp/hopvi ./www/admin/includes/classes/icirelais_file_synchronize_V2.php
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[9Pfind . -name '*.php' -exec grep 'icirelais' {} \; -print[5@INTO [C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[4@(file_id, relay_id[C[C[C[C[C[C[C[C[C[C[C[C[C[C[15@INTO icirelais [C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[4Pvi /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[33Pfind . -name icirelais_file_synchronize.php
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cphp www/admin/call_icirelais_file_synchronize.php
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Ccd[Kpwd[1Pcdphp www/admin/call_icirelais_file_synchronize.php
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 15
PHP Notice: Undefined index: SERVER_NAME in /home/www-lp/www/admin/includes/configure.php on line 22
PHP Notice: Undefined index: language in /home/www-lp/www/admin/call_icirelais_file_synchronize.php on line 23
PHP Warning: include_once(includes/languages/french/icirelais_file_synchronize.php): failed to open stream: No such file or directory in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Warning: include_once(): Failed opening 'includes/languages/french/icirelais_file_synchronize.php' for inclusion (include_path='.:/opt/php5.3/php5.3.29/lib/php') in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 50
PHP Notice: Use of undefined constant DOWNLOAD_OK - assumed 'DOWNLOAD_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 144
PHP Notice: Use of undefined constant UNCOMPRESS_OK - assumed 'UNCOMPRESS_OK' in /home/www-lp/www/admin/includes/classes/icirelais_file_synchronize_V2.php on line 189
f1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 INSERT INTO icirelais (file_id, relay_id, insee, owner_name, adresse_1, adresse_2, adresse_3, postal_code, city, shop_name, coord_lat, coord_long, pda_equipment, start_validity_date, end_validity_date, last_shippment_date, new_shippment_date, text, monday_opening_hours, tuesday_opening_hours, wednesday_opening_hours, thursday_opening_hours, friday_opening_hours, saturday_opening_hours, sunday_opening_hours, closing_period_start_date_1, closing_period_end_date_1, closing_period_start_date_2, closing_period_end_date_2, closing_period_start_date_3, closing_period_end_date_3, required_time) VALUES [TEP STOP] i]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ find . -newe /tmp[K[K[K[K[K[Ker /tmp/hop
./script/typescript
./www/download/relais.txt
]0;www-lp@vps575036: ~[01;32mwww-lp@vps575036[00m:[01;34m~[00m$ exit
exit
Script terminé sur jeu. 30 juin 2022 08:04:56 CEST