Variabili dentro il file compose e alcuni fix

This commit is contained in:
2025-12-02 10:50:35 +01:00
parent 738811c0f3
commit 65d8c208bf
6 changed files with 124 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
<?php
session_start();
if (!isset($_SESSION['admin'])) { header("Location: login.php"); exit; }
else if (!defined(API_URL) || API_URL == "") { header("Location: index.php"); exit; }
include("../lib/db.php");
$message = "";
$messageType = "";

View File

@@ -30,7 +30,11 @@ if (!isset($_SESSION['admin'])) {
<a href="classes.php">Gestisci Classi</a>
<a href="subjects.php">Gestisci Materie</a>
<a href="timetable.php">Gestisci Orario</a>
<a href="importer.php" style="background: #28a745;">🔄 Importa Orario</a>
<?php
if (defined(API_URL) || API_URL != "") {
echo '<a href="importer.php" style="background: #28a745;">🔄 Importa Orario</a>';
}
?>
<?php
if ($_SESSION['auth_type'] === 'local') {
echo '<a href="password.php">Cambia Password</a>';