Hi,
Try putting the following in in place of the code you have at present.
Code:
<!--agorascript-pre
# this is an AgoraCart members only AgoraScript Snippet. You must be a current member at:
# http://www.AgoraCartPro.com . Sign up or renew at AgoraCart.com
# Copyright © 2000 - Present by K-Factor Technologies Inc., AgoraScript, and BytePipe.
&capture_STDOUT; open (DATAFILE, "<./data_files/data.file") || die print "Could not open data.file"; @line=<DATAFILE>;
close (DATAFILE);
srand;
for ($index = 0; $index < 4; $index++)
{
$array = $line[int rand(@line)];
if ($array =~ m/\|inactive\|/i){$index--;next;}
@special = split (/\|/, $array);
for($index2 = 0; $index2 < $index; $index2++){
if ($special[0] == $spc_id[$index2]){$duplicate = 1;next;}
}
if ($duplicate == 1){$index--;$duplicate = 0;next;}
$image[$index] = $special[7];$spc_category[$index] = $special[1];$spc_id[$index] = $special[0];$spc_product[$index] = $special[3];$spc_price[$index] = $special[12];$image[$index] =~ s/%%IMG%%//ig;
}
print qq~
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" class="template_mainbackground">
<tr>
<td class="template_mainbackground"><span class="headerText">See What's inside our Store:</span></td>
</tr>
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="3" bgcolor="#FFFFFF">
<tr>
~;
for ($index = 0; $index < 4; $index++)
{
print qq~
<td valign=top width="25%"><center><font face=arial size="2">In $spc_category[$index]:<br><br></font>
<a href="agora.cgi?cart_id=&p_id=$spc_id[$index]&xm=on">
<img class="template_image_no_border" src="%%URLofImages%%/$image[$index]" alt="$image[$index]"></a></center></td>
~;
}
print qq~</tr><tr>~;
for ($index = 0; $index < 4; $index++)
{
print qq~
<td valign=top width="25%"><center><font face=arial size="2">
<a href="agora.cgi?cart_id=&p_id=$spc_id[$index]&xm=on">$spc_product[$index]</a></font></center></td>
~;
}
print qq~</tr><tr>~;
for ($index = 0; $index < 4; $index++)
{
print qq~
<td valign=top width="25%"><center><font face=arial size="2">
<b><font color="FF0000">From Only<br />$spc_price[$index]<\/font></b></font></center></td>
~;
}
print qq~
</tr>
</table></td>
</tr>
</table>
~; &uncapture_STDOUT;
-->
Hopefully that will do the trick, if not get back to me and I'll have another look.
Regards.
Glen.
_________________
glen.m.darby@virgin.net