if ($handle = opendir('testimonials'))
{
$testimonios = array();
while (false !== ($entry = readdir($handle))) {
$testimonios[] = $entry;
}
array_multisort($testimonios, SORT_STRING, SORT_DESC);
foreach ($testimonios as $comentario) {
if ($comentario != "." && $comentario != ".." && $comentario != "index.html")
{
$lines = file('testimonials/'.$comentario);
$ii=0; echo "
";
foreach($lines as $line)
{
if ($ii==0) { echo "
";
if ($handle = opendir('portfolio/'.substr ($line,0,-5)))
{ $images = array(); $i=0;
while (false !== ($imag = readdir($handle))) {
$images[] = $imag;
}
array_multisort($images, SORT_STRING, SORT_ASC);
foreach ($images as $entry3) {
if ($entry3 != "." && $entry3 != ".." && strcasecmp ( substr ($entry3,-4), "html") != 0 && strcasecmp (substr ($entry3,-3), "txt") != 0 && strcasecmp (substr ($entry3,-3), "php") != 0 && $i==0 ) {
echo "";
$i++;
}
}
} else {echo "";}
unset($images); unset($imag); unset($entry3);
echo "".substr ($line,0,-5)."
";
}
if ($ii==1) { echo "
".substr ($line,0,-5)."
"; }
if ($ii==2) { echo "
".$line."
"; }
$ii++;
}
echo "
";
}
} unset($comentario); unset($lines);
}
unset($testimonios);
unset($handle); unset($entry);
?>