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 12e358b87c
commit a2ce4b38b6
516 changed files with 1434 additions and 17640 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
include 'config/config.php';
if($_SERVER["REQUEST_METHOD"] !== "GET" || !isset($_GET['id']))
die("Method not allowed. Check id parameter");
$db = getDbInstance();
$db->where("identifier", $_GET['id']);
$qrcode = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes");
$data = array (
'scan' => $db->inc(1)
);
$db->where("identifier", $_GET['id']);
$db->update (DATABASE_PREFIX.'dynamic_qrcodes', $data);
if($qrcode['state'] == 'enable'){
echo '<meta http-equiv="refresh" content="0; URL='.$qrcode['link'].'" />';
echo 'Loading...'; // You can include a custom page to display during the redirect
}
else
echo 'Disabled link';
?>