<?php
include("../../../functions.inc.php");
include("../functions.inc.php");
include("../../servizi/functions.inc.php");

dbConnect();
checkLogin('adm');
?>

<div>
    <div class="modal-d-title">Report pasti</div>
    <form class="form-horizontal" action="../report_pasti/" role="form" method="get" onSubmit="setTimeout('closeDialog()',500)">
    
    <div class="modal-body modal-body-diag">
        <div class="form-group">
            <div class="col-sm-6">
                <label class="control-label">Anno</label>
                <select class="form-control" name="yyyy">
                <?php
                for($i=date("Y")-1;$i<=date("Y")+1;$i++)
                    echo '<option value="'.$i.'"'. ($i == date("Y") ? ' selected' : '') .'>'.$i.'</option>';
                ?>
                </select>
            </div>
            <div class="col-sm-6">
                <label class="control-label">&nbsp;</label>
                <select class="form-control" name="solare">
                <option value="1">Solare</option>
                <option value="2">Scolastico</option>                
                </select>
            </div>
        </div>


        <div class="form-group">
            <div class="col-sm-6">
                <label class="control-label">Scuola</label>
                <select class="form-control" name="grp">
                <option value="">Tutte</option>
 				<?php
				foreach(get_gruppi('men') as $id=>$val)
					echo '<option value="'.$id.'">'.$val.'</option>';
				?>               
                </select>
            </div>
            <div class="col-sm-6">
                <label class="control-label">Insegnanti presenti</label>
                <input class="form-control" type="text" name="insegnanti" id="insegnanti" placeholder="0" value="">
            </div>
        </div>        



    </div>
    
    <div class="modal-footer">
        <button id="okButton" type="submit" class="btn btn-primary">OK</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">Chiudi</button>
    </div>
    
    </form>
</div>