<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#c// ###################################################################
#c// Album Theme by David Ljung Madison
#c// Design by Dave Simmer of DaveWeb.com
#c// -- Auto generated by simmer_theme v3.01
#c// -- From: http://MarginalHacks.com/Hacks/album/
#c// ###################################################################
#c//
<:

  # Path setting - this is the path to the images
  $PATH = Theme_URL();

  # Font/color settings for the document
  $TITLE_FONT = "size='4' color='#ffffff' face='Times New Roman,Georgia,Times'";
  $MAIN_FONT = "face='Times New Roman,Georgia,Times'";
  $CREDIT_FONT = "size='-1' face='Verdana' color='#ffffff'";
  $BODY = "background='$PATH/bkgrnd.gif' link='#aaaaaa' alink='#aaaaaa' vlink='#aaaaaa' text='#FFFFFF'";

  # Icons/graphics
  @Bar_L =	("$PATH/Bar_L.gif", 27, 20);
  @Bar_M =	("$PATH/Bar_M.gif", "90%", 20);
  @Bar_R =	("$PATH/Bar_R.gif", 27, 20);
  @Icon =	("$PATH/Icon.gif", 111, 24);
  @Back =	("$PATH/Back.gif", 103, 24);
  @Next =	("$PATH/Next.gif", 24, 42);
  @Prev =	("$PATH/Prev.gif", 24, 42);
  @More =	("$PATH/More.gif", 103, 24);
  @Locked =	("$PATH/Locked.gif", 8, 11);

  @Fabi =	("$PATH/fabi.jpg", 63, 57);

  # Thumbnail border
  @Bord_LT =	("$PATH/Bord_LT.gif", 27, 20);
  @Bord_RT =	("$PATH/Bord_RT.gif", 27, 20);
  @Bord_LB =	("$PATH/Bord_LB.gif", 27, 20);
  @Bord_RB =	("$PATH/Bord_RB.gif", 27, 20);
  @Bord_L =	("$PATH/Bord_L.gif", 27, 60);
  @Bord_R =	("$PATH/Bord_R.gif", 27, 60);
  @Bord_TL =	("$PATH/Bord_TL.gif", 45, 27);
  @Bord_TR =	("$PATH/Bord_TR.gif", 45, 27);
  @Bord_BL =	("$PATH/Bord_BL.gif", 45, 27);
  @Bord_BR =	("$PATH/Bord_BR.gif", 45, 27);
  @Bord_T =	("$PATH/Bord_T.gif", 64, 27);
  @Bord_B =	("$PATH/Bord_B.gif", 64, 27);
  @Border = (\@Bord_TL,\@Bord_T,\@Bord_TR,\@Bord_RT,\@Bord_R,\@Bord_RB,\@Bord_BR,\@Bord_B,\@Bord_BL,\@Bord_LB,\@Bord_L,\@Bord_LT);
sub Bar {
  my ($colspan) = @_;
  return unless @Bar_L;
:>
			<tr>
				<td colspan='<:=$colspan:>' height="<:=$bar_H:>">
					<div align="center" style="white-space: nowrap">
						<: print Image_Array(@Bar_L),Image_Array(@Bar_M),Image_Array(@Bar_R);:>
					</div>
				</td>
			</tr>
<:
}

:>//
#c//
#c// ###################################################################
#c// Everything beyond here is the same for every DaveWeb theme..
#c// ###################################################################
<:
  # Shorthand for column info specified by -columns
  $Cols = Option('columns');
  $Col_Perc = int(100/$Cols)."%";

:>//
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
		<meta http-equiv="Content-Style-Type" content="text/css">
		<: Meta() :>
		<title>Album: <:= Path('album_name') :></title>
	</head>

	<body <:=$BODY:>>
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td colspan="<:=($Cols-1):>" height="10"><:=Image_Array("$PATH/Null.gif",11,10):></td>
			</tr>
			<tr>
				<td colspan="<:=($Cols-1):>">
<: if (@Icon) {
          print Image_Array(@Icon,"align='middle'");
					print "\n<br />\n";
   } _:>
					<font <:=$TITLE_FONT:>>
					&nbsp;&nbsp;&nbsp;&nbsp;<:= Parent_Albums(':'); :>
					</font></td>
				<td valign='top' width="25%">
					<div align="right">
						<:
							$back=Back();
							if ($back && $back ne "''" && $back ne "'0'") {
								print "<a href=$back>";
								print @Back ? Image_Array(@Back,"align='middle'") : "<h2>Back</h2>";
								print "</a>\n";
							}
						:>
					</div>
				</td>
			</tr>
<: if (isHeader()) { _:>
			<tr>
				<td colspan="<:=$Cols:>">
					<br />
					<center>
						<:pHeader():>
					</center>
				</td>
			</tr>
<: } _:>
<: Bar($Cols) :>
			<tr>
				<td colspan="<:=$Cols:>"><:=Image_Array("$PATH/Null.gif",20,10):></td>
			</tr>

