-
Notifications
You must be signed in to change notification settings - Fork 1
/
showmap.php
192 lines (159 loc) · 5.59 KB
/
showmap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?php
include("dbaseconnection.php");
$id=$_GET['id'];
$sql=mysql_query("Update lablist set likes=likes+1 where id='$id'");
$sql=mysql_query("select labname from lablist where id='$id'");
$row=mysql_fetch_row($sql);
$lname=$row[0];
$sql2=mysql_query("select address,latitude,longitude from labbranch where labname='$lname'");
$r=mysql_fetch_row($sql2);
$address=$r[0];
$address=urlencode($address);
$la=$r[1];
$lo=$r[2];
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>lifeline.in</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="js/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-layers.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"></script>
<style>
.google-maps {
position: relative;
padding-bottom: 75%; // This is the aspect ratio
height: 0;
overflow: hidden;
}
.google-maps #map {
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
</style>
</head>
<body onload="initialize()">
<!-- Header -->
<header id="header">
<h1><a href="index.html"><img src="lifelinelogo2.png" style="padding-top:4px;"height="90" width="250"></img></a></h1>
<nav id="nav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="faq.html">FAQs</a></li>
<li><a href="about.php">About </a></li>
<li><a href="add.php">Add your Lab</a></li>
<li><a href="lablogin.php">Login</a></li>
</ul>
</nav>
</header>
<!-- Main -->
<section id="main" class="wrapper">
<div class="container">
<header class="major">
<h2>Show on Map</h2>
<p>for help:+91-9717-06-5383</p>
</header>
<div style="text-align:center;">
<input id="address" type="hidden" value="<?php echo $address;?>">
<input type="button"class="special fit" value="Click to Show" onclick="codeAddress()"/>
</div><hr />
<script>
var geocoder;
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(<?php echo $la;?>,<?php echo $lo;?>);
var mapOptions = {
zoom: 17,
center: latlng
}
map = new google.maps.Map(document.getElementById("map"), mapOptions);
}
function codeAddress() {
var address = document.getElementById("address").value;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
</script>
<div class="google-maps" ><div id="map" style="width:1200px; height: 400px;"></div></div>
</div>
</section>
<!-- Footer -->
<footer id="footer">
<div class="container">
<div class="row">
<section class="4u 6u(medium) 12u$(small)">
<h3>Introduction!</h3>
<p>We are first of our kind with striking features
which makes this portal more user friendly.
In lifeline we work for the benefit of people.</p>
<ul class="list">
<li>COMPARE PRICES.SAVE TIME. SAVE MONEY!</li>
<li>Get discounted health packages.</li>
<li>Free Home Sample Collection.</li>
<li>Compare & book test in less than five minutes.</li>
</ul>
</section>
<section class="4u 6u$(medium) 12u$(small)">
<h3>Shortcuts</h3>
<ul class="alt">
<li><a href="index.html">Home</a></li>
<li><a href="faq.html">FAQs</a></li>
<li><a href="about.php">About </a></li>
<li><a href="add.php">Add your Lab</a></li>
<li><a href="lablogin.php">Login</a></li>
</ul>
</section>
<section class="4u$ 12u$(medium) 12u$(small)">
<h3>Contact Us</h3>
<ul class="icons">
<li><a href="" class="icon rounded fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="" class="icon rounded fa-facebook"><span class="label">Facebook</span></a></li>
<li><a href="" class="icon rounded fa-pinterest"><span class="label">Pinterest</span></a></li>
<li><a href="" class="icon rounded fa-google-plus"><span class="label">Google+</span></a></li>
<li><a href="" class="icon rounded fa-linkedin"><span class="label">LinkedIn</span></a></li>
</ul>
<ul class="tabular">
<li>
<h3>Mail</h3>
<a href="mailto:[email protected]">[email protected]</a>
</li>
<li>
<h3>Phone</h3>
(+91) 9717-06-5383
</li>
</ul>
</section>
</div>
<ul class="copyright">
<li>© lifeline.in. All rights reserved.</li>
</ul>
</div>
</footer>
</body>
</html>