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:
committed by
giandonato.inverso@edempg.it
parent
12e358b87c
commit
a2ce4b38b6
@@ -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';
|
||||
?>
|
||||
Reference in New Issue
Block a user