Source Code
The entire project, readable in your browser. No hidden JavaScript, no sneaky beacons. If we claimed we don't track you, this is where you check.
|
Pages/
Feeds/
Backend/
Includes/
Stylesheet/
JavaScript/
data/counter.txt and data/guestbook.txt hold visitor-supplied content
(a number and signed messages), so they are not shown here.
|
1 <?php 2 /** 3 * header.php 4 * ----------------------------------------------------------------------------- 5 * Shared top-of-page markup for every public page. 6 * 7 * A page includes this file after (optionally) setting two variables: 8 * 9 * $PAGE_TITLE string -- shown in <title> and used for the <h1> context 10 * $PAGE_ID string -- the filename of the current page, e.g. 'scan.php' 11 * (used by nav.php to highlight the active link) 12 * 13 * This file: 14 * - sends the HTML doctype + <head> (VT323 font + style.css) 15 * - opens <body> and the .wrap column 16 * - increments and prints the visitor counter (aggregate integer only) 17 * - renders the ASCII logo, status bar, marquee, and CRT toggle 18 * - pulls in the navigation (includes/nav.php) 19 * 20 * Every page must later include includes/footer.php to close the document. 21 * ----------------------------------------------------------------------------- 22 */ 23 24 require_once __DIR__ . '/config.php'; 25 require_once __DIR__ . '/functions.php'; 26 27 // Defaults if the including page did not set them. 28 if (!isset($PAGE_TITLE)) { $PAGE_TITLE = SITE_NAME; } 29 if (!isset($PAGE_ID)) { $PAGE_ID = basename($_SERVER['SCRIPT_NAME'] ?? 'index.php'); } 30 31 // Aggregate visitor tally (single integer; no IPs, no logs). We only bump on 32 // real page views, not on API calls or feeds. 33 $VISITS = bump_visit_count(); 34 35 // Pick one marquee headline deterministically per ~2-minute window so it does 36 // not thrash on every request but still rotates over time. 37 $marquee_all = isset($GLOBALS['MARQUEE_LINES']) ? $GLOBALS['MARQUEE_LINES'] : array('Welcome.'); 38 $marquee_line = implode(' +++ ', $marquee_all); 39 40 $full_title = $PAGE_TITLE === SITE_NAME 41 ? SITE_NAME 42 : $PAGE_TITLE . ' :: ' . SITE_NAME; 43 44 if (!headers_sent()) { 45 header('Content-Type: text/html; charset=UTF-8'); 46 } 47 ?><!DOCTYPE html> 48 <html lang="en"> 49 <head> 50 <meta charset="UTF-8"> 51 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 52 <meta name="robots" content="index, follow"> 53 <meta name="description" content="<?php echo eattr(SITE_TAGLINE); ?>"> 54 <meta name="author" content="<?php echo eattr(SITE_AUTHOR); ?>"> 55 <meta name="generator" content="Notepad"> 56 <meta name="rating" content="general"> 57 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 58 <meta name="theme-color" content="#000000"> 59 <title><?php echo e($full_title); ?></title> 60 61 <!-- Old-web niceties --> 62 <link rel="alternate" type="application/rss+xml" title="<?php echo eattr(SITE_NAME); ?> Updates" href="<?php echo eattr(url('rss.php')); ?>"> 63 <link rel="icon" type="image/svg+xml" href="<?php 64 // Inline pixel-art eye favicon, no binary upload required. 65 echo eattr( 66 'data:image/svg+xml;base64,' . base64_encode( 67 '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 8 8" ' 68 . 'shape-rendering="crispEdges"><rect width="8" height="8" fill="#000"/>' 69 . '<g fill="#00FF00">' 70 . '<rect x="1" y="3" width="6" height="1"/><rect x="1" y="4" width="6" height="1"/>' 71 . '<rect x="2" y="2" width="4" height="1"/><rect x="2" y="5" width="4" height="1"/>' 72 . '</g><rect x="3" y="3" width="2" height="2" fill="#FF0000"/></svg>' 73 ) 74 ); 75 ?>"> 76 77 <!-- VT323: the one true CRT font. Fallbacks live in style.css. --> 78 <link rel="preconnect" href="https://fonts.googleapis.com"> 79 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 80 <link href="https://fonts.googleapis.com/css2?family=VT323&display=swap" rel="stylesheet"> 81 82 <link rel="stylesheet" href="<?php echo eattr(url('assets/css/style.css')); ?>"> 83 84 <!-- Restore CRT toggle state before paint to avoid a flash. --> 85 <script> 86 (function () { 87 try { 88 if (localStorage.getItem('crt') === 'on') { 89 document.documentElement.className += ' crt-pending'; 90 } 91 } catch (e) {} 92 })(); 93 </script> 94 </head> 95 <body> 96 <a class="skip" href="#content">[ skip to content ]</a> 97 <div class="wrap"> 98 99 <!-- ============================ HEADER ============================ --> 100 <table class="layout hdr-top" width="100%"><tr> 101 <td class="hdr-logo"> 102 <pre class="logo" aria-label="<?php echo eattr(SITE_NAME); ?>"><?php echo e(ascii_logo()); ?></pre> 103 </td> 104 <td class="right hdr-toggle" valign="top" style="width:120px"> 105 <span class="crt-toggle" id="crtToggle" title="Toggle CRT scanline effect">[ CRT: <span id="crtState">off</span> ]</span> 106 </td> 107 </tr></table> 108 109 <!-- Status / info bar --> 110 <div class="statusbar"> 111 <span title="Aggregate page views. We store a single number, nothing else."> 112 Visitors: <b><?php echo e(odometer($VISITS)); ?></b> 113 </span> 114 <span class="sep">|</span> 115 <span>Server: <b id="clkServer"><?php echo e(server_time()); ?></b></span> 116 <span class="sep">|</span> 117 <span>UTC: <b id="clkUtc"><?php echo e(utc_time()); ?></b></span> 118 <br> 119 <span>Best Viewed in <b>Firefox</b></span> 120 <span class="sep">|</span> 121 <span>Powered by <b>PHP <?php echo e(PHP_VERSION); ?></b></span> 122 <span class="sep">|</span> 123 <span>Connection: <b><?php echo is_https() ? 'HTTPS (secure)' : 'HTTP (plaintext)'; ?></b></span> 124 <span class="sep">|</span> 125 <span>No Cookies · No Tracking</span> 126 </div> 127 128 <!-- News ticker --> 129 <marquee behavior="scroll" direction="left" scrollamount="4" class="marquee"><?php 130 echo e($marquee_line); 131 ?></marquee> 132 133 <?php 134 // Navigation bar. 135 include __DIR__ . '/nav.php'; 136 ?> 137 138 <!-- ============================ CONTENT =========================== --> 139 <a id="content"></a> 140 <div class="content"> 141 <?php 142 // (The including page's body content follows here, then footer.php closes it.) 143 You are reading the real file being executed on the server. What you see is what runs. |