Updated about.php

This commit is contained in:
2025-10-08 16:11:53 -05:00
parent 0830311340
commit 441e61fb50
2 changed files with 311 additions and 45 deletions

103
about.php
View File

@@ -1,14 +1,30 @@
<?php
/**
* About Page
* Displays information about the Infopump project
*/
include_once "settings.php";
// Set up Calibre database connection
$db = new SQLite3('metadata.sqlite');
// -------------------- BEGIN DATABASE QUERIES --------------------
$types = $db->query("SELECT
value
FROM custom_column_1
ORDER BY value ASC");
// Initialize variables
$types = null;
try {
// Set up Calibre database connection
$db = new SQLite3('metadata.sqlite', SQLITE3_OPEN_READONLY);
$db->enableExceptions(true);
// Fetch types for menu - using prepared statement for consistency
$stmt = $db->prepare("SELECT value FROM custom_column_1 ORDER BY value ASC");
$types = $stmt->execute();
} catch (Exception $e) {
error_log("Database error in about.php: " . $e->getMessage());
// Continue without types menu if database fails
}
?>
@@ -21,9 +37,9 @@ ORDER BY value ASC");
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>About Infopump</title>
<title><?php echo $SiteName.': '.$SubName;?></title>
<title><?php echo htmlspecialchars($SiteName . ': ' . $SubName, ENT_QUOTES, 'UTF-8'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content=<?php echo '"About '.$SiteName.' - '.$SubName.'" />';?>
<meta name="description" content="About <?php echo htmlspecialchars($SiteName . ' - ' . $SubName, ENT_QUOTES, 'UTF-8'); ?>" />
<meta name="keywords" content="free software, open source, bibliography, cyberpunk, books, media, movies, video games" />
<meta name="author" content="Daniel Messer" />
@@ -42,38 +58,28 @@ ORDER BY value ASC");
-->
<!-- Facebook and Twitter integration -->
<meta property="og:title" content=<?php echo '"About '.$SiteName.'" />';?>
<meta property="og:image" content=<?php echo '"'.$SiteURL.'/images/og-site-avatar.jpg" />';?>
<meta property="og:url" content=<?php echo '"'.$SiteURL.'" />';?>
<meta property="og:site_name" content=<?php echo '"'.$SiteName.' - '.$SubName.'" />';?>
<meta property="og:description" content=<?php echo '"'.$SubName.'" />';?>
<meta name="twitter:title" content=<?php echo '"About '.$SiteName.' - '.$SubName.'" />';?>
<meta name="twitter:image" content=<?php echo '"'.$SiteURL.'/images/og-site-avatar.jpg" />';?>
<meta name="twitter:url" content=<?php echo '"'.$SiteURL.'" />';?>
<meta name="twitter:card" content="summary" />
<meta property="og:title" content="About <?php echo htmlspecialchars($SiteName, ENT_QUOTES, 'UTF-8'); ?>" />
<meta property="og:image" content="<?php echo htmlspecialchars($SiteURL, ENT_QUOTES, 'UTF-8'); ?>/images/og-site-avatar.jpg" />
<meta property="og:url" content="<?php echo htmlspecialchars($SiteURL, ENT_QUOTES, 'UTF-8'); ?>" />
<meta property="og:site_name" content="<?php echo htmlspecialchars($SiteName . ' - ' . $SubName, ENT_QUOTES, 'UTF-8'); ?>" />
<meta property="og:description" content="<?php echo htmlspecialchars($SubName, ENT_QUOTES, 'UTF-8'); ?>" />
<meta name="twitter:title" content="About <?php echo htmlspecialchars($SiteName . ' - ' . $SubName, ENT_QUOTES, 'UTF-8'); ?>" />
<meta name="twitter:image" content="<?php echo htmlspecialchars($SiteURL, ENT_QUOTES, 'UTF-8'); ?>/images/og-site-avatar.jpg" />
<meta name="twitter:url" content="<?php echo htmlspecialchars($SiteURL, ENT_QUOTES, 'UTF-8'); ?>" />
<meta name="twitter:card" content="summary" />
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="shortcut icon" href="favicon.ico">
<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Playfair+Display:400,700,400italic|Roboto:400,300,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Playfair+Display:400,700,400italic|Roboto:400,300,700' rel='stylesheet' type='text/css'>
<!-- Animate -->
<link rel="stylesheet" href="css/animate.css">
<!-- Icomoon -->
<link rel="stylesheet" href="css/icomoon.css">
<!-- Bootstrap -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<!-- Modernizr JS -->
<script src="js/modernizr-2.6.2.min.js"></script>
<!-- FOR IE9 below -->
@@ -86,7 +92,7 @@ ORDER BY value ASC");
<div id="fh5co-offcanvas">
<a href="#" class="fh5co-close-offcanvas js-fh5co-close-offcanvas"><span><i class="icon-cross3"></i> <span>Close</span></span></a>
<div class="fh5co-bio">
<figure>
<figure>
<a href="index.php"><img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive"></a>
</figure>
<h3 class="heading">About the Project</h3>
@@ -95,13 +101,13 @@ ORDER BY value ASC");
<hr>
<p>A free, open source project from:<br />
<a href="https://rss.com/podcasts/l0wl1f3podcast/">The L0WL1F3 Podcast</a><br />
<a href="https://www.neondystopia.com/">Neon Dystopia</a><br />
<a href="https://cyberpunklibrarian.com">Cyberpunk Librarian</a>
<a href="https://rss.com/podcasts/l0wl1f3podcast/" rel="noopener noreferrer" target="_blank">The L0WL1F3 Podcast</a><br />
<a href="https://www.neondystopia.com/" rel="noopener noreferrer" target="_blank">Neon Dystopia</a><br />
<a href="https://cyberpunklibrarian.com" rel="noopener noreferrer" target="_blank">Cyberpunk Librarian</a>
</p>
<hr>
<p>
<a href="https://cyberpunklibrarian.nohost.me/gitlab/code/infopump">GitLab</a>
<a href="https://cyberpunklibrarian.nohost.me/gitlab/code/infopump" rel="noopener noreferrer" target="_blank">GitLab</a>
</p>
<ul class="fh5co-social">
<!--<li><a href="#"><i class="icon-twitter"></i></a></li>
@@ -115,14 +121,15 @@ ORDER BY value ASC");
<h3 class="heading">Recent Additions</h3>
<ul>
<?php
while ($row = $types->fetchArray()) {
$row_value = $row['value'];
$row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
echo '<li><a href="recent.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
//echo '<li>'.$row_value.'</li>';
if ($types) {
while ($row = $types->fetchArray(SQLITE3_ASSOC)) {
$row_value = htmlspecialchars($row['value'], ENT_QUOTES, 'UTF-8');
$row_titlecase = htmlspecialchars(mb_convert_case($row['value'], MB_CASE_TITLE, "UTF-8"), ENT_QUOTES, 'UTF-8');
echo '<li><a href="recent.php?ty=' . urlencode($row['value']) . '">' . $row_titlecase . '</a></li>';
}
} else {
echo '<li>Unable to load menu</li>';
}
?>
</ul>
@@ -131,7 +138,7 @@ ORDER BY value ASC");
<h3 class="heading">Search</h3>
<form action="results.php" method="get">
<div class="form-group">
<input type="text" class="form-control" name="kw" placeholder="Keyword search">
<input type="text" class="form-control" name="kw" placeholder="Keyword search" maxlength="100" required>
</div>
</form>
</div>
@@ -176,9 +183,9 @@ ORDER BY value ASC");
<div class="col-lg-8 cp-r animate-box">
<p>There are two things behind the creation of Infopump, the thought directly above and an almost obsessively compiled spreadsheet of cyberpunk media. Shadowlink, from Neon Dystopia and the L0WL1F3 Podcast, created something amazing. It's a gigantic Google Sheet of cyberpunk related books, movies, games, music, and more. When I first saw it, the librarian in me went wild. Because what I saw wasn't a spreadsheet, I saw a bibliography.</p>
<p>After a couple conversations, I got to work on something that would take that data and display it in an attractive manner, and maybe even make it fun. We needed more than just titles and authors though, especially if this was going to be a useful bibliography. After some attempts to build a cataloguing interface, I had an epiphany while working on some eBook collections for my everyday job. (Hello, <a href="https://cyberpunklibrarian.com/about/">I'm Dan</a>. I'm a <a href="https://www.linkedin.com/in/danielmesser/">Systems Librarian</a>, library technologist, and researcher.) It dawned on me that there is already a piece of software that could handle the cataloguing, the metadata, the collection, and all the rest. And it's free, open source, and cross platform. It has an excellent, well designed database powered by SQLite which I could query using PHP and display the results in a web browser.</p>
<p>After a couple conversations, I got to work on something that would take that data and display it in an attractive manner, and maybe even make it fun. We needed more than just titles and authors though, especially if this was going to be a useful bibliography. After some attempts to build a cataloguing interface, I had an epiphany while working on some eBook collections for my everyday job. (Hello, <a href="https://cyberpunklibrarian.com/about/" rel="noopener noreferrer" target="_blank">I'm Dan</a>. I'm a <a href="https://www.linkedin.com/in/danielmesser/" rel="noopener noreferrer" target="_blank">Systems Librarian</a>, library technologist, and researcher.) It dawned on me that there is already a piece of software that could handle the cataloguing, the metadata, the collection, and all the rest. And it's free, open source, and cross platform. It has an excellent, well designed database powered by SQLite which I could query using PHP and display the results in a web browser.</p>
<p><a href="https://calibre-ebook.com/">Calibre</a>.</p>
<p><a href="https://calibre-ebook.com/" rel="noopener noreferrer" target="_blank">Calibre</a>.</p>
</div>
<div class="col-lg-4 animate-box">
<div class="fh5co-highlight right">
@@ -224,7 +231,7 @@ ORDER BY value ASC");
<p>Thank you from your little free Cyberpunk Librarian, and the L0WL1F3 lads at Neon Dystopia.</p>
<p>Contact: cyberpunklibrarian [at] protonmail [dot] com<br />Code: <a href="https://cyberpunklibrarian.nohost.me/gitlab/code/infopump">GitLab</a></p>
<p>Contact: cyberpunklibrarian [at] protonmail [dot] com<br />Code: <a href="https://cyberpunklibrarian.nohost.me/gitlab/code/infopump" rel="noopener noreferrer" target="_blank">GitLab</a></p>
</div>
</div>
@@ -234,7 +241,7 @@ ORDER BY value ASC");
</div>
<footer id="fh5co-footer">
<p><small>&copy; Creative Commons By-NC-SA<br> Design by <a href="http://freehtml5.co" target="_blank">FREEHTML5.co</a></small></p>
<p><small>&copy; Creative Commons By-NC-SA<br> Design by <a href="http://freehtml5.co" target="_blank" rel="noopener noreferrer">FREEHTML5.co</a></small></p>
</footer>
<!-- jQuery -->
@@ -251,3 +258,9 @@ ORDER BY value ASC");
</body>
</html>
<?php
// Close database connection
if (isset($db)) {
$db->close();
}
?>