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.
 
 
 
 

188 lines
5.4 KiB

<?php
session_start();
@include 'cgi-bin/conn.conn';
@include 'cgi-bin/functions';
$dbConn=mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb);
$GLOBALS['getQ'][0]="home";
$GLOBALS['getQ'][1]="";
if(@$_GET['q']){
$GLOBALS['getQ']=explode("/",$_GET['q']);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>FarmaTurni</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="FarmaTurni">
<meta name="author" content="Token di Carmine De Rosa">
<meta name="generator" content="Kate">
<meta name="keywords" content="FarmaTurni">
<base href="https://<?php echo $_SERVER["HTTP_HOST"];?>/turni/">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/text.css">
<link rel="stylesheet" href="css/forms.css">
<link rel="stylesheet" href="css/calendar.css">
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen">
<script language="javascript" type="text/javascript" src="jsc/script.js"></script>
<script language="javascript" type="text/javascript" src="jsc/jquery.js"></script>
<script language="javascript" type="text/javascript" src="jsc/thickbox.js"></script>
</head><body>
<center>
<!--
<table border="0" cellspacing="0" cellpadding="0" width="980">
<tr><td align="center" valign="middle" height="100" bgcolor="#6DA966">
Header - FarmaTurni</td></tr><tr><td height="1"></td></tr></table>
-->
<img src="img/header850.png" border="0">
<table border="0" cellspacing="0" cellpadding="0" width="850" bgcolor="#ffffff">
<tr><td align="left" valign="top"><!-- bgcolor="#E3EED7"-->
<form method="post">
<br><br><br>
<table border="0" cellspacing="4" cellpadding="2" width="750" align="center" bgcolor="#ffffff" class="border radius">
<tr><td align="left" valign="middle" class="title" colspan="3">&nbsp; <b>Ricerca farmacia di turno</b></td></tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr><td width="100" valign="top" align="right" class="txt_mid_grey">Comune:</td>
<td align="left"><select name="comune" style="width: 100%">
<?php
$qc=mysqli_query($dbConn,"SELECT * FROM comuni ORDER BY comune");
while($rc=mysqli_fetch_array($qc)){
echo "<option value=\"".$rc['id']."\" ";
if($rc['id']==$_POST['comune']){echo "selected";}
echo "> ".$rc['comune']."</option>\n";
}
?>
</select></td>
<td align="center" valign="middle" rowspan="3"><input type="submit" class="button" value=" Ricerca farmacia " style="height: 80px" name="go"></td>
</tr>
<tr><td width="100" valign="top" align="right" class="txt_mid_grey">Data:</td>
<td align="left"><select name="giorno">
<?php
for($i=1;$i<=31;$i++){
echo "<option value=\"".str_pad($i, 2, 0, STR_PAD_LEFT)."\" ";
if(!@$_POST['giorno']){
if(str_pad($i, 2, 0, STR_PAD_LEFT)==date("d")){echo "selected";}
}else{
if(@$_POST['giorno']==str_pad($i, 2, 0, STR_PAD_LEFT)){echo "selected";}
}
echo ">$i</option>\n";
}
?>
</select>&nbsp;
<select name="mese">
<?php
$mesi_arr=array('','Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre');
for($i=1;$i<=12;$i++){
echo "<option value=\"".str_pad($i, 2, 0, STR_PAD_LEFT)."\" ";
if(!@$_POST['mese']){
if(str_pad($i, 2, 0, STR_PAD_LEFT)==date("m")){echo "selected";}
}else{
if(@$_POST['mese']==str_pad($i, 2, 0, STR_PAD_LEFT)){echo "selected";}
}
echo ">".$mesi_arr[$i]."</option>\n";
}
?>
</select>&nbsp;<select name="anno">
<?php
for($i=date("Y");$i<=(date("Y")+1);$i++){
echo "<option value=\"$i\" ";
if(!@$_POST['anno']){
if(str_pad($i, 2, 0, STR_PAD_LEFT)==date("Y")){echo "selected";}
}else{
if(@$_POST['anno']==str_pad($i, 2, 0, STR_PAD_LEFT)){echo "selected";}
}
echo ">$i</option>\n";
}
?>
</select>&nbsp;</td></tr>
<tr><td width="100" valign="top" align="right" class="txt_mid_grey">Ora:</td>
<td align="left"><select name="ora">
<?php
for($i=1;$i<=24;$i++){
echo "<option value=\"".str_pad($i, 2, 0, STR_PAD_LEFT)."\" ";
if(!@$_POST['ora']){
if(str_pad($i, 2, 0, STR_PAD_LEFT)==date("H")){echo "selected";}
}else{
if(@$_POST['ora']==str_pad($i, 2, 0, STR_PAD_LEFT)){echo "selected";}
}
echo ">".str_pad($i, 2, 0, STR_PAD_LEFT)."</option>\n";
}
?>
</select>&nbsp;:&nbsp;<select name="minuti">
<?php
for($i=0;$i<=59;$i++){
echo "<option value=\"".str_pad($i, 2, 0, STR_PAD_LEFT)."\" ";
if(!@$_POST['minuti']){
if(str_pad($i, 2, 0, STR_PAD_LEFT)==date("i")){echo "selected";}
}else{
if(@$_POST['minuti']==str_pad($i, 2, 0, STR_PAD_LEFT)){echo "selected";}
}
echo ">".str_pad($i, 2, 0, STR_PAD_LEFT)."</option>\n";
}
?>
</select>&nbsp;</td></tr>
<tr><td colspan="3">&nbsp;<br><br></td></tr>
</table>
</form>
<br>
<?php
if($_POST['go']){
@include 'result.php';
}
?>
<br><br>
</td></tr></table>
<table border="0" cellspacing="0" cellpadding="0" width="850">
<tr><td align="center" valign="middle" height="10" bgcolor="#6DA966" colspan="2">
</td></tr><tr><td align="left" valign="middle" height="25" class="txt_lit_grey">
Aggiornamento dei contenuti a cura dell'Ordine dei Farmacisti di della Provincia di Salerno</td>
<td align="right" valign="middle" height="25" class="txt_lit_grey">
Powered by <a href="http://www.tokensys.it" class="txt_lit_grey" target="_blank"><b>Token</b></a>
</td></tr></table>
</center>
</body>
</html>
<?php
mysqli_close($dbConn);
?>