Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Testmap</title>
- <link href="css/default.css" rel="stylesheet" type="text/css" />
- <link href="css/demo1.css" rel="stylesheet" type="text/css" />
- <script src="js/jquery.js" type="text/javascript"></script>
- <script src="js/craftmap.js" type="text/javascript"></script>
- <script src="js/init.js" type="text/javascript"></script>
- </head>
- <body>
- <div class="demo1">
- <img src="map.jpg" class="imgMap" />
- <?php
- mysql_connect("","","");
- mysql_select_db("");
- $result = mysql_query("SELECT * FROM `vehicles` WHERE (`owner`='1')");
- while($row = mysql_fetch_array($result)){
- $id = $row["id"];
- $km = $row["km"];
- $tank = $row["tank"];
- $numplate = $row["numplate"];
- $model = $row["model"];
- if($row["x"] < 0 && $row["y"] < 0)
- {
- $x2 = $row["x"];
- $y2 = $row["y"] *= -1;
- $x = $x2 + 2991;
- $y = $y2 + 2984;
- } else if($row["x"] < 0 && $row["y"] > 0)
- {
- $x2 = $row["x"];
- $y2 = $row["y"] *= -1;
- $x = $x2 + 2991;
- $y = $y2 + 2984;
- } else if($row["x"] > 0 && $row["y"] > 0)
- {
- $x2 = $row["x"];
- $y2 = $row["y"] *= -1;
- $x = 2991 + $x2;
- $y = 2984 + $y2;
- } else if($row["x"] > 0 && $row["y"] < 0)
- {
- $x2 = $row["x"];
- $y2 = $row["y"] *= -1;
- $x = 2991 + $x2;
- $y = 2984 + $y2;
- }
- echo "<div class=\"marker\" id=\"$id\" data-coords=\"$x, $y\">";
- echo "<h3>$numplate</h3>";
- echo "<b>Kilometer:</b> $km km<br />";
- echo "<b>Treibstoff:</b> $tank l<br />";
- echo "</div>";
- }
- ?>
- </div>
- <div class="controls">
- <?
- $result = mysql_query("SELECT * FROM `vehicles` WHERE (`owner`='1')");
- while($row = mysql_fetch_array($result)){
- $id = $row["id"];
- $numplate = $row["numplate"];
- print "<a href=\"#\" rel=\"$id\">$numplate</a>";
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement