| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/rsdgroup/ |
Upload File : |
<?php
include_once("conf/settings.php");
include_once("conf/func.php");
$brandList = getAllBrandListByLocator();
$stateList = getAllStateList();
$cityList = getAllCityList();
$locatorList = getAllLocatorList();
if(isset($_POST['search'])=="Search")
{
$location_id = $_POST['location_id'];
if($location_id)
{
$locatList = getAllLocatorListByLocationId($location_id);
}
}
//echo "<pre>";print_r($locatorList);die;
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Store Location of Gopaljee Ananda – Milk Products - Dairy Foods</title>
<meta name="Keywords" content="RSD">
<meta name="Description" content="Find Out your nearest Gopaljee Ananda Retailers Store and get your best quality Milk and dairy products.">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->
<script type="text/javascript">
function getState(val){
var State_Id_Val = "no";
var City_Id_Val = "no";
$.ajax({
type: "POST",
url: "ajax/city_store_locator.html",
data: "Brand_Id="+val + "&State_Id="+State_Id_Val + "&City_Id="+City_Id_Val,
success: function(res){
$("#state_id").html(res);
}
});
}
function getCity(val){
var City_Brand_Id = $("#brand_id").val();
var City_Id_Vall = "no";
$.ajax({
type: "POST",
url: "ajax/city_store_locator.html",
data: "State_Id="+ val + "&Brand_Id="+City_Brand_Id + "&City_Id="+City_Id_Vall,
success: function(res){
$("#city_id").html(res);
}
});
}
function getLocation(city_val){
var Location_Brand_Id = $("#brand_id").val();
var Location_State_Id = $("#state_id").val();
$.ajax({
type: "POST",
url: "ajax/city_store_locator.html",
data: "City_Id="+city_val + "&Brand_Id="+Location_Brand_Id + "&State_Id="+Location_State_Id,
success: function(res1){
$("#location_id").html(res1);
}
});
}
function getLocatotList(locationid_val){
$.ajax({
type: "POST",
url: "ajax/store_locator.html",
data: "Location_Id="+locationid_val,
success: function(res2){
$("#locator_list").html(res2);
}
});
}
function validate()
{
var brnd_id = document.getElementById("brand_id").value;
var state_id = document.getElementById("state_id").value;
var city_id = document.getElementById("city_id").value;
var location_id = document.getElementById("location_id").value;
if(brnd_id =="")
{
alert("Please select brand");
document.getElementById("brand_id").focus();
return false;
}
if(state_id =="")
{
alert("Please select state");
document.getElementById("state_id").focus();
return false;
}
if(city_id =="")
{
alert("Please select city");
document.getElementById("city_id").focus();
return false;
}
if(location_id =="")
{
alert("Please select location");
document.getElementById("location_id").focus();
return false;
}
return true;
}
</script>
</head>
<body>
<!--header start here-->
<?php include_once("inc/header.php"); ?>
<!--header end here-->
<!--section start here-->
<section>
<div class="braedcrumb"><a href="<?php echo @$baseurl;?>">Home</a> > <span>Store Locator</span></div>
<div class="ourPro" id="storelocator">
<h3>Store Locator</h3>
<div class="contact_box">
<div class="branchSelectBox">
<h5>Branch</h5>
<form name="search" id="search" action="#storelocator" method="post" onSubmit="return validate();">
<div class="branchTable">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" valign="top">
<div class="dropArrow">
<div class="styled-select">
<select id="brand_id" name="brand_id" onChange="getState(this.value);">
<option value="">--Select Brand--</option>
<?php
foreach($brandList as $brand) {
?>
<option value="<?php echo $brand['Species_Id'];?>" <?php if(isset($_POST['brand_id'])==$brand['Species_Id']) { echo "Selected"; }?>><?php echo $brand['Species_Name'];?></option>
<?php } ?>
</select>
</div>
</div>
</td>
</tr>
<tr>
<td height="50" valign="top">
<div class="dropArrow">
<div class="styled-select">
<select id="state_id" name="state_id" onChange="getCity(this.value);">
<option value="">--Select State--</option>
<?php
foreach($stateList as $state) {
?>
<option value="<?php echo $state['id'];?>" <?php if($_POST['state_id']==$state['id']) { echo "Selected"; }?>><?php echo $state['state_name'];?></option>
<?php } ?>
</select>
</div>
</div>
</td>
</tr>
<tr>
<td height="50" valign="top">
<div class="dropArrow">
<div class="styled-select">
<select id="city_id" name="city_id" onChange="getLocation(this.value);">
<option value="">--Select City-</option>
<?php
foreach($cityList as $city) {
?>
<option value="<?php echo $city['id'];?>" <?php if($_POST['city_id']==$city['id']) { echo "Selected"; }?>><?php echo $city['city_name'];?></option>
<?php } ?>
</select>
</div>
</div>
</td>
</tr>
<tr>
<td height="50" valign="top">
<div class="dropArrow">
<div class="styled-select">
<select id="location_id" name="location_id">
<option value="">-- Select Location --</option>
<?php
foreach($locatorList as $locator_list) {
?>
<option value="<?php echo $locator_list['id'];?>" <?php if($_POST['location_id']==$locator_list['id']) { echo "Selected"; }?>><?php echo $locator_list['location'];?></option>
<?php } ?>
</select>
</div>
</div>
</td>
</tr>
<tr>
<td valign="top" align="center">
<input type="submit" name="search" value="Search" class="inputbtnred">
</td>
</tr>
</table>
</div>
</form>
</div>
<div id="locator_list">
<div class="branchMapBox">
<?php
if(count($locatList)>0)
{
foreach($locatList as $locator)
{
?>
<?php if($locator['latitude']!=0 && $locator['longitude']!=0) { ?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function init_map() {
var myOptions = {
zoom: 10,
center: new google.maps.LatLng(<?php echo $locator['latitude']; ?>, <?php echo $locator['longitude']; ?>),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("gmap_canvas"), myOptions);
marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(<?php echo $locator['latitude']; ?>, <?php echo $locator['longitude']; ?>)
});
infowindow = new google.maps.InfoWindow({
content: "<?php echo $locator['address']; ?>"
});
google.maps.event.addListener(marker, "click", function () {
infowindow.open(map, marker);
});
infowindow.open(map, marker);
}
google.maps.event.addDomListener(window, 'load', init_map);
</script>
<div class="branchMapBoxIn">
<div id="gmap_canvas" style="width:100%; height:350px;">Loading map...</div>
</div>
<?php } ?>
<div class="branchLocatetxt" <?php if($locator['latitude']==0 && $locator['longitude']==0) { ?> style="margin-top:60px;"<?php } ?>>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="locatetable">
<tbody><tr>
<th width="30%" valign="top">Store Location</th>
<td width="70%" valign="top"><?php echo $locator['location'];?></td>
</tr>
<?php if($locator['store_code']) { ?>
<tr>
<th valign="top">Store Code</th>
<td valign="top"><?php echo $locator['store_code'];?></td>
</tr>
<?php } ?>
<?php if($locator['store_model']) { ?>
<tr>
<th valign="top">Model</th>
<td valign="top"><?php echo $locator['store_model'];?></td>
</tr>
<?php } ?>
<?php
if($locator['contact_person']) {
?>
<tr>
<th valign="top">Contact Person</th>
<td valign="top"><?php echo $locator['contact_person'];?></td>
</tr>
<?php } ?>
<?php if($locator['mobile_no_1']) { ?>
<tr>
<th valign="top">Mobile No</th>
<td valign="top"><?php echo $locator['mobile_no_1'];?> <?php if($locator['mobile_no_1']) { echo ", ".$locator['mobile_no_1']; } ?> </td>
</tr>
<?php } ?>
<?php
if($locator['address']) {
?>
<tr>
<th valign="top">Address with PIN Code</th>
<td valign="top"><?php echo $locator['address'];?></td>
</tr>
<?php } ?>
</tbody></table>
</div>
<div class="cl"></div>
<?php } } else { ?>
<div class="fl" style="margin-top:55px;color:#000000;font: 13px/18px 'FSHumana-light',Arial,Helvetica,sans-serif;">-> Select details to view address</div>
<?php } ?>
<div class="cl"></div>
</div>
</div>
<div class="cl"> </div>
</div>
</div>
<!--footer top start here-->
<?php include_once("inc/footer-top.php"); ?>
<!--footer top end here-->
</section>
<!--section end here-->
<!--footer start here-->
<?php include_once("inc/footer.php"); ?>
<!--footer end here-->
</body>
</html>