You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.8 KiB
59 lines
1.8 KiB
|
|
<div class="row pharmacy">
|
|
|
|
<div class="col-12">
|
|
<div class="section-title">Ricerca farmacie</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-12 col-sm-8 my-4 mx-auto text-center">
|
|
<form method="post" action="<?php echo $BASE_URL;?>/farmacie/find">
|
|
|
|
<div class="row font-14 font-bold">
|
|
<div class="col-12 col-sm-3">
|
|
<select name="type" class="input">
|
|
<option value="city">Comune</option>
|
|
<option value="pharmacy">Farmacia</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col">
|
|
<input type="text" name="q" class="input">
|
|
</div>
|
|
<div class="col-auto">
|
|
<button type="submit"><i class="fa fa-search"></i> Cerca </button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div class="col-12 text-center">
|
|
<a href="<?php echo $BASE_URL."/XLS_export.php?db=pharmacy";?>">
|
|
<button>Scarica in formato .XLS</button>
|
|
</a>
|
|
</div>
|
|
|
|
|
|
<div class="col-12 col-sm-8 my-5 mx-auto results">
|
|
|
|
<?php
|
|
|
|
$query = "SELECT * FROM pharmacy WHERE ".$_POST['type']." LIKE '%".$_POST['q']."%' ORDER BY ".$_POST['type']."";
|
|
$q = mysqli_query($conn, $query);
|
|
|
|
while($r = mysqli_fetch_array($q)){
|
|
echo "<div class=\"item\"><i class=\"fa fa-angle-right\"></i> <strong>".$r['pharmacy']."</strong>
|
|
<p class=\"m-2 ml-4\"><a href=\"https://www.google.com/maps/search/?api=1&query=Farmacia ".$r['pharmacy']." - ".$r['city']." (SA) - ".$r['address']."\" target=\"_black\"> ".$r['address']." - ".$r['city']." <i class=\"fa fa-compass\"></i></a></p>
|
|
<p class=\"m-2 ml-4\"> Telefono: ".$r['phone']."</p></div>";
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|