here is a complete code!!!!
have fun on it God bless.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" href="backbox.css" type="text/css" />
<script type="text/javascript" src="js/prototype.compressed.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript" src="js/dhtmlHistory.js"></script>
<script type="text/javascript" src="js/customsignsheader.js"></script>
</head>
<body>
<br />
<fieldset align="left" style="width:600px; " >
<legend> <span >(2)2008 Mass Commencement Exercises </span> </legend>
<br />
<div style="width:600px; ">
<?
$handle = @opendir("images4");
$x=1;
if(!empty($handle))
{
while(false !== ($file = readdir($handle)))
{
//images4/" . $file(content of the picture
if(is_file("images4/" . $file))
$rawPhoneNumber = $file;
$ph = explode(".", $rawPhoneNumber);
if(($ph[1]!="" && $ph[1]!="db") || $ph[1]=="jpeg" || $ph[1]=="bmp" || $ph[1]=="jpg" ){
?>
<div onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()" style="width:125px; float:left; margin-left:3px; margin-top:3px; border-color:#CCCCCC; border-style:solid; border-width:3px; " >
<a href= "<? echo "images4/" . $file; ?> " rel="lightbox[slide]" caption=" <? echo "Alumni Tracer System"; ?>">
<img src="<? echo "images4/" . $file; ?>" width="125" height="125" border="0" /></a></div>
<a href="<? echo "images4/" . $file; ?> " rel="lightbox[slide]" caption="Waterfall"></a>
<?
$x++;
}
}
}
closedir($handle);
?>
<script type="text/javascript" src="js/customsignsfooter.js"></script>
</div>
</fieldset>
</body>
</html>