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.
57 lines
1.8 KiB
57 lines
1.8 KiB
|
|
<div class="row pharmacy">
|
|
|
|
<div class="col-12">
|
|
<div class="section-title">Ricerca farmacie</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-12">
|
|
<div class="sheet-box p-4">
|
|
<form method="post" action="<?php echo $BASE_URL;?>/sheets/pharmacy/list">
|
|
|
|
<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 class="col-12 p-0 admin-list">
|
|
|
|
<?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)){
|
|
$cnt++;
|
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white";
|
|
echo "<div class=\"admin-list-item $bg\">
|
|
<span>".$r['pharmacy']." - ".$r['address']." - ".$r['city']."</span>
|
|
<div class=\"right\">
|
|
<a href=\"$BASE_URL/sheets/pharmacy/mod/".$r['id']."\" class=\"button button-small\"><i class=\"fa fa-edit\"></i> Modifica</a>
|
|
<a href=\"$BASE_URL/sheets/pharmacy/del/".$r['id']."\" class=\"button button-small\"><i class=\"fa fa-trash\"></i> Elimina</a>
|
|
</div></div>";
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|