<?php /** * BottomBinky — Age Gate Middleware * _bb_age_check.php — include at the TOP of every protected page * * Usage: * <?php require_once('/home/btmbinky/public_html/_bb_age_check.php'); ?> * * Behavior: * - If bb_age_verified cookie is set → passes through silently * - Otherwise → redirects to /age-gate/?r=<current_url> * - Pages that are always public (privacy, terms, support, age-gate itself) skip this include */ if (session_status() === PHP_SESSION_NONE) { session_start(); } // Pages exempt from age gate $exempt_paths = [ '/age-gate/', '/age-gate/index.php', '/privacy/', '/privacy/index.php', '/terms/', '/terms/index.php', '/support/', '/support/index.php', '/sitemap.xml', '/robots.txt', '/manifest.json', '/sw.js', '/offline.html', ]; $current = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // Check if current path is exempt $is_exempt = false; foreach ($exempt_paths as $ep) { if ($current === $ep || strpos($current, '/icons/') === 0 || strpos($current, '/assets/') === 0) { $is_exempt = true; break; } } if (!$is_exempt && empty($_COOKIE['bb_age_verified'])) { $return = urlencode($current); header('Location: /age-gate/?r=' . $return, true, 302); exit; } Your Cart — BottomBinky

Your Cart

Items 0 items
Order Summary

Add $59.00 more for free shipping!

Subtotal $0.00
Shipping
Tax (est.)
Total $0.00
← Continue Shopping
Discreet plain packaging
Billing as "BB Online"
Secure checkout via CCBill
30-day hassle-free returns