<?php
include 'main.php';
$password = $_POST["password"];
$data = file("2.txt");
$number = array();
$lon = array();
$lat = array();
$type = array();
$speed = array();
$napravl = array();
$azimut = array();
$name = array();
mysql_connect($hostName, $userName, $password);
mysql_select_db($dbName);
$todayDateTime = date('Y-m-d H:i:s');
if($password="2***************9"){
for ($i = 1; $i < count($data); $i++) {
list($number[$i], $lon[$i], $lat[$i], $type[$i], $speed[$i], $napravl[$i], $azimut[$i], $name[$i]) = explode(",", $data[$i]);
}
for ($i = 1; $i < count($data); $i++) {
$ii = $i + 1;
$distance = ceil(1000*(sqrt((pow(111*($lat[$i] - $lat[$ii]),2))+pow((111*($lon[$i]-$lon[$ii])*(cos(deg2rad($lat[$i])))),2))));
if($distance>25){
mysql_query("INSERT INTO $tableStacPos SET pos_type='$type[$ii]', pos_look=1, pos_lat='$lat[$ii]', pos_lon='$lon[$ii]', pos_date_time='$todayDateTime', pos_speed='$speed[$ii]'");
}
}
} else {
echo "Неверный пароль";
}
mysql_close();
?>
Multiple Markers
var markers = [
['London Eye, London', 51.503454,-0.119562],
['Palace of Westminster, London', 51.499633,-0.124755]
];