changes, finishing later
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['admin'])) { header("Location: login.php"); exit; }
|
||||
include("../db.php");
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['name'])) {
|
||||
$name = $_POST['name'];
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
include("../db.php");
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$username = $_POST['username'];
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
include("../db.php");
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
if (!isset($_SESSION['admin']) || $_SESSION['auth_type'] != 'local') {
|
||||
header("Location: login.php");
|
||||
|
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['admin'])) { header("Location: login.php"); exit; }
|
||||
include("../db.php");
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['name'])) {
|
||||
$name = $_POST['name'];
|
||||
|
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
// if (!isset($_SESSION['admin'])) { header("Location: login.php"); exit; }
|
||||
include("../db.php");
|
||||
if (!isset($_SESSION['admin'])) { header("Location: login.php"); exit; }
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
// --- Recupera tutte le materie ---
|
||||
$subjects = [];
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
include("../db.php");
|
||||
include("../lib/db.php");
|
||||
include("../config/config.php");
|
||||
|
||||
if (!isset($_SESSION['admin']) || $_SESSION['auth_type'] != 'local' || $_SESSION['admin'] != 'admin') {
|
||||
header("Location: login.php");
|
||||
|
16
htdocs/config/config.php
Normal file
16
htdocs/config/config.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
// Impostazioni Database
|
||||
define('DB_HOST', 'db');
|
||||
define('DB_USER', 'orario');
|
||||
define('DB_PASS', 'orario');
|
||||
define('DB_NAME', 'school_timetable');
|
||||
// Impostazioni sito generali
|
||||
define('APP_NAME', 'Orario Scuola');
|
||||
define('YEAR', '2025/26');
|
||||
// Impostazioni autenticazione dashboard amministrativa
|
||||
define('AUTH_TYPE','local'); // Può essere keycloak o local (integrata)
|
||||
define('KEYCLOAK_DOMAIN','');
|
||||
define('KEYCLOAK_REALM','');
|
||||
define('KEYCLOAK_CLIENT_ID','');
|
||||
define('KEYCLOAK_CLIENT_SECRET','')
|
||||
?>
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
include("db.php");
|
||||
include("lib/db.php");
|
||||
include("config/config.php");
|
||||
$teacher = $_GET['teacher'];
|
||||
$days = ["Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"];
|
||||
$hours = [
|
||||
|
@@ -1,24 +1,25 @@
|
||||
<?php
|
||||
include("db.php");
|
||||
include("lib/db.php");
|
||||
include("config/config.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Orario - A.S. 2025/26</title>
|
||||
<title><?php echo APP_NAME; ?> - A.S. <?php echo YEAR; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="css/home.css">
|
||||
<link rel="stylesheet" href="css/navbar.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<div class="logo">Orario Scuola 2025/26</div>
|
||||
<div class="logo"><?php echo APP_NAME; ?> <?php echo YEAR; ?></div>
|
||||
<div class="links">
|
||||
<a href="index.php">Home</a>
|
||||
<a href="admin/index.php">Admin</a>
|
||||
<a href="https://git.vichingo455.freeddns.org/emmev-code/orario" target="_blank">Codice sorgente</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Orario - a.s. 2025/26</h1>
|
||||
<h1><?php echo APP_NAME; ?> - A.S. <?php echo YEAR; ?></h1>
|
||||
|
||||
<!-- Sezione Classi -->
|
||||
<h2>Classi</h2>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
include("db.php");
|
||||
include("lib/db.php");
|
||||
include("config/config.php");
|
||||
$room = $_GET['room']; // aula selezionata
|
||||
$days = ["Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"];
|
||||
$hours = [
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
include("db.php");
|
||||
include("lib/db.php");
|
||||
include("config/config.php");
|
||||
$class_id = intval($_GET['class_id']);
|
||||
$class = $conn->query("SELECT * FROM classes WHERE id=$class_id")->fetch_assoc();
|
||||
$days = ["Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"];
|
||||
|
Reference in New Issue
Block a user