2016-09-06 15:32:52 +02:00
|
|
|
<?php
|
2016-09-07 15:03:58 +02:00
|
|
|
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
|
2016-09-06 15:32:52 +02:00
|
|
|
include dirname(__FILE__).'/../../config/config.inc.php';
|
|
|
|
|
|
|
|
if(isset($_SERVER['REMOTE_ADDR'])) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
set_time_limit(600);
|
|
|
|
if($row = Db::getInstance()->getRow('
|
|
|
|
SELECT *
|
2016-09-07 11:42:38 +02:00
|
|
|
FROM `'._DB_PREFIX_.'philea_sync`
|
2016-09-06 15:32:52 +02:00
|
|
|
WHERE `status` = 0
|
|
|
|
ORDER BY `date_add` ASC
|
|
|
|
')) {
|
|
|
|
// SEND ART01
|
|
|
|
Db::getInstance()->ExecuteS('
|
2016-09-07 11:42:38 +02:00
|
|
|
UPDATE `'._DB_PREFIX_.'philea_sync`
|
2016-09-06 15:32:52 +02:00
|
|
|
SET `status` = 1
|
|
|
|
WHERE `id_sync` = '.(int) $row['id_sync'].'
|
|
|
|
LIMIT 1
|
|
|
|
');
|
|
|
|
system('cd '.dirname(__FILE__).'/script && php send_article.php '.(int) $row['id_sale']);
|
|
|
|
sleep(20);
|
|
|
|
|
2016-09-07 11:42:38 +02:00
|
|
|
// SEND REC01 - pas de gestion recption fournisseur sur bbb
|
2016-09-06 15:32:52 +02:00
|
|
|
/*Db::getInstance()->ExecuteS('
|
2016-09-07 11:42:38 +02:00
|
|
|
UPDATE `'._DB_PREFIX_.'philea_sync`
|
2016-09-06 15:32:52 +02:00
|
|
|
SET `status` = 2
|
|
|
|
WHERE `id_sync` = '.(int) $row['id_sync'].'
|
|
|
|
LIMIT 1
|
|
|
|
');
|
|
|
|
system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']);*/
|
|
|
|
}
|
|
|
|
|
|
|
|
if($row = Db::getInstance()->getRow('
|
|
|
|
SELECT *
|
2016-09-07 11:42:38 +02:00
|
|
|
FROM `'._DB_PREFIX_.'philea_sync`
|
2016-09-06 15:32:52 +02:00
|
|
|
WHERE `status` = 3
|
|
|
|
ORDER BY `date_add` ASC
|
|
|
|
')) {
|
|
|
|
// SEND CDC02
|
|
|
|
/*Db::getInstance()->ExecuteS('
|
2016-09-07 11:42:38 +02:00
|
|
|
UPDATE `'._DB_PREFIX_.'philea_sync`
|
2016-09-06 15:32:52 +02:00
|
|
|
SET `status` = 4
|
|
|
|
WHERE `id_sync` = '.(int) $row['id_sync'].'
|
|
|
|
LIMIT 1
|
|
|
|
');
|
|
|
|
system('cd '.dirname(__FILE__).'/script && php send_commande.php '.(int) $row['id_sale']);*/
|
|
|
|
}
|