bug fix
This commit is contained in:
committed by
giandonato.inverso@edempg.it
parent
57930cf9db
commit
0360176490
+2
-2
@@ -30,7 +30,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
foreach ($params as $param) {
|
||||
$row = $db->where('id', $param);
|
||||
$row = $db->getOne("{$type}_qrcodes");
|
||||
$files[] = SAVED_QRCODE_FOLDER . $row['qrcode'];
|
||||
@$files[] = SAVED_QRCODE_FOLDER . $row['qrcode'];
|
||||
}
|
||||
|
||||
$zip = new ZipArchive();
|
||||
@@ -41,7 +41,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$zip->open($relative_dir, ZipArchive::CREATE);
|
||||
|
||||
foreach ($files as $file) {
|
||||
$download_file = file_get_contents($file, true);
|
||||
$download_file = @file_get_contents($file, true);
|
||||
$zip->addFromString(basename($file), $download_file);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@ error_reporting(E_ALL);
|
||||
ini_set('display_errors', 'On');
|
||||
define('BASE_PATH', dirname(dirname(__FILE__)));
|
||||
define('CURRENT_PAGE', basename($_SERVER['REQUEST_URI']));
|
||||
define('SCRIPT_NAME', ltrim(dirname($_SERVER['SCRIPT_NAME']), '/'));
|
||||
|
||||
if(SCRIPT_NAME === "")
|
||||
define('SCRIPT_FOLDER', "");
|
||||
else
|
||||
define('SCRIPT_FOLDER', "/" . SCRIPT_NAME);
|
||||
|
||||
require_once BASE_PATH . '/lib/MysqliDb/MysqliDb.php';
|
||||
require_once BASE_PATH . '/helpers/helpers.php';
|
||||
@@ -14,7 +20,7 @@ require_once BASE_PATH . '/helpers/helpers.php';
|
||||
//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/');
|
||||
define('SAVED_QRCODE_URL', base_url(). SCRIPT_FOLDER .'/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=');
|
||||
|
||||
Vendored
+1
-1
@@ -459,7 +459,7 @@
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: window.location.origin + '/bulk_action.php',
|
||||
url: './bulk_action.php',
|
||||
method: "POST",
|
||||
data: JSON.stringify(data),
|
||||
dataType: "json",
|
||||
|
||||
@@ -120,5 +120,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id_owner" value="<?php echo $_SESSION["user_id"];?>"/>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id_owner" value="<?php echo $_SESSION["user_id"];?>"/>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id_owner" value="<?php echo $_SESSION["user_id"];?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="id" value="<?php echo $static_qrcode['id'];?>"/>
|
||||
|
||||
@@ -104,5 +104,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id_owner" value="<?php echo $_SESSION["user_id"];?>"/>
|
||||
<?php } ?>
|
||||
<br>
|
||||
@@ -9,7 +9,7 @@
|
||||
<strong>Copyright © <?php echo date("Y");?> <a href="#">PHP Qrcode Generator</a> - </strong>
|
||||
All rights reserved by Giandonato Inverso.
|
||||
<div class="float-right d-none d-sm-inline-block">
|
||||
<b>Version</b> 2.2.0
|
||||
<b>Version</b> 2.2.1
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ $numScan = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes", "sum(scan) as numScan"
|
||||
|
||||
//Get the number of DYNAMIC qr code created in 7 days and total scan
|
||||
if($_SESSION['type'] !== 'super')
|
||||
$createdQrcode_dynamic = $db->query("select `created_at`, `scan` from " . DATABASE_PREFIX . "dynamic_qrcodes where `created_at` > curdate()-7 AND (`id_owner`=" . $_SESSION['user_id'] . " OR `id_owner` IS NULL);");
|
||||
$createdQrcode_dynamic = $db->query("select `created_at`, `scan` from " . DATABASE_PREFIX . "dynamic_qrcodes where `created_at` > curdate()-7 AND (`id_owner`= " . $_SESSION['user_id'] . " OR `id_owner` IS NULL);");
|
||||
else
|
||||
$createdQrcode_dynamic = $db->query("select `created_at`, `scan` from ".DATABASE_PREFIX."dynamic_qrcodes where `created_at` > curdate()-7;");
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ if (isset($_COOKIE['series_id']) && isset($_COOKIE['remember_token']))
|
||||
}
|
||||
|
||||
$_SESSION['user_logged_in'] = TRUE;
|
||||
$_SESSION['user_id'] = $row['id'];
|
||||
$_SESSION['type'] = $row['type'];
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user