#c// Are there more albums below this one?
<:
  my $alb = First('dirs');
  if ($alb) { _:>
			<tr>
				<td colspan="<:=$Cols:>">

	<table width='100%' align='center' cellspacing='3'>
		<tr>
<:    if (@More) { :>
			<td height='50' align='center' width='<:=$Col_Perc:>' valign='top'>
				<:=Image_Array(@More):>
			</td>
<:    } else { :>
			<td height='50' align='center' width='<:=$Col_Perc:>' valign='top'>
				<h2>More albums:</h2>
			</td>
<:    } :>
#c//
#c// Loop on all the albums
<:  my @save;
    while ($alb) {
_:>
			<td align='center' width='<:=$Col_Perc:>' valign='bottom'>
					<: Border($alb, 'thumb','dir', @Border) if Get($alb,'thumb','x') :>
          <: push(@save,$alb); :>
			</td>
<:    if (New_Row($alb,$Cols,1) || !Next($alb)) { _:>
		</tr><tr>
<:      foreach my $save ( @save ) { _:>
      <:= "<td></td>\n" unless Get($save,'num') :>
			<td align='center' width='<:=$Col_Perc:>' valign='top'>
				<font <:=$TITLE_FONT:>>
					<:= Image_Array(@Locked) if -e Get($save,'path').'/.htaccess'; :>
					<:=Get($save,'href','dir'):>
					<:=Pretty(Name($save),1,1):></a>
					<: my $cap = Caption($save);
					   my $num_pics = Get($save,'num_pics');
					   $num_pics = $num_pics ? $num_pics>1 ? "$num_pics images\n" : "1 image\n" : "";
					   my $num_dirs = Get($save,'num_dirs');
					   $num_dirs = $num_dirs ? $num_dirs>1 ? "$num_dirs albums\n" : "1 folder\n" : "";
					   if ($cap || $num_pics || $num_dirs) { _:>
						<br />
						<font size='-2'>
						<:=$cap if $cap:>
						<:="<br />" if $cap && ($num_pics || $num_dirs):>
						<:=$num_dirs:>
						<:=", " if $num_pics && $num_dirs:>
						<:=$num_pics:>
						</font>
          <: } :>
				</font>
<:
        }
        undef @save;
        if (New_Row($alb,$Cols,1)) { _:>
		</tr><tr>
<:
        }
      }
      $alb = Next($alb);
    } # End child album loop
_:>

		</tr>
	</table>

				</td>
			</tr>

#c// Bar after child albums
<: Bar($Cols) :>

#c//
#c// End if albums
<:  } :>

#c//
#c// The images
<:
  my $img = First('pics');
  if ($img) { _:>//
			<tr>
<:  my @save;
    while ($img) {
_:>
				<td align='center' valign='bottom' width='<:=$Col_Perc:>'>
					<font <:=$MAIN_FONT:>>
					<: Border($img,'thumb','image', @Border) if Get($img,'thumb','x') :>
          <: push(@save,$img); :>
			  </td>

<:    if (New_Row($img,$Cols) || !Next($img)) { _:>
		</tr><tr>
<:      foreach my $save ( @save ) { _:>
				<td align='center' valign='top' width='<:=$Col_Perc:>'>
					<:=Get($save,'href','image'):>
					<:=Pretty(Name($save),1,1):></a>
					<: if (my $cap = Caption($save)) { _:>
						<br />
						<font size='-2'>
						<:=$cap:>
						</font>
					<: } :>
					</font>
				</td>
<:
        }
        undef @save;
        if (New_Row($img,$Cols)) { _:>
			</tr>
			<tr>
				<td height="20" colspan="<:=$Cols:>"><:=Image_Array("$PATH/Null.gif",20,20):></td>
			</tr>
			<tr>
<:
        }
      }
      $img = Next($img);
    } # End child album loop
_:>

			</tr>
			<tr>
				<td height="20" colspan="<:=$Cols:>"><:=Image_Array("$PATH/Null.gif",20,20):></td>
			</tr>

<: Bar($Cols) :>

<:}:>//

<: if (isFooter()) { _:>
			<tr>
				<td colspan="<:=$Cols:>">
					<br />
					<center>
						<:pFooter():>
					</center>
				</td>
			</tr>

<: Bar($Cols) :>

<: } _:>

			<tr>
				<td align="center" colspan="<:=$Cols:>">

				<table>
				<td valign="top" valign="middle">
				<: print Image_Array(@Fabi) :>
				</td>
				<td valign="top">
				&copy; <a href="http://www.chato.cl/fabi/">Fabiola Leyton</a>
<br/>
<font size="-1">
<a rel="license" href="http://creativecommons.org/licenses/by/2.0/deed.es">Licencia: Creative Commons</a></font>
				</td>
				</table>

				<br/>

<!-- /Licencia de Creative Commons -->

<!--

<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<dc:title>ChaTo.cl</dc:title>
<dc:creator><Agent>
<dc:title>Fabiola Leyton</dc:title>
</Agent></dc:creator>
<dc:rights><Agent>
<dc:title>Fabiola Leyton</dc:title>
</Agent></dc:rights>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
<license rdf:resource="http://creativecommons.org/licenses/by/2.0/" />
</Work>

<License rdf:about="http://creativecommons.org/licenses/by/2.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</License>

</rdf:RDF>

-->




					<div align="center" style="display: none">
						<font <:=$CREDIT_FONT:>><: Credit() :> on <:=scalar localtime:></font></div>
				</td>
			</tr>
		</table>
		<p></p>
	</body>

</html>
