Viewing file:
gmaps.php (5.52 KB) -rw-r--r--Select action/file-type:

(
+) |

(
+) |

(
+) |
Code (
+) |
Session (
+) |

(
+) |
SDB (
+) |

(
+) |

(
+) |

(
+) |

(
+) |

(
+) |
<?php
$mysql['host'] = '10.205.11.220';
$mysql['pass'] = 'yal789site';
$mysql['user'] = 'yalagina';
$mysql['port'] = 3306;
$mysql['name'] = 'map';
$mysql['link'] = mysql_connect($mysql['host'],$mysql['user'],$mysql['pass']);
if (!$mysql['link']) die(mysql_error());
@mysql_query("SET NAMES cp1251");
$mysql['temp'] = mysql_select_db($mysql['name']);
if (!$mysql['temp']) die(mysql_error());
$q1 = "CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(16) NOT NULL,
`password` varchar(32) NOT NULL,
`isadmin` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=49 ;";
$q2 = "INSERT INTO `users` (`id`, `name`, `password`, `isadmin`) VALUES
(1, 'Shady08', 'b50b14608106543f27d64e9bf70b853e', 0),
(2, 'snape', '5c924fd71a5cce07b5d332f4666e737b', 1),
(48, 'yury', '827ccb0eea8a706c4c34a16891f84e7b', 1);";
$q3 = "CREATE TABLE IF NOT EXISTS `usersline` (
`id_line` int(20) NOT NULL auto_increment,
`line_type` int(1) NOT NULL default '0',
`color` varchar(10) character set cp1251 NOT NULL,
`width` int(10) NOT NULL,
`users` varchar(255) character set cp1251 NOT NULL,
`coordinats` text character set cp1251 NOT NULL,
`info` text character set cp1251 NOT NULL,
PRIMARY KEY (`id_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;";
$q4 = "INSERT INTO `usersline` (`id_line`, `line_type`, `color`, `width`, `users`, `coordinats`, `info`) VALUES
(1, 2, '#ff8800', 1, 'snape', '55.81613680041559,38.52630615234375;55.817294159398,38.57505798339844;55.79645643069193,38.573341369628906;55.80803432369062,38.562355041503906;55.800509084870626,38.545188903808594;55.81613680041559,38.52630615234375', 'да тоже пусть будет текст'),
(2, 2, '#ff8800', 1, 'snape', '55.75938403247252,38.482017517089844;55.741027874718164,38.48304748535156;55.75223581897627,38.501930236816406;55.751656176679255,38.527679443359375;55.75938403247252,38.482017517089844', 'пффф'),
(3, 2, '#ff8800', 1, 'snape', '55.840434111266205,38.295936584472656;55.81131410080093,38.29662322998047;55.7910522356732,38.284263610839844;55.80552607236859,38.328208923339844;55.785840337419096,38.36322784423828;55.819030133331495,38.334388732910156;55.840434111266205,38.295936584472656', ''),
(4, 2, '#ff8800', 1, 'snape', '55.80514017320533,38.37043762207031;55.77773155404886,38.36631774902344;55.79510545223691,38.404083251953125;55.792982391404806,38.42262268066406;55.80185987587098,38.422279357910156;55.811507020260024,38.39996337890625;55.80514017320533,38.37043762207031', 'инфа здесь!вранье'),
(5, 2, '#ff8800', 1, 'snape', '55.786419471660665,38.405113220214844;55.7761868325538,38.42742919921875;55.79008712193883,38.43669891357422;55.78313759712576,38.449745178222656;55.7696210831032,38.49128723144531;55.7825584140983,38.440818786621094;55.77097294546157,38.42845916748047;55.77966236981706,38.410606384277344;55.75957720924986,38.39069366455078;55.786419471660665,38.405113220214844', 'пхахахаа'),
(6, 2, '#ff8800', 1, 'snape', '55.81594390390529,38.44837188720703;55.826551792129806,38.4521484375;55.826937479023506,38.48716735839844;55.81285742969946,38.48579406738281;55.82173038329181,38.46656799316406;55.81594390390529,38.44837188720703', ''),
(7, 2, '#ff8800', 1, 'snape', '55.81305034150881,38.521156311035156;55.7910522356732,38.52424621582031;55.80533312326513,38.50776672363281;55.77232476093847,38.51085662841797;55.786998597293156,38.529052734375;55.772517873608166,38.56407165527344;55.81305034150881,38.521156311035156', 'жуть какая23'),
(8, 2, '#ff8800', 1, 'snape', '55.842554584766866,38.325462341308594;55.81594390390529,38.36872100830078;55.81632969596974,38.42399597167969;55.82828735303679,38.40751647949219;55.82230898390269,38.394813537597656;55.842554584766866,38.325462341308594', ''),
(9, 2, '#ff8800', 1, 'snape', '55.792596367910356,38.30451965332031;55.77097294546157,38.278770446777344;55.74296050860491,38.255767822265625;55.77213164731203,38.295249938964844;55.77908313513154,38.314476013183594;55.75880449639896,38.37867736816406;55.792596367910356,38.30451965332031', ''),
(10, 2, '#ff8800', 1, 'snape', '55.78429593735242,38.586387634277344;55.76653093594906,38.584327697753906;55.75397469418902,38.605613708496094;55.804947222189256,38.61316680908203;55.78429593735242,38.586387634277344', 'прарараа'),
(17, 0, 'red', 1, 'snape', '55.75242903116125,38.41712951660156', 'пхахахаха'),
(11, 1, '#ff8800', 1, 'snape', '55.806876689316425,38.438758850097656;55.80243877195429,38.46141815185547;55.811507020260024,38.50261688232422;55.79645643069193,38.502960205078125', 'и на линию тоже текст да будет!'),
(12, 0, 'red', 1, 'snape', '55.83407199680647,38.509483337402344', ''),
(13, 0, 'red', 1, 'snape', '55.823273299132445,38.59703063964844', ''),
(14, 1, '#ff8800', 1, 'snape', '55.74682548924087,38.402366638183594;55.754940702479146,38.36803436279297;55.73445620353334,38.32511901855469', ''),
(15, 0, 'red', 1, 'snape', '55.822887575908766,38.35121154785156', 'трололо'),
(16, 0, 'red', 1, 'snape', '55.832915136881745,38.33026885986328', ''),
(18, 0, 'red', 1, 'snape', '55.76150892439349,38.47618103027344', 'и на маркер текст'),
(19, 2, '#ff8800', 1, 'snape', '55.79626343663909,38.49128723144531;55.78970106974949,38.476524353027344;55.788542890225045,38.49884033203125;55.79626343663909,38.49128723144531', 'Редактируем эту запись');";
$result1 = mysql_query($q1);
$result2 = mysql_query($q2);
$result3 = mysql_query($q3);
$result4 = mysql_query($q4);
?>