43 lines
875 B
PHP
Raw Normal View History

2016-01-04 12:49:26 +01:00
<?php
2016-12-19 11:45:29 +01:00
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
$_SERVER['SERVER_NAME'] = 'www.bebeboutik.com';
2016-01-04 12:49:26 +01:00
if(isset($_SERVER['REMOTE_ADDR'])) {
exit;
}
$_SERVER['HTTP_PORT'] = 80;
include dirname(__FILE__).'/../../config/config.inc.php';
$f = fopen('PDR.csv', 'r');
fgetcsv($f);
Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'lapostews_pr`
');
while($line = fgetcsv($f, 0, ';')) {
if($line[0] == 'PR') {
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'lapostews_pr`
VALUES (
"'.pSQL($line[1]).'",
"'.pSQL($line[2]).'",
"'.pSQL($line[3]).'",
"'.pSQL($line[4]).'",
"'.pSQL($line[5]).'",
"'.pSQL($line[6]).'",
"'.pSQL($line[7]).'",
"'.pSQL($line[8]).'",
"'.pSQL($line[9]).'",
"'.pSQL($line[10]).'",
"'.pSQL($line[12]).'",
"'.pSQL($line[14]).'",
"'.pSQL($line[15]).'"
)
');
}
}
fclose($f);