Scripting

J Album Top Frame Source

<%!

        import se.datadosen.util.*;
        // Make links to sibling directories that contain an index.html file
        void siblingLinks() {
                File[] dirs = outputDirectory.getParentFile().listFiles(new FileFilter?() {
                        public boolean accept(File f) {
                                return f.isDirectory() && new File(f, "index.html").exists();
                        }
                });
                for (int i=0; i<dirs.length; i++) {
                        String name = dirs[i].getName();
                        if (name.equals(title)) {
                                out.print("<img src=\"$resPath/sf_pil.gif\" height=\"7\" width=\"4\"> " + title + " <img src=\"$resPath/sb_pil.gif\" height=\"7\" width=\"4\"> ");
                        }
                        else {
                                out.print("<a target=\"_top\" href=\"../" + name + "/index.html\">" + name + "</a> ");
                        }
                }
        }

        // Make links to subdirectories that contain an index.html file
        void subLinks() {
                File[] dirs = imageDirectory.listFiles(new FileFilter?() {
                        public boolean accept(File f) {
                                return f.isDirectory()
                                 && !f.getName().equals(title)
                                 && !f.getName().equals("res")
                                 && !f.getName().equals("slides")
                                 && !f.getName().equals("thumbs");
                        }
                });
                for (int i=0; i<dirs.length; i++) {
                        String name = dirs[i].getName();
                        out.print(" <a class=\"typo\" target=\"_top\" href=\"" + name + "/index" + engine.getPageExtension() + "\">" + name + "</a>");
                }
        }

%>

<html> <head> <title>$title</title> <meta http-equiv="Content-Type" content="text/html; charset=$textEncoding">

<link href="$stylePath" rel="stylesheet" type="text/css">

</head>

<body id="b" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="60">

  <tr bgcolor="#333333" valign="middle">
    <td height="25">
      <table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><a target="_blank" href="http://www.mckinley.biz/photos">Jez's Photo Archive</a> -  <a target="_blank" href="http://www.mckinley.biz/photo-zip">Zip Archives here</a></td>
          <td align="right">$text.generatedBy <a target="_blank" href="$generatorUrl">$generator</a> | "Simple" 1.0 </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td width="3"> </td>
          <td>

<table border="0"> <tr><td align="left"><a target="_top" href="../index.html"><img src="$resPath/au.gif" hspace="20" border="0"></a></td></tr> <tr><td class="highlight"><img src="$resPath/la.gif"> $title <img src="$resPath/ra.gif"></td></tr> <tr><td><img src="$resPath/t.gif" border="0" align="left" width="20"><%=subLinks()%></td></tr> </table>

</td>

        </tr>
      </table>
    </td>
  </tr>

</table> </body> </html>