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.
		
		
		
		
		
			
		
			
				
					
					
						
							89 lines
						
					
					
						
							4.0 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							89 lines
						
					
					
						
							4.0 KiB
						
					
					
				| <br> | |
| 
 | |
| <?php | |
| if($_POST['go']){ | |
| 
 | |
| $q=mysqli_query($dbConn, "INSERT INTO farmacie VALUES(null,'".converti($_POST['nome'])."','".converti($_POST['descrizione'])."','".converti($_POST['indirizzo'])."', | |
| 		'".$_POST['comune']."','".$_POST['cap']."','".$_POST['asl']."','".$_POST['ambito']."','".converti($_POST['telefono'])."', | |
| 		'".converti($_POST['email'])."','".converti($_POST['r_indirizzo'])."','".converti($_POST['r_telefono'])."', | |
| 		'".$_POST['r_comune']."','".converti($_POST['r_messaggio'])."')"); | |
| 
 | |
| if($q){ | |
| @include 'res_ok.php'; | |
| }else{ | |
| @include 'res_ko.php'; | |
| } | |
| 
 | |
| 
 | |
| }else{ | |
| ?> | |
|  | |
| <form method="post"> | |
| <table border="0" cellspacing="2" cellpadding="2" width="750"> | |
| <tr><td align="left" valign="middle" class="title" colspan="4">  <b>Nuova farmacia</b></td></tr> | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Farmacia: </td><td width="275"><input type="text" name="nome" style="width: 275px"></td> | |
| <td width="150" valign="top" align="right" class="txt_lit_grey" rowspan="2">Descrizione: </td><td width="275" rowspan="2"><textarea name="descrizione" cols="40" rows="2" style="width: 275px"></textarea></td> | |
| </tr> | |
|  | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Indirizzo: </td><td width="275"><input type="text" name="indirizzo" style="width: 275px"></td></tr> | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Comune: </td><td width="275"><select name="comune" style="width: 275px"> | |
|  | |
| <?php | |
| $q=mysqli_query($dbConn, "SELECT * FROM comuni ORDER BY comune"); | |
| while($r=mysqli_fetch_array($q)){ | |
| echo "<option value=\"".$r['id']."\"> ".$r['comune']."</option>\n"; | |
| } | |
| ?> | |
| </select> | |
| </td><td width="150" valign="top" align="right" class="txt_lit_grey">CAP: </td><td width="275" align="left"><input type="text" name="cap" style="width: 80px"></td> | |
| </tr> | |
|  | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">ASL: </td><td width="275"><select name="asl" style="width: 275px"> | |
| <option value="A.S.L. Salerno 1">A.S.L. Salerno 1</option> | |
| <option value="A.S.L. Salerno 2">A.S.L. Salerno 2</option> | |
| <option value="A.S.L. Salerno 3">A.S.L. Salerno 3</option> | |
| </select> | |
| </td><td width="150" valign="top" align="right" class="txt_lit_grey">Ambito: </td><td width="275"><select name="ambito" style="width: 275px"> | |
|  | |
| <?php | |
| $q=mysqli_query($dbConn, "SELECT * FROM ambiti ORDER BY descrizione"); | |
| while($r=mysqli_fetch_array($q)){ | |
| echo "<option value=\"".$r['id']."\"> ".$r['descrizione']."</option>\n"; | |
| } | |
| ?> | |
| </select></td> | |
| </tr> | |
|  | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Telefono: </td><td width="275"><input type="text" name="telefono" style="width: 275px"></td> | |
| <td width="150" valign="top" align="right" class="txt_lit_grey">E-Mail: </td><td width="275"><input type="text" name="email" style="width: 275px"></td> | |
| </tr> | |
|  | |
|  | |
| <tr><td align="center" valign="top" colspan="4"> </td></tr> | |
| <tr><td align="left" valign="middle" class="title" colspan="4">  <b>Reperibilità</b></td></tr> | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Indirizzo: </td><td width="275"><input type="text" name="r_indirizzo" style="width: 275px"></td> | |
| <td width="150" valign="top" align="right" class="txt_lit_grey">Telefono: </td><td width="275"><input type="text" name="r_telefono" style="width: 275px"></td> | |
| </tr> | |
| <tr><td width="150" valign="top" align="right" class="txt_lit_grey">Comune: </td><td width="275"><select name="r_comune" style="width: 275px"> | |
|  | |
| <?php | |
| $q=mysqli_query($dbConn, "SELECT * FROM comuni ORDER BY comune"); | |
| while($r=mysqli_fetch_array($q)){ | |
| echo "<option value=\"".$r['id']."\"> ".$r['comune']."</option>\n"; | |
| } | |
| ?> | |
| </select></td> | |
| <td width="150" valign="top" align="right" class="txt_lit_grey">Messaggio: </td><td width="275"><input type="text" name="r_messaggio" style="width: 275px"></td> | |
| </tr> | |
|  | |
| <tr><td align="center" valign="top" colspan="4"> </td></tr> | |
| <tr><td width="750" align="right" colspan="4"><input type="submit" name="go" value="  Salva farmacia  " class="button"></td></tr> | |
| <tr><td align="center" valign="top" colspan="4"> </td></tr> | |
|  | |
| </table> | |
| </form> | |
|  | |
|  | |
| <?php | |
| } | |
| ?>
 |