//================= ParceCaps =========================
function ParceCaps($label) {
$nlabel = "";
$l = strlen($label) - 4;
$p = 100;
for ($i = 0; $i < $l; $i++) {
$a = ord(substr($label,$i,1));
//echo $a.",";
if ($a < 97) {
if ($p > 59) { $nlabel = $nlabel." "; }
}
$nlabel = $nlabel.substr($label,$i,1);
$p = $a;
}
return $nlabel;
}
//================= DispDir ($dir) ====================
function DispDir($dirx) {
global $debug;
echo "
--------".$dirx."--------
";
$files1 = scandir($dirx); //reads in entire directory in alpha order
if ($debug)
{
var_dump($files1);
echo "
";
echo sizeof($files1);
echo "
";
}
$idx = 2;
$filename = $files1[2];
while (strlen($filename) > 0) {
$d = substr($filename,2,2)."/".substr($filename,4,2)."/".substr($filename,0,2)." - ";
$fname = ParceCaps(substr($filename,7));
echo "".$d.$fname."";
if ($debug)
{
echo $idx;
}
echo "
";
$idx = ++$idx;
if (sizeof($files1) <= $idx)
break;
$filename = $files1[$idx];
}
}
$debug = false;
echo "Overbrook Citizen Articles";
echo "OVERBROOK CITIZEN 1972-1975
";
$dirx = 'Awards';
DispDir($dirx);
$dirx = 'Basketball-Boys';
DispDir($dirx);
DispDir('Basketball-Girls');
DispDir('Football');
DispDir('Golf');
DispDir('Music');
DispDir('Other');
DispDir('Track-Boys');
DispDir('Track-Girls');
DispDir('Volleyball');
DispDir('Wrestling');
echo "";
?>