<?php
include("../sessionreserved.php");
include("../../db.php");

if(empty($_REQUEST['activeuser']))
	$_REQUEST['activeuser'] = $_SESSION['user']['id'];
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Osservatorio Edile Biella - R.L.S.T. | Elenco visite</title>
<script language="javascript" src="../js/script.js"></script>
<script language="javascript" src="js/rlst.js"></script>

<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>

<div id="header"></div>
<div id="container">
	<div id="mainHeader" class="clearfix"><?php include("mainHeader.php");?></div>
	<?php include("mainMenu.php");?>
   
    <div id="mainContainer">
        <span class="mainContentTitle">Filtri visualizzazione
        </span>
        <div id="mainContent" class="clearfix">
                <form name="formFilter" action="statistiche.php" method="post" enctype="multipart/form-data" target="_blank">
                    <strong>Dal</strong><br />
                    giorno: <select name="dal_dd"><?php for($i=1;$i<=30;$i++) echo '<option value="'.str_pad($i,2,"0",STR_PAD_LEFT).'">'.$i.'</option>'; ?></select>
                    mese: <select name="dal_mm"><?php for($i=1;$i<=12;$i++) echo '<option value="'.str_pad($i,2,"0",STR_PAD_LEFT).'">'.$i.'</option>'; ?></select>
                    anno: <select name="dal_yyyy"><?php for($i=date("Y");$i>=2009;$i--) echo '<option value="'.$i.'">'.$i.'</option>'; ?></select>
                    <br /><br />
                    <strong>Al</strong><br />
                    giorno: <select name="al_dd">
					<?php 
						for($i=1;$i<=30;$i++){
							$i == date("d") ? $sel = ' selected="selected"' : $sel = '';
							echo '<option value="'.str_pad($i,2,"0",STR_PAD_LEFT).'"'.$sel.'>'.$i.'</option>'; 
						}
					?>
                    </select>
                    mese: <select name="al_mm">
					<?php 
						for($i=1;$i<=12;$i++){
							$i == date("m") ? $sel = ' selected="selected"' : $sel = '';
							echo '<option value="'.str_pad($i,2,"0",STR_PAD_LEFT).'"'.$sel.'>'.$i.'</option>'; 
						}
					?>
                    </select>
                    anno: <select name="al_yyyy"><?php for($i=date("Y");$i>=2009;$i--) echo '<option value="'.$i.'">'.$i.'</option>'; ?></select>
                	<br /><br />
                    <button type="submit">Visualizza</button>
                </form>
                <hr />
        </div>
    </div>
    
</div>

<div id="footer"></div>
</body>
</html>