<?php

$numfeatures = 0;
$cellblocks = null;

for ( $x=1; $x < ($count+1); $x++ )
{
    if ( $numfeatures == $rcols )
    {
$cellblocks .= <<<PPPRINT
        </tr><tr>
PPPRINT;
        $numfeatures = 0;
    }
    $numfeatures++;

$cellblocks .= <<<PPPRINT
        <td class="{$Style['tddetails']}" width="$twidth%" valign="middle" align="center">
        	{$pthumb[$x]}
            <span class="{$Style['small']}">{$ptitle[$x]}<br />{$puser[$x]}</span>
        </td>
PPPRINT;
}

if ( $numfeatures < $rcols )
{
    while ($numfeatures != $rcols)
    {
$cellblocks .= <<<PPPRINT
        <td class="{$Style['tddetails']}" width="$twidth%" valign="middle" align="center">
            &nbsp;
        </td>
PPPRINT;
        $numfeatures++;
    }
}

$featurestrip = <<<PPPRINT
<!-- BEGIN TEMPLATE: feature.tmpl -->
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="{$Globals['tablewidth']}" align="center">
<thead>
<tr>
<td class="tcat" colspan="$rcols">
	<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('$toggle');"><img id="$ppimgid" src="{$stylepath}$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
	$group_title
</td>
</tr>
</thead>
<tbody id="$pptbid" style="$ppstyle">
<tr>
$cellblocks
</tr>
PPPRINT;

if ( $morephotos )
{
$featurestrip .= <<<PPPRINT
<tr>
<td class="{$Style['tddetails']}" colspan="$rcols" align="center">
    $morephotos
</td>
</tr>
PPPRINT;
}

$featurestrip .= <<<PPPRINT
</tbody>
</table>
<br />

<!-- END TEMPLATE: feature.tmpl -->
PPPRINT;

?>
