/home/wpollock1/public_html/AUnixNet/LDAP/index.php.bak
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="LDAP Sample Files">
<meta name="author" content="Wayne Pollock">
<link rel="contents" href="../../index.htm">
<link rel="previous" href="../../index.htm">
<link rel="stylesheet" href="../../Styles.css" type="text/css">
<script type="text/JavaScript" src="../../Common.js"> </script>
<title> LDAP Sample Files </title>
</head>
<body>
<div class="Center">
<h1> <abbr>LDAP</abbr> Sample Configuration and Data Files </h1>
<h2 class="hide"> </h2>
</div>
<div class="Indent">
<?php
// Script to produce a list of links for all files in this directory.
// Written 11/2009 by Wayne Pollock, Tampa Florida USA. All Rights Reserved.
// Updated 11/2013 to include "nodir" option to lister.php.
function endsWith($whole, $end)
{
return (strpos($whole, $end, strlen($whole) - strlen($end)) !== false);
}
// Create a directory object for the current directory:
$cwd = getcwd();
if ( ! is_readable($cwd) )
{ die( "$cwd is unreadable.\n" );
}
$dir = dir( $cwd ) or die( $php_errormsg );
// Determine the name of this script (so not to show it in list):
$myPathArray = explode( '/', $_SERVER['PHP_SELF'] );
$last = count( $myPathArray ) - 1;
$myName = $myPathArray[ $last ];
// For each regular file in the current directory (except myself):
while ( ($file = $dir->read()) !== false )
{
if ( is_dir( $file ) or $file == $myName or $file == "lister.php" )
{ continue;
}
if ( endsWith($file, '.gif') or endsWith($file, '.jpg') or endsWith($file, '.png') )
{
echo "<p> View <a href=\"$file\">$file</a>\n";
echo "</p>\n";
} else
{
echo "<p> View <a href=\"lister.php?file=$file&linenums&dl&nodir\">$file</a>\n";
echo "</p>\n";
}
}
?>
</div>
<div>
<script type="text/JavaScript"> <!--
addFooter( "Question: LDAP Sample Configuration and Data Files" );
// --> </script>
<noscript>
<p> This page was last updated by Wayne Pollock. </p>
</noscript>
</div></body></html>