added in ability to handle mltiple values for each entry, plus started with teh regexp for limiting to only class.*.inc.php

This commit is contained in:
seek3r 2001-11-12 19:16:57 +00:00
parent e237d169f4
commit 3531c010df

View File

@ -21,7 +21,14 @@
if ($fn) if ($fn)
{ {
$files[] = $fn; if (preg_match("/^class\.[a-zA-Z0-9]\.inc\.php+$/i",$fn)){
$files[] = $fn;
}
else
{
echo 'No valid file selected';
exit;
}
} }
else else
{ {
@ -34,7 +41,19 @@
} }
} }
$d->close; $d->close;
reset($files);
reset($files);
while(list($key, $value) = each($files))
{
//echo '$key = '.$key.' and $value = '.$value.'<br>';
if (!preg_match("/^(class\.).(\.inc\.php)+$/i",$value)){
//unset($files[$key]);
//echo '#'.$key.' is bad, and should be unset<br>';
}
}
reset($files);
} }
while (list($p,$fn) = each($files)) while (list($p,$fn) = each($files))
@ -86,7 +105,7 @@
if($out != $new[0]) if($out != $new[0])
{ {
$elements[$class][$t][$xkey] = $out; $elements[$class][$t][$xkey][] = $out;
} }
} }
} }