busyTimeout(5000); // Get featured items (latest 4 by timestamp, not ID) $feature = $db->query(" SELECT books.id AS id, books.title AS title, authors.name AS author FROM books INNER JOIN books_authors_link ON books.id = books_authors_link.book INNER JOIN authors ON authors.id = books_authors_link.author ORDER BY books.timestamp DESC LIMIT 4 "); if (!$feature) { throw new Exception('Failed to fetch featured items'); } // Get types for menu $types = $db->query(" SELECT value FROM custom_column_1 ORDER BY value ASC "); if (!$types) { throw new Exception('Failed to fetch types'); } } catch (Exception $e) { error_log('Database error in index.php: ' . $e->getMessage()); // Display user-friendly error $error_message = 'Unable to load content. Please try again later.'; } /** * Safely escape output for HTML */ function esc_html($text) { return htmlspecialchars($text ?? '', ENT_QUOTES, 'UTF-8'); } /** * Safely escape output for HTML attributes */ function esc_attr($text) { return htmlspecialchars($text ?? '', ENT_QUOTES, 'UTF-8'); } ?> <?php echo esc_html($SiteName . ': ' . $SubName); ?>
Close
Infopump Avatar

About the Project

Infopump

A bibliographic management and display system.
More info


A free, open source project from:
The L0WL1F3 Podcast
Neon Dystopia
Cyberpunk Librarian


Repo

Recent Additions

    fetchArray()) { $row_value = $row['value']; $row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8"); echo '
  • ' . esc_html($row_titlecase) . '
  • '; } } ?>

Search

fetchArray()) { $row_id = (int)$row['id']; $row_title = $row['title']; $row_author = $row['author']; // Check if image exists, otherwise use placeholder $image_path = "images/{$row_id}.jpg"; if (!file_exists($image_path)) { $image_path = "images/placeholder.jpg"; } echo ''; } } else { echo '

No items found.

'; } ?>
close(); } ?>