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.
110 lines
4.6 KiB
110 lines
4.6 KiB
<div class="row">
|
|
<div class="col-12">
|
|
<div class="section-title">Modifica farmacia</div>
|
|
</div>
|
|
<div class="col-12">
|
|
|
|
<div class="sheet-box p-4">
|
|
|
|
<?php
|
|
if($_POST['go']){
|
|
|
|
$q=mysqli_query($conn, "UPDATE pharmacy SET pharmacy='".addslashes(trim(strtoupper($_POST['pharmacy'])))."',
|
|
city='".addslashes(trim(strtoupper($_POST['city'])))."',
|
|
address='".addslashes(trim($_POST['address']))."', phone='".addslashes(trim($_POST['phone']))."',
|
|
web='".addslashes(trim($_POST['web']))."', email='".addslashes(trim($_POST['email']))."',
|
|
email_cert='".addslashes(trim($_POST['email_cert']))."', type='".$_POST['type']."'
|
|
WHERE id=".trim($getQ[3])."");
|
|
|
|
echo '<div class="col-10 text-center mx-auto my-5">
|
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p>
|
|
Farmacia modificata correttamente!
|
|
</div>';
|
|
|
|
}else{
|
|
|
|
if($getQ[3]){
|
|
|
|
$q=mysqli_query($conn, "SELECT * FROM pharmacy WHERE id = ".trim($getQ[3]));
|
|
$r=mysqli_fetch_array($q);
|
|
?>
|
|
<form method="post">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Farmacia</span>
|
|
<input type="text" name="pharmacy" value="<?= $r['pharmacy'];?>">
|
|
</div>
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Comune</span>
|
|
<input type="text" name="city" value="<?= $r['city'];?>">
|
|
</div>
|
|
<div class="col-12">
|
|
<span class="font-12">Indirizzo</span>
|
|
<input type="text" name="address" value="<?= $r['address'];?>">
|
|
</div>
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Telefono</span>
|
|
<input type="text" name="phone" value="<?= $r['phone'];?>">
|
|
</div>
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Sito internet</span>
|
|
<input type="text" name="web" value="<?= $r['web'];?>">
|
|
</div>
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Email</span>
|
|
<input type="text" name="email" value="<?= $r['email'];?>">
|
|
</div>
|
|
<div class="col-12 col-sm-6">
|
|
<span class="font-12">Email certificata (PEC)</span>
|
|
<input type="text" name="email_cert" value="<?= $r['email_cert'];?>">
|
|
</div>
|
|
|
|
<div class="col-3 col-sm-3">
|
|
<span class="font-12">Tipologia</span>
|
|
<select name="type">
|
|
<option value="Rurale" <?= $r['type']=="Rurale" ? "Selected" : "";?>>Rurale</option>
|
|
<option value="Urbana" <?= $r['type']=="Urbana" ? "Selected" : "";?>>Urbana</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-12 text-right">
|
|
<button type="submit" name="go" value="1">Modifica farmacia</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<?php
|
|
}else{
|
|
|
|
?>
|
|
<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>
|
|
|
|
<?php
|
|
|
|
}
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|