eliminazione file superflui, spostamento file read.php all'interno del progetto, aggiunta astrazione classe Qrcode, miglioramento download bulk, refactoring generale

Signed-off-by: giandonato.inverso@edempg.it <giandonato.inverso@studenti.unimi.it>
This commit is contained in:
Giandonato Inverso
2023-10-16 01:41:27 +02:00
committed by giandonato.inverso@edempg.it
parent 995272fa8d
commit 9a0a2c7928
516 changed files with 1434 additions and 17640 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
//Note: This file should be included first in every php page.
require_once ('environment.php');
error_reporting(E_ALL);
ini_set('display_errors', 'On');
define('BASE_PATH', dirname(dirname(__FILE__)));
define('CURRENT_PAGE', basename($_SERVER['REQUEST_URI']));
require_once BASE_PATH . '/lib/MysqliDb/MysqliDb.php';
require_once BASE_PATH . '/helpers/helpers.php';
/* SAVED QR CODES */
//You can change the folder where the qr code will be saved
define('SAVED_QRCODE_FOLDER', './saved_qrcode/');
define('SAVED_QRCODE_DIRECTORY', BASE_PATH.'/saved_qrcode/');
define('SAVED_QRCODE_URL', base_url().'/saved_qrcode/');
//You can change the page name for the redirect and the search parameter (the default is "id")
define('READ_PATH', base_url().'/read.php?id=');
/**
* Get instance of DB object
*/
function getDbInstance() {
return new MysqliDb (Array (
'host' => DATABASE_HOST,
'username' => DATABASE_USER,
'password' => DATABASE_PASSWORD,
'db'=> DATABASE_NAME,
'port' => DATABASE_PORT,
'prefix' => DATABASE_PREFIX,
'charset' => DATABASE_CHARSET));
}