<?php
if ( $albums['albumcount'] > 0 ) {
echo<<<PPPRINT
<!-- BEGIN TEMPLATE: albums.tmpl -->
$ppopen
    <tr>
    <td colspan="{$Globals['thumbcols']}" class="{$Style['menubar']}" align="center">{$Globals['pp_lang']['albums']}</td>
    </tr>
    <tr>
PPPRINT;

$count = 1;
for ( $x=0; $x < $albums['albumcount']; $x++ ) {
echo<<<PPPRINT
    <td class="{$Style['tddetails']}" width="$pwidth%" align="center" valign="bottom">
        {$albums['thumbnail'][$x]}
        <span class="{$Style['small']}"><b>{$albums['name'][$x]}</b>{$albums['desc'][$x]}<br /><i>{$albums['username'][$x]}</i><br />{$albums['photos'][$x]} {$Globals['pp_lang']['littlephotos']}</span>
    </td>
PPPRINT;

if ($count == $Globals['thumbcols']) {
echo<<<PPPRINT
    </tr>
    <tr>
PPPRINT;
    $count = 0;
}
$count++;
}

if ($count != $Globals['thumbcols']+1 && $count != 1) {
    for ($z=$count; $z < ($Globals['thumbcols']+1); $z++) {
echo<<<PPPRINT
        <td class="{$Style['tdbackground']}" valign="middle" align="center" width="$pwidth%">
            $albumfiller
        </td>
PPPRINT;
    }
}

echo<<<PPPRINT
</tr>
$ppclose
<br />
<!-- BEGIN TEMPLATE: albums.tmpl -->
PPPRINT;

}
?>
