* @copyright Copyright (c) 2020-2021 * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code * @version 1.0 */ session_start(); require_once 'config/config.php'; require_once BASE_PATH . '/includes/auth_validate.php'; // Dynamic qrcode class require_once BASE_PATH . '/lib/Static_Qrcode/Static_Qrcode.php'; $static_qrcode = new Static_Qrcode(); // Get DB instance. i.e instance of MYSQLiDB Library $db = getDbInstance(); $select = array('id', 'filename', 'type', 'content', 'qrcode', 'created_at', 'updated_at'); // Search and order php code $search_fields = array('filename', 'type', 'content'); require_once BASE_PATH . '/includes/search_order.php'; // Get current page $page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? 1; // Set pagination limit $db->pageLimit = 15; // Get result of the query $rows = $db->arraybuilder()->paginate('static_qrcodes', $page, $select); $total_pages = $db->totalPages; ?>