Variabili dentro il file compose e alcuni fix
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -20,7 +20,7 @@ if (!defined('YEAR')) {
|
||||
define('YEAR', '2025/26'); // Anno Scolastico Corrente
|
||||
}
|
||||
if (!defined('API_URL')) {
|
||||
define('API_URL', 'http://localhost:3006/classe');
|
||||
define('API_URL', ''); // URL API di importazione, lascia vuoto per disabilitare. Esempio: http://localhost:3006/classe
|
||||
}
|
||||
if (!defined('DEV_MODE')) {
|
||||
define('DEV_MODE', false); // Modalita' di sviluppo: abilita messaggi di debug aggiuntivi. Imposta su false se sei in produzione
|
||||
|
||||
Reference in New Issue
Block a user