<?php
//-- draw a table which looks like  a book.
//-- This uses the album's border color/size to draw.

//-- shorten the variables for convinience ---
$borderWidth = $gallery->html_wrap['borderWidth'];
$borderColor = $gallery->html_wrap['borderColor'];
$pixelImage = $gallery->html_wrap['pixelImage'];
$thumbWidth = $gallery->html_wrap['thumbWidth'];
$thumbHeight = $gallery->html_wrap['thumbHeight'];
$tag = $gallery->html_wrap['thumbTag'];
$href = $gallery->html_wrap['thumbHref'];
$base = $gallery->app->photoAlbumURL . '/images';

$imageTR = "$base/albumthumb_TR.gif";
$imageRR = "$base/albumthumb_RR.gif";
$imageBL = "$base/albumthumb_BL.gif";
$imageBB = "$base/albumthumb_BB.gif";
$imageBR = "$base/albumthumb_BR.gif";
?>
<table width="1" border="0" cellspacing="0" cellpadding="0">

  <tr>
    <td bgcolor="<?php echo $borderColor ?>" rowspan="2" colspan="2" width="1" height="1"><table cellspacing="0" cellpadding="<?php echo $borderWidth ?>">
      <tr>
        <td width="<?php echo $thumbWidth ?>" height="<?php echo $thumbHeight ?>"><a href="<?php echo $href ?>"><?php echo $tag ?></a></td>
      </tr>
    </table></td>

    <td width="5" height="<?php echo $borderWidth ?>" valign="bottom"><img src="<?php echo $imageTR ?>" width="5" height="1"></td>
  </tr>

  <tr>
    <td width="5" height="<?php echo $thumbHeight ?>" background="<?php echo $imageRR ?>"><img src="<?php echo $pixelImage ?>" width="1" height="1"></td>
  </tr>

  <tr>
    <td width="5" height="3"><img src="<?php echo $imageBL ?>" width="5" height="3"></td>
    <td background="<?php echo $imageBB ?>" width="<?php echo $thumbWidth ?>"><img src="<?php echo $pixelImage ?>" width="1" height="1"></td>
    <td><img src="<?php echo $imageBR ?>" width="5" height="3"></td>
  </tr>
</table>
