]> git.defcon.no Git - plsgen/blobdiff - index.php
Three new features, three bugfixes. Version 0.4 code.
[plsgen] / index.php
index 437715406b91be2d8b80e1d2d63919822c88909e..15646fd2d9899d898dfd9fcc157d7ce7693de0b1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,20 +1,9 @@
-<html>
-<head><title>plsgen-generated photoalbum.</title>
-
-<link rel='stylesheet' href='indexstyle.css' type='text/css' /> 
-
-</head>
-<body>
-<div id="wrapper">
-<div id="head">
-<h1>Photo albums!</h1>
-<a style="display: block; float: right;" href="rss.php"><img src="images/rss_icon.png" alt="RSS" border="0" /></a>
-<div id="head-link"><a href="http://example.com">Update index.php!</a>
-</div>
-</div>
-<div id="content">
-
 <?php 
+$pagetitle = "Example photoalbum.";
+$css_file = 'indexstyle.css';
+$parent_url = "http://example.com";
+$parent_linktext = "UPDATE index.php";
+$contact_address = "someone@example.com";
 
 //define the path as relative
 $path = "./";
@@ -55,16 +44,40 @@ while ($file = readdir($dir_handle)) {
 closedir($dir_handle);
 
 krsort($album);
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
+<html xmlns="http://www.w3.org/1999/xhtml"> 
+<head>
+<title><?=$pagetitle?></title>
+
+<link rel='stylesheet' href='<?=$css_file?>' type='text/css' /> 
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> 
+
+</head>
+<body>
+<div id="wrapper">
+<div id="head">
+<h1><?=$pagetitle?></h1>
+<a style="display: block; float: right;" href="rss.php"><img src="images/rss_icon.png" alt="RSS" border="0" /></a>
+
+<div id="head-link"><a href="<?=$parent_url?>"><?=$parent_linktext?></a> 
+<br/>
+<a href="latest.php">Latest updates</a>
+</div>
+</div>
+<div id="content">
+
 
+<?php
 foreach ( $album as $key => $value ) {
        echo "<div class='album'>";
        echo "<div class='idxthumb'>";
-       echo "<a target=_blank href='" . $key . "'>";
+       echo "<a target='_blank' href='" . $key . "'>";
        echo $idximage[$key];
        echo "</a>";
        echo "</div>";
        echo "<div class='idxlink'>";
-       echo "<a target=_blank href='" . $key . "'>" . $key . "</a>\n";
+       echo "<a target='_blank' href='" . $key . "'>" . $key . "</a>\n";
        echo "</div>";
        echo "<div class='title'>$value</div>";
        echo "</div>";
@@ -73,7 +86,7 @@ foreach ( $album as $key => $value ) {
 </div>
 </div>
 <div style="font-family: sans; font-size: 7pt; color: #444; margin-top: 20px;">
-Photo gallery index by Jon Langseth, generated using <a href="index.phps">index.php</a>
+<a href="http://wiki.defcon.no/projects/plsgen">plsgen : Perl Simple Gallery Generator</a>
 </div>
 </body>
 </html>