46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
if(isset($_SERVER['REMOTE_ADDR'])) {
|
|
exit;
|
|
}
|
|
|
|
$_SERVER['HTTP_PORT'] = 80;
|
|
include dirname(__FILE__).'/../../../../config/config.inc.php';
|
|
|
|
|
|
$file = gzopen(dirname(__FILE__).'/plan2.gz', 'r');
|
|
|
|
fgets($file);
|
|
|
|
Db::getInstance()->ExecuteS('
|
|
DELETE FROM `'._DB_PREFIX_.'exapaqws_route`
|
|
');
|
|
|
|
while($line = fgets($file)) {
|
|
if($line == 'F') {
|
|
break;
|
|
}
|
|
|
|
Db::getInstance()->ExecuteS('
|
|
INSERT INTO `'._DB_PREFIX_.'exapaqws_route`
|
|
VALUES (
|
|
"'.pSQL(substr($line, 0, 2)).'",
|
|
"'.pSQL(substr($line, 2, 3)).'",
|
|
"'.pSQL(substr($line, 5, 10)).'",
|
|
"'.pSQL(substr($line, 15, 10)).'",
|
|
"'.pSQL(substr($line, 25, 1)).'",
|
|
"'.pSQL(substr($line, 26, 2)).'",
|
|
"'.pSQL(substr($line, 28, 1)).'",
|
|
"'.pSQL(substr($line, 29, 2)).'",
|
|
"'.pSQL(substr($line, 32, 3)).'",
|
|
"'.pSQL(substr($line, 35, 3)).'",
|
|
"'.pSQL(substr($line, 38, 3)).'",
|
|
"'.pSQL(substr($line, 41, 3)).'",
|
|
"'.pSQL(substr($line, 51, 3)).'",
|
|
"'.pSQL(substr($line, 54, 4)).'",
|
|
"'.pSQL(substr($line, 58, 1)).'"
|
|
)
|
|
');
|
|
}
|
|
|
|
gzclose($file);
|