Source of “source.php”.
68 lines, 2 KBytes.   Last modified 12:01 am, 18th September 2016 PDT.
1 <?php // Emacs settings: -*- mode: Fundamental; tab-width: 4; -*- 2 3 function oneFile($name) { 4 // Output an anchor tag for listing the given file 5 ?> 6 <a href="lister.php?file=<?php echo htmlentities(urlencode($name)) ?>"><?php 7 echo htmlentities($name) ?></a><?php 8 } 9 10 ?> 11 <!DOCTYPE HTML> 12 <html manifest="manifest.php"> 13 <head> 14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 15 <meta name="viewport" content="width=440"> 16 <link href="minesweeper.css" rel=stylesheet> 17 <style type="text/css"> 18 .smileys { 19 margin: 1em; 20 text-align: center; 21 background-color: #cccccc; 22 } 23 .smileys img { 24 padding: 0.25em; 25 vertical-align: middle; 26 width: 24px; 27 height: 24px; 28 } 29 </style> 30 <title>Minesweeper source code</title> 31 </head> 32 <body> 33 <div class="main limited"> 34 <div class=title> 35 Minesweeper Source Code 36 </div> 37 For educational purposes, you may read the source code of this program. 38 If you want to do anything other than read it, and execute it on this web 39 site, ask <a href="../me/">me</a> for permission. 40 <p> 41 The HTML comes in three top-level pages 42 (<?php oneFile("index.php") ?>, 43 <?php oneFile("intermediate.php") ?>, and 44 <?php oneFile("expert.php") ?>). 45 From the browser&rsquo;s view, each of these is static HTML, 46 but on the server they each used a script (<?php oneFile("minesweeper.php") 47 ?>) to construct the playing area. 48 <p> 49 The game play is implemented entirely in your browser, by the client-side sc ript (<?php oneFile("minesweeper.js") ?>). 50 <p> 51 The page layout is controlled by a style sheet 52 (<?php oneFile("minesweeper.css") ?>). 53 The graphics use some Unicode characters (&ldquo;&#x221E;&rdquo;, 54 &ldquo;&#x2600;&rdquo;, and &ldquo;&#x00D7;&rdquo;) 55 and the smiley images: 56 <div class=smileys> 57 <img src="bored.gif" alt=bored>&nbsp; 58 <img src="erasing.gif" alt=erasing>&nbsp; 59 <img src="happy.gif" alt=happy>&nbsp; 60 <img src="sad.gif" alt=sad> 61 </div> 62 There&rsquo;s also this page (<?php oneFile("source.php") ?>), 63 and some files related to my overall site design. 64 <hr class=decoration> 65 <?php require("mlinks-php.txt") ?> 66 </div> 67 </body> 68 </html>
End of listing