40 lines
805 B
PHP
40 lines
805 B
PHP
<?php
|
|
if(isset($_SERVER['REMOTE_ADDR'])) {
|
|
exit;
|
|
}
|
|
|
|
$_SERVER['HTTP_PORT'] = 80;
|
|
include dirname(__FILE__).'/../../../../config/config.inc.php';
|
|
|
|
$f = fopen(dirname(__FILE__).'/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);
|