Files
orario/README.md
2025-10-10 11:03:16 +00:00

3.7 KiB

Orario Scuola

Una piattaforma web per visualizzare gli orari scolastici delle classi, degli insegnanti e dei vari laboratori (se presenti)

Requisiti

  • Server web (consigliati nginx o apache2 per Linux, XAMPP per Windows)
  • PHP 8.0 o successivo (configurato nel tuo server web)
  • Composer
  • MySQL ultima versione

Installazione

  1. Clona la repository e copia la cartella htdocs in una cartella accessibile dal server web
  • Esempio (Debian):
git clone https://git.vichingo455.freeddns.org/emmev-code/orario
cp -r orario/htdocs/* /var/www/html/
  1. Installa composer e le estensioni di php
  • Debian:
sudo apt install -y composer php-cli curl php-mysql php-curl php-mbstring php-xml php-zip
  1. Installa le dipendenze del pannello d'amministrazione
  • Debian:
cd /var/www/orario/admin
composer install
  • Windows (con XAMPP):
cd C:\xampp\htdocs\admin
composer install
  1. (opzionale) Genera una password hashata
  • Debian
cd /var/www/orario/utils
php generate_hash.php <password>
  • Windows:
cd C:\xampp\htdocs\utils
C:\xampp\php\php.exe generate_hash.php <password>
  • Modifica quindi questa linea nel file schema.sql, sostituendo l'hash predefinito con quello generato prima:
VALUES ('admin', '$2y$10$IS9v8CJNJnRXslV1NWDSquAjJ0GgU1sm6spBmGp6mjTLiNApfGcQi'); 
  1. Importa il file schema.sql nel tuo database MySQL
  2. Modifica il file db.php cambiando l'host, il nome utente e la password (necessari per la connessione al database MySQL)
  • Esempio:
$host = "localhost";
$user = "utente";
$pass = "password123";
  1. Modifica admin/login.php e admin/logout.php con i dati di un'istanza keycloak. In caso tu voglia usare l'autenticazione via nome utente e password (e non keycloak), cancella quei due file e rinomina admin/login.php.backup in login.php e admin/logout.php.backup in logout.php
  • Esempio (login.php con keycloak):
$oidc = new OpenIDConnectClient(
    'https://keycloak.local/realms/master/',
    'orario', // Client ID Keycloak
    'abcdefghijklmnop' // Client secret Keycloak
);
$oidc->setRedirectURL('https://orario.local/admin/login.php'); // orario.local è il dominio base di questa piattaforma
  • Esempio (logout.php con keycloak):
header('Location: https://keycloak.local/realms/master/protocol/openid-connect/logout?post_logout_redirect_uri=https://orario.local&client_id=orario');
  1. Apri http://localhost e goditi il sito

Reporting an issue

The issues reporting has been moved from GitHub to Bugzilla. Click here to go to Bugzilla.

Licenza

Orario Scuola, Copyright (C) 2025 EmmeV.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.