Preview: ajax-store-data.php
Size: 1.60 KB
/home/justbyquicklly-old/justbyquicklly/www/ajax-store-data.php
<?php
include("include/config.php");
$searchtxt = $_POST['searchtxt'];
$storeArr = array();
if(!empty($searchtxt))
$sqlStore = mysqli_query($GLOBALS['conn'], "SELECT * FROM tbl_business_stores where status = 1 and (store_location like '%$searchtxt%' OR store_name like '%$searchtxt%') order by sort_order ");
else
$sqlStore = mysqli_query($GLOBALS['conn'], "SELECT * FROM tbl_business_stores where status = 1 order by sort_order ");
$firstStore = '';
if(mysqli_num_rows($sqlStore) > 0)
{
while($stores = mysqli_fetch_assoc($sqlStore))
{
if($firstStore == '')
$firstStore = $stores['store_location'];
?>
<div class="col-md-12 storeaddress" style="margin-left: 22px;">
<input type="hidden" id="address_<?=$stores['id']?>" value="<?=$stores['store_location'];?>">
<h4><a href="javascript:void(0);" onclick="return get_location('<?=$stores['id']?>')"><?=$stores['store_name']; ?></a></h4>
<?php if(!empty($stores['store_type'])) { ?><p><?=$stores['store_type']; ?></p> <?php } ?>
<p><?=$stores['store_location']; ?></p>
<?php if(!empty($stores['open_time']) && !empty($stores['close_time'])) { ?>
<p><strong>Open: </strong><?=$stores['open_time']; ?> <strong>Close: </strong><?=$stores['close_time']; ?></p>
<?php } ?>
<hr style="border-bottom:1px solid #E4E4E4">
</div>
<?php }
?><input type="hidden" id="location_address" value="<?php echo $firstStore; ?>"><?php
}
else{
?><div class="col-md-12" style="padding-top: 80px;
text-align: center;
min-height: 300px;
font: normal normal 500 18px/25px Poppins;
letter-spacing: 0px;
color: #000000;">No Stores Found</div>
<?php
}
?>
Directory Contents
Dirs: 12 × Files: 58