Hey everyone... I'm trying to edit some code that a friend of mine created. This is to display images for a clients. I'm trying to add a break every 5 images. Here is the link to how it's currently displaying:
http://goldcountrymini.com/proofing/index2.php?client=frank
code:
<?php
$roll = "501";
?>
<html>
<head>
<title>Parkside Studio | Online Proofing</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<center>
<table width="721" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><img src="images/header_main.gif" width="721" height="80"></td>
</tr>
<tr><td height="4"></td></tr>
<tr
valign="middle">
<td align="center" height="18"><img src="images/wlcm_msg.gif" width="628" height="14"></td>
</tr>
<tr>
<td>
<table width="100%" height="105" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="5" height="105"></td>
<?
$colcount = 0;
for ($i=0;$i < 999;$i++){
$photo = $i + 1;
if (file_exists("clients/$client/$roll" . "t/" . $roll
. "_" . sprintf("%04d",$photo) . ".jpg")) { ?>
<td width="70" height="105">
<table width="70" border="0"
cellspacing="0" cellpadding="0" height="105">
<tr align="left" valign="top">
<td><a href="<?echo
"ind_photo2.php?client=$client&roll=$roll&photo=$photo";?>"><img src="clients/<? echo $client . "/" . $roll . "t/" . $roll . "_" .
sprintf("%04d",$photo) . ".jpg"; ?>" width="90" height="90" border=0></a><img src="images/thmb_shad_r" width="10" height="90"></td>
</tr>
<tr align="left" valign="top">
<td height="15" align="center"><img src="images/thmb_shad_b2.gif"
width="100" height="6"><font size="1"><br>501-<?echo $photo;?></font></td>
</tr>
</table>
</td>
<?
$colcount++;
}
}
while ($colcount < 5){ ?>
<td width="100" height="105">
<table
width="100" border="0" cellspacing="0" cellpadding="0" height="105">
<tr align="left" valign="top">
<td
align='right'><img src="images/thmb_shad_r" width="10" height="90"></td>
</tr>
<tr align="left" valign="top">
<td height="15" align="center"><img src="images/thmb_shad_b2.gif" width="100" height="6"><font size="1"><br></font></td>
</tr>
</table>
</td>
<? $colcount++;
} ?>
<td width="10" height="105"></td>
</tr>
</table>
</td>
</tr>
<tr height="10"><td colspan="5"></td></tr>
<? // PRINT OUT THUMBNAILS IF ADDITIONAL ROLLS EXIST ----
$photoerror = "0";
$roll++;
while ($photoerror < 5){
$photo = "1";
if (file_exists("clients/$client/$roll" . "t/" . $roll . "_" .
sprintf("%04d",$photo) . ".jpg")) {
?>
<tr>
<td>
<table width="100%" height="105" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="11" height="105"></td>
<?for ($i=0;$i < 5;$i++){
$photo = $i + 1; ?>
<td
width="100" height="105">
<table width="100" border="0" cellspacing="0" cellpadding="0" height="105">
<tr
align="left" valign="top">
<td align="right"><? if (file_exists("clients/$client/$roll" . "t/" . $roll . "_" .
sprintf("%04d",$photo) . ".jpg")) { ?><a href="<?echo "ind_photo2.php?client=$client&roll=$roll&photo=$photo";?>"><img src="clients/<? echo $client .
"/" . $roll . "t/" . $roll . "_" . sprintf("%04d",$photo) . ".jpg"; ?>" width="90" height="90" border=0></a><? } ?><img src="images/thmb_shad_r"
width="10" height="90"></td>
</tr>
<tr align="left" valign="top">
<td height="15"
align="center"><img src="images/thmb_shad_b2.gif" width="100" height="6"><font size="1"><br><?echo $roll . "-" . $photo;?></font></td>
</tr>
</table>
</td>
<?
} ?>
<td width="10" height="105"></td>
</tr>
</table>
</td>
</tr>
<tr height="10"><td colspan="5"></td></tr>
<?
}
else { // ROLL NOT FOUND
#echo
"<tr><td>ROLL #$roll not found.<br><i>based on clients/$client/$roll" . "t/" . $roll . "_" . sprintf("%04d",$photo) . ".jpg</i></td></tr>";
$photoerror++;
}
$roll++;
}
?>
</table>
</center>
</body>
</html>
<?
?>
I think I need to add something into the sprintf line, but I'm not sure how and/or what. I'm a newbie at this stuff. Thanks in advance.