rendered paste body<?php $time = microtime(); $time = explode(" ", $time); $time = $time[1] + $time[0]; $start = $time;?><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Party</title><style type="text/css"><!--body,td,th {color: #FF0000;}body {background-color: #000000;}a:link {color: #FF0000;}a:visited {color: #FFFFFF;}a:hover {color: #FF0000;}a:active {color: #FF0000;}--></style></head><body><table width=500><? $link = $_GET['link']; echo "\n"; chdir('D:/Host/Sites/images/Party/' . $link . '/Pix/'); $handle=opendir('.'); $count; while (($file = readdir($handle))!==false) { $isdir = is_dir ($file); //is it a dir if (!$isdir) //if not $isdir { if(stristr($file, 'Video') == TRUE) { echo "<td><a href=../force.php?file=D:/Host/Sites/images/Party/" . $link . "/pix/" . $file . " target='_blank'>" . //link "<img border=0 src=../../images/other/PirateDVD.png>\n" . //img tag round(((filesize($file) / 1024) /1024), 2) . " MB</td>\n"; //<file size> MB to 2 decimal places $count++; //adds 1 to $count } else { echo "<td><a href=../../images/Party/" . $link . "/Pix/" . $file . " target='_blank'>" . //link "<img border=0 src=../../images/Party/" . $link . "/Thumbs/" . $file . ">\n" . //img tag round(((filesize($file) / 1024) /1024), 2) . " MB</td>\n"; //<file size> MB to 2 decimal places $count++; //adds 1 to $count } } if ($count == 5) //if $count is 5 { echo "</tr>\n"; //end row, new line in code $count=0; //set $count to 0 } } closedir($handle);?></table><p align="Center"><?php $time = microtime(); $time = explode(" ", $time); $time = $time[1] + $time[0]; $finish = $time; $totaltime = ($finish - $start); printf ("Page took %f seconds to load.", $totaltime);?></p></body></html>