<div class="yellow" id="choose"> <div class="container"> <h1>Corsi disabilitati</h1> <table class="table table-borderless" id="blocked"> <thead> <tr><th>Corso</th><th>Numero</th><th>Professore</th><th>Voti</th></tr> </thead> <tbody>'; if ($results != null) { foreach ($results as $result) { if ($result["stato"] == 1) { echo ' <tr> <td> <section'; if (isAdminUserAutenticate() && $scuola != $result["scuola"]) { echo ' class="blue"'; } echo '> <h3>' . $result["nome"] . ' <a href="' . $dati['info']['root'] . 'corso/' . $result["id"] . '"><small>Approfondisci <i class="fa fa-chevron-right"></i></small></a></h3> <span class="hidden" id="value">' . $result["id"] . '</span> <p><strong>Orario: <span id="orario">' . orario($result["quando"]) . '</span></strong></p> <p>Aule: ' . $result["aule"] . '</p> <p id="descrizione">' . $result["descrizione"] . '</p> <p><strong>Creato da '; if (ricerca($utenti, $result["creatore"]) != -1) { echo $utenti[ricerca($utenti, $result["creatore"])]["nome"]; } echo '</strong></p>'; if ($scuola != $result["scuola"]) { echo '
$app->get('/felpe', function () use($dati, $app) { $app->render('admin/felpe.php', array('dati' => $dati)); })->name('felpe'); $app->get('/barcode', function () use($dati, $app) { $app->response->headers->set('Content-Type', 'image/gif'); $app->render('barcode/gif.php', array('dati' => $dati, 'id' => $dati['user'])); }); $app->get('/barcode/:id', function ($id) use($dati, $app) { $app->response->headers->set('Content-Type', 'image/gif'); $app->render('barcode/gif.php', array('dati' => $dati, 'id' => $id)); }); $app->get('/barcode/:id/huge', function ($id) use($dati, $app) { $app->response->headers->set('Content-Type', 'image/gif'); $app->render('barcode/gif.php', array('dati' => $dati, 'id' => $id, 'huge' => true)); }); if (isAdminUserAutenticate()) { if ($dati['sezioni']['forum'] && permesso("forum")) { /* Forum */ $app->get('/post', function () use($dati, $app) { $app->render('forum/posts.php', array('dati' => $dati)); }); $app->get('/posts/:id/tutti', function ($id) use($dati, $app) { $app->render('forum/posts.php', array('dati' => $dati, 'articolo' => $id)); }); } /* Amministrazione */ $app->get('/admin', function () use($dati, $app) { $app->render('admin/index.php', array('dati' => $dati)); }); $app->map('/aggiorna', function () use($dati, $app) { $app->render('admin/aggiorna.php', array('dati' => $dati));
/** * Esegue il logout. */ function logout() { if (isUserAutenticate()) { if (isAdminUserAutenticate()) { $_SESSION['loggedAsAdmin'] = ""; unset($_SESSION['loggedAsAdmin']); } $_SESSION['username'] = ""; $_SESSION['loggedin'] = ""; unset($_SESSION['loggedin']); unset($_SESSION['username']); session_unset(); session_destroy(); } }