Merge branch 'ticket-newExtract' into develop

This commit is contained in:
Marion Muszynski 2016-04-27 11:12:00 +02:00
commit f19e86331a
2 changed files with 34 additions and 16 deletions

View File

@ -650,10 +650,12 @@ class AdminBulkUpdate extends AdminTab {
break;
};
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
unlink($filename);
}
$fname = 'DEB-int-'.date( "Ymd", strtotime($date_start)).'-'.date( "Ymd", strtotime($date_end)).'.csv';
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
if ($fname == $filename) {
unlink($filename);
}
}
$f = fopen(dirname(__FILE__).'/'.$fname, 'w');
// uft8 sans bom pour accent
@ -904,10 +906,12 @@ class AdminBulkUpdate extends AdminTab {
break;
};
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
unlink($filename);
}
$fname = 'DEB-exp-'.date( "Ymd", strtotime($date_start)).'-'.date( "Ymd", strtotime($date_end)).'.csv';
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
if ($fname == $filename) {
unlink($filename);
}
}
$f = fopen(dirname(__FILE__).'/'.$fname, 'w');
// uft8 sans bom pour accent
@ -1128,12 +1132,15 @@ class AdminBulkUpdate extends AdminTab {
}
}
$products = array_unique($products);
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
unlink($filename);
}
$privatesale = Sale::getSaleFromCategory((int) $id_category);
//$fname = Tools::passwdGen(10).'.csv';
$fname = date( "Ymd", strtotime($privatesale->date_start)).'-'.$privatesale->title[(int)$id_lang].'.csv';
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
if ($fname == $filename) {
unlink($filename);
}
}
$f = fopen(dirname(__FILE__).'/'.$fname, 'w');
// uft8 sans bom pour accent
@ -1394,7 +1401,6 @@ class AdminBulkUpdate extends AdminTab {
$date_start = Tools::getValue('date_start');
$date_end = Tools::getValue('date_end');
$ids = Db::getInstance()->ExecuteS('
SELECT c.id_category
FROM `'._DB_PREFIX_.'privatesale` p
@ -1418,12 +1424,14 @@ class AdminBulkUpdate extends AdminTab {
continue;
};
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
unlink($filename);
}
//$fname = Tools::passwdGen(10).'.csv';
$privatesale = Sale::getSaleFromCategory((int) $id_category);
$fname = date( "Ymd", strtotime($privatesale->date_start)).'-'.$privatesale->title[(int)$id_lang].'.csv';
$fname = date( "Ymd", strtotime($date_start)).'-'.date( "Ymd", strtotime($date_end)).'.csv';
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
if ($fname == $filename) {
unlink($filename);
}
}
$f = fopen(dirname(__FILE__).'/'.$fname, 'w');
// uft8 sans bom pour accent

View File

@ -0,0 +1,10 @@
<?php
if(isset($_SERVER['REMOTE_ADDR'])) exit;
$_SERVER['SERVER_PORT'] = 80;
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
include(dirname(__FILE__).'/../../config/config.inc.php');
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
unlink($filename);
}