Beispiel #1
0
        </table>
    </div>
    	<div id="footer">
		<p>Design: Luka Cvrk - <a href="http://www.solucija.com" title="Free Web Templates">Solucija</a></p>
	</div>
	</div>		
</body>
</html>

<?php 
$sel_anno = "SELECT * FROM anni ORDER BY id_anno DESC LIMIT 1";
$res_anno = $db->executeQuery($sel_anno);
$anno = new AnnoScolastico($res_anno->fetch_assoc());
// calcolo del numero di queries
$num_classi = 34;
$first_day = format_date($anno->get_data_inizio_lezioni(), IT_DATE_STYLE, SQL_DATE_STYLE, "-");
$last_day = format_date($anno->get_data_termine_lezioni(), IT_DATE_STYLE, SQL_DATE_STYLE, "-");
$current_day = format_date($anno->get_data_inizio_lezioni(), IT_DATE_STYLE, SQL_DATE_STYLE, "-");
$days = 0;
while (strtotime($current_day) < strtotime($last_day)) {
    if (date("w", strtotime($current_day)) == "0") {
        // do nothing
    } else {
        $days++;
    }
    //print("$insert -> Inserito record per $current_day</br>");
    $current_day = date("Y-m-d", strtotime("{$current_day} +1 days"));
}
$queries = $num_classi * $days;
$num_al = $db->execute("SELECT COUNT(*) AS count FROM alunni");
$n_al = $num_al->fetch_assoc();