diff --git a/incl/util.php b/incl/util.php new file mode 100644 index 0000000..090531b --- /dev/null +++ b/incl/util.php @@ -0,0 +1,4 @@ +prepare("SELECT * FROM colors ORDER BY timestamp DESC"); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); +$total = 255 * 255 * 255; +$named = count($result); +$remaining = $total - $named; + $lastInsertId = $_GET['highlight'] ?? null; ?> @@ -111,6 +116,7 @@ $lastInsertId = $_GET['highlight'] ?? null;
= formatWithCommas($named) ?>/= formatWithCommas($total) ?> colors named (= formatWithCommas($remaining) ?> left)