RICHMOSAIC v3.00
Examples
All examples have been edited from the original versions and have been resized for web use.
All examples will open in a new window.
$files = scandir("images"); MixFiles(); $i=0; $x=0; for ($i = 0; $i < count($files); $i++) { if (substr($files[$i],-7) == 'thm.jpg') { if ($x == 0) echo "
\n"; $name = substr($files[$i],3,strlen($files[$i])-10); echo "
\n"; echo "
".$name."
\n"; echo "
\n"; $x = $x + 1; if ($x == 2) { echo "
\n"; echo "
\n"; include "advert".rand(0,2).".htm"; echo "
\n"; $x = 0; } } } if ($x == 1) echo "\n"; ?>
function MixFiles() { global $files; for ($i = 0; $i < count($files); $i++) { $r = rand(0,count($files)-1); $tmp = $files[$i]; $files[$i] = $files[$r]; $files[$r] = $tmp; } } ?>