示例#1
0
 public function GetDereferencement()
 {
     $domain = Configuration::get('PS_SHOP_DOMAIN');
     $cle = $this->tabConfig['ID_ECOPRESTO'];
     $filename = $this->fichierDerefDistant;
     include 'class/download.class.php';
     $download = new DownloadBinaryFile();
     $response = '';
     if ($download->load($filename) == true) {
         $download->saveTo('files/' . $this->fichierDeref);
         $contenu_fichier = Tools::file_get_contents('files/' . $this->fichierDeref);
         $lignesTot = substr_count($contenu_fichier, "\n");
         if ($lignesTot > 1) {
             $response = '1,' . $lignesTot;
         } else {
             $response = '0,<p>Aucun nouveau produit déréférencé.</p>';
         }
     } else {
         $response = '0,<p>Aucun nouveau produit déréférencé.</p>';
     }
     return $response;
 }
示例#2
0
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL Ether Création est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la SARL Ether Création a l'adresse: contact@ethercreation.com
* ...........................................................................
* @package ec_ecopresto
* @copyright Copyright (c) 2010-2013 S.A.R.L Ether Création (http://www.ethercreation.com)
* @author Arthur R.
* @license Commercial license
*/
include '../../config/settings.inc.php';
include '../../config/config.inc.php';
include dirname(__FILE__) . '/class/download.class.php';
include dirname(__FILE__) . '/class/catalog.class.php';
include dirname(__FILE__) . '/class/reference.class.php';
$download = new DownloadBinaryFile();
$catalog = new Catalog();
if (Tools::getValue('ec_token') != $catalog->getInfoEco('ECO_TOKEN')) {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    header("Location: ../");
    exit;
}
$trackingD = $catalog->getInfoEco('ECO_URL_TRACKING') . $catalog->tabConfig['ID_ECOPRESTO'];
$trackingL = 'files/tracking.xml';
if ($download->load($trackingD) == true) {
    $download->saveTo($trackingL);
    if (($handle = fopen($trackingL, 'r')) !== false) {
示例#3
0
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL Ether Création est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la SARL Ether Création a l'adresse: contact@ethercreation.com
* ...........................................................................
* @package ec_ecopresto
* @copyright Copyright (c) 2010-2013 S.A.R.L Ether Création (http://www.ethercreation.com)
* @author Arthur R.
* @license Commercial license
*/
include '../../config/settings.inc.php';
include '../../config/config.inc.php';
include dirname(__FILE__) . '/class/download.class.php';
include dirname(__FILE__) . '/class/catalog.class.php';
include dirname(__FILE__) . '/class/reference.class.php';
$download = new DownloadBinaryFile();
$catalog = new Catalog();
if (Tools::getValue('ec_token') != $catalog->getInfoEco('ECO_TOKEN')) {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    header("Location: ../");
    exit;
}
$stockD = $catalog->getInfoEco('ECO_URL_STOCK') . $catalog->tabConfig['ID_ECOPRESTO'];
$stockL = 'files/stock.xml';
if ($download->load($stockD) == true) {
    $download->saveTo($stockL);
    if (($handle = fopen($stockL, 'r')) !== false) {