/home/wpollock1/public_html/PHP/index.php

 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2: <html lang="en"> <head>
 3: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 4: <meta name="description" content="PHP Demos">
 5: <meta name="author" content="Wayne Pollock">
 6: <link rel="contents" href="../index.htm">
 7: <link rel="previous" href="../index.htm">
 8: <link rel="Icon" type="image/x-icon" href="../images/PHP.ico">
 9: <link rel="stylesheet" href="../Styles.css" type="text/css">
10: 
11: <title> PHP Demos </title>
12: 
13: <script type="text/JavaScript" src="../Common.js"> </script>
14: 
15: </head>
16: <body>
17: <div class="Center">
18: <h1> PHP Demos </h1>
19: <h2>&nbsp;</h2>
20: </div>
21: 
22: <div class="Indent">
23: <?php
24:    // Script to produce a list of links for all PHP files in this directory.
25:    // Written 8/2004 by Wayne Pollock, Tampa Florida USA.  All Rights Reserved.
26: 
27:    // Create a directory object for the current directory:
28:    $cwd = getcwd();
29:    if ( ! is_readable($cwd) )
30:    {  die( "$cwd is unreadable.\n" );
31:    }
32:    $dir = dir( $cwd ) or die( $php_errormsg );
33: 
34:    // Determine the name of this script (so not to show it in list):
35:    $myPathArray = explode( '/', $_SERVER['PHP_SELF'] );
36:    $last = count( $myPathArray ) - 1;
37:    $myName = $myPathArray[ $last ];
38: 
39:    // For each regular file in the current directory (except myself):
40:    while ( ($file = $dir->read()) !== false )
41:    {
42:       if ( is_dir( $file ) /*or $file == $myName*/ )
43:       {  continue;
44:       }
45: 
46: /*
47:       // If file is a PHP file, then generate a link to it:
48:       if ( preg_match( '/\.php$/i', $file) ) {
49: */
50:          echo "<p> View <a href=\"$file\">$file</a>&nbsp; &nbsp;\n";
51:          echo "(<a href=\"lister.php?file=$file&amp;linenums\">"
52:             . "view source</a>) </p>\n";
53: /*      } */
54:    }
55: ?>
56: </div>
57: 
58: <div>
59: <?php
60:     $modi = @filemtime(__FILE__);
61:     echo "(This page last modified: " . gmdate('Y-m-d\TH:i:s+00:00', $modi) . ")";
62: ?>
63: </div>
64: 
65: <div>
66: <script type="text/JavaScript"> <!--
67:    addFooter( "Question: PHP Demos" );
68: // --> </script>
69: <noscript>
70:     <p> This page was last updated by Wayne Pollock. </p>
71: </noscript>
72: 
73: </div></body></html>