aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/CVS/Entries11
-rw-r--r--www/CVS/Repository1
-rw-r--r--www/CVS/Root1
-rw-r--r--www/bcg.pngbin0 -> 87 bytes
-rw-r--r--www/inc/.config.inc.php.swobin0 -> 12288 bytes
-rw-r--r--www/inc/CVS/Entries8
-rw-r--r--www/inc/CVS/Repository1
-rw-r--r--www/inc/CVS/Root1
-rw-r--r--www/inc/config.inc.php71
-rw-r--r--www/inc/exif.inc.php139
-rw-r--r--www/inc/footer.inc.php27
-rw-r--r--www/inc/funkce.inc.php96
-rw-r--r--www/inc/header.inc.php14
-rw-r--r--www/inc/javascript-eek.inc.php112
-rw-r--r--www/inc/javascript.inc.php51
-rw-r--r--www/inc/styles/CVS/Entries2
-rw-r--r--www/inc/styles/CVS/Repository1
-rw-r--r--www/inc/styles/CVS/Root1
-rw-r--r--www/inc/styles/default/CVS/Entries12
-rw-r--r--www/inc/styles/default/CVS/Repository1
-rw-r--r--www/inc/styles/default/CVS/Root1
-rw-r--r--www/inc/styles/default/bcg.pngbin0 -> 87 bytes
-rw-r--r--www/inc/styles/default/default.css285
-rw-r--r--www/inc/styles/default/left-16.pngbin0 -> 298 bytes
-rw-r--r--www/inc/styles/default/left.pngbin0 -> 523 bytes
-rw-r--r--www/inc/styles/default/logo-mini.pngbin0 -> 4163 bytes
-rw-r--r--www/inc/styles/default/minus.pngbin0 -> 291 bytes
-rw-r--r--www/inc/styles/default/plus.pngbin0 -> 556 bytes
-rw-r--r--www/inc/styles/default/right-16.pngbin0 -> 290 bytes
-rw-r--r--www/inc/styles/default/right.pngbin0 -> 522 bytes
-rw-r--r--www/inc/styles/default/title.pngbin0 -> 3434 bytes
-rw-r--r--www/inc/styles/default/zip.pngbin0 -> 539 bytes
-rw-r--r--www/inc/styles/gorilla/CVS/Entries7
-rw-r--r--www/inc/styles/gorilla/CVS/Repository1
-rw-r--r--www/inc/styles/gorilla/CVS/Root1
-rw-r--r--www/inc/styles/gorilla/gorilla.css258
-rw-r--r--www/inc/styles/gorilla/left.pngbin0 -> 1644 bytes
-rw-r--r--www/inc/styles/gorilla/minus.pngbin0 -> 1403 bytes
-rw-r--r--www/inc/styles/gorilla/plus.pngbin0 -> 1436 bytes
-rw-r--r--www/inc/styles/gorilla/right.pngbin0 -> 1661 bytes
-rw-r--r--www/inc/styles/gorilla/title.pngbin0 -> 2506 bytes
-rw-r--r--www/inc/styles/ie/ie.css8
-rw-r--r--www/inc/stylesheet.inc.css141
-rw-r--r--www/inc/www.class.inc.php210
-rw-r--r--www/index.php284
-rw-r--r--www/left.pngbin0 -> 1644 bytes
-rw-r--r--www/logo-mini.pngbin0 -> 4163 bytes
-rw-r--r--www/logo.pngbin0 -> 15635 bytes
-rw-r--r--www/minus.pngbin0 -> 1403 bytes
-rw-r--r--www/plus.pngbin0 -> 1436 bytes
-rw-r--r--www/right.pngbin0 -> 1661 bytes
-rw-r--r--www/top.pngbin0 -> 1631 bytes
-rw-r--r--www/zip.pngbin0 -> 1027 bytes
53 files changed, 1746 insertions, 0 deletions
diff --git a/www/CVS/Entries b/www/CVS/Entries
new file mode 100644
index 0000000..ea6e294
--- /dev/null
+++ b/www/CVS/Entries
@@ -0,0 +1,11 @@
+/bcg.png/1.1.1.1/Tue Oct 21 06:45:11 2003//
+/logo-mini.png/1.1.1.1/Tue Oct 21 06:45:11 2003//
+/logo.png/1.1.1.1/Tue Oct 21 06:45:11 2003//
+/zip.png/1.1.1.1/Tue Oct 21 06:45:11 2003//
+D/inc////
+/left.png/1.1.1.1/Sun Oct 26 21:17:37 2003//
+/minus.png/1.1.1.1/Sun Oct 26 21:17:37 2003//
+/plus.png/1.1.1.1/Sun Oct 26 21:17:37 2003//
+/right.png/1.1.1.1/Sun Oct 26 21:17:37 2003//
+/top.png/1.1.1.1/Sun Oct 26 21:17:37 2003//
+/index.php/1.19/Tue Oct 28 22:38:07 2003//
diff --git a/www/CVS/Repository b/www/CVS/Repository
new file mode 100644
index 0000000..a516823
--- /dev/null
+++ b/www/CVS/Repository
@@ -0,0 +1 @@
+original/www
diff --git a/www/CVS/Root b/www/CVS/Root
new file mode 100644
index 0000000..16bd216
--- /dev/null
+++ b/www/CVS/Root
@@ -0,0 +1 @@
+:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original
diff --git a/www/bcg.png b/www/bcg.png
new file mode 100644
index 0000000..d4f7ac8
--- /dev/null
+++ b/www/bcg.png
Binary files differ
diff --git a/www/inc/.config.inc.php.swo b/www/inc/.config.inc.php.swo
new file mode 100644
index 0000000..9cf5367
--- /dev/null
+++ b/www/inc/.config.inc.php.swo
Binary files differ
diff --git a/www/inc/CVS/Entries b/www/inc/CVS/Entries
new file mode 100644
index 0000000..6556eb2
--- /dev/null
+++ b/www/inc/CVS/Entries
@@ -0,0 +1,8 @@
+/.config.inc.php.swo/1.1.1.1/Tue Oct 21 06:45:11 2003//
+D/styles////
+/config.inc.php/1.9/Sun Oct 26 21:19:41 2003//
+/footer.inc.php/1.2/Sun Oct 26 18:43:36 2003//
+/header.inc.php/1.4/Mon Oct 27 11:15:00 2003//
+/exif.inc.php/1.4/Mon Oct 27 14:31:36 2003//
+/funkce.inc.php/1.6/Wed Oct 29 00:02:55 2003//
+/www.class.inc.php/1.7/Tue Oct 28 21:45:27 2003//
diff --git a/www/inc/CVS/Repository b/www/inc/CVS/Repository
new file mode 100644
index 0000000..ada892b
--- /dev/null
+++ b/www/inc/CVS/Repository
@@ -0,0 +1 @@
+original/www/inc
diff --git a/www/inc/CVS/Root b/www/inc/CVS/Root
new file mode 100644
index 0000000..16bd216
--- /dev/null
+++ b/www/inc/CVS/Root
@@ -0,0 +1 @@
+:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original
diff --git a/www/inc/config.inc.php b/www/inc/config.inc.php
new file mode 100644
index 0000000..5bfb36e
--- /dev/null
+++ b/www/inc/config.inc.php
@@ -0,0 +1,71 @@
+<?
+#base dirname
+ eregi("^(.*)/[^/]*$", $ScriptFileName, $x);
+ $root = $x[1];
+# ===========================================================================
+#images
+ $img["left"] = "left.png";
+ $img["right"] = "right.png";
+ $img["top"] = "top.png";
+# ===========================================================================
+#thumbnail behaviour
+ //keep this unset for dynamic thumbnail size
+ //$thumbsize = "fixed";
+ //How the previous and Next thumbnails should be scaled
+ // 1 is 1:1, >1 is smaller, <1 is bigger
+ $PNthumbScale = 1;
+# ===========================================================================
+#colors and backgrounds
+# this has been removed in favour of custom CSS stylesheets
+# ===========================================================================
+#app info
+ $app["name"] = "Original"; // opensource remote image gallery,
+ // initialy not as lovely
+ $app["url"] = "http://jimmac.musichall.cz/original.php3";
+ $app["version"] = "0.8-cvs";
+# ===========================================================================
+# EXIF metadata app path (helper app for php3 and older php4)
+# uncomment the method you want to use if you want EXIF data reported
+# ---------------------------------------------------------------------------
+## use internal function of PHP 4 (does not seem to work yet):
+# $exif_prog = "php4";
+# ---------------------------------------------------------------------------
+## use metacam (give absolute path to the binary on the server):
+# $exif_prog = "/usr/local/bin/metacam";
+## what EXIF data to show (if unset, all will be shown)
+## some example fields for metacam:
+# $exif_show = array("Image Capture Date", "Make", "Model",
+# "Exposure Program", "Exposure Mode",
+# "Focal Length", "Exposure Time",
+# "Aperture Value", "ISO Speed Rating", "White Balance",
+# "Flash", "Scene Capture Type",
+# "Metering Mode", "Max Aperture Value", "Shutter Speed Value"
+# );
+# ---------------------------------------------------------------------------
+## use jhead (give absolute path to the binary on the server):
+# $exif_prog = "/usr/local/bin/jhead";
+## what EXIF data to show (if unset, all will be shown)
+## some example fields for jhead:
+# $exif_show = array(
+# "Date/Time",
+# "Camera make",
+# "Camera model",
+# "Focal length",
+# "Exposure time",
+# "Aperture Value",
+# "ISO equiv.",
+# "Exposure",
+# );
+# ===========================================================================
+## Gallery Directory
+# This is a path relative to the directory where original is installed
+# eg. it can be "../galleries" to use a galleries dir above the original dir.
+ $gallery_dir="galleries";
+
+#css styles
+ $themes = array(
+ "default" => "inc/styles/default/default.css",
+ "ie" => "inc/styles/ie/ie.css",
+ "gorilla" => "inc/styles/gorilla/gorilla.css"
+ );
+?>
diff --git a/www/inc/exif.inc.php b/www/inc/exif.inc.php
new file mode 100644
index 0000000..be76168
--- /dev/null
+++ b/www/inc/exif.inc.php
@@ -0,0 +1,139 @@
+<?php
+if ($exif_prog=="php4") {
+ // php internal handling
+ // read_exif_data is supposed to read the whole jpeg into memory,
+ // so we'll use the thumbnails to save it
+ // THIS IS COMPLETELY UNTESTED!!!!
+ $exif_array = read_exif_data("$thumb");
+ if ($exif_style=="descriptive") {
+ // fancy table look
+ echo "<table border=\"0\" align=\"center\">\n";
+ //co ukazat (podle exif_show
+ if ($exif_show) {
+ while(list($k,$v)=each($exif_array)) {
+ while ($x = current($exif_show)) {
+ if ($x==$k) {
+ echo "<tr>";
+ echo "<td align=\"right\">$k :</td>";
+ echo "<td><b>$v</b></td>";
+ echo "</tr>\n";
+ }
+ next($exif_show);
+ }
+ }
+ } else {
+ //ukaze vsechno
+ while(list($k,$v)=each($exif_array)) {
+ echo "<tr>";
+ echo "<td align=\"right\">$k :</td>";
+ echo "<td><b>$v</b></td>";
+ echo "</tr>\n";
+ }
+ }
+ echo "<tr>\n";
+ echo "<td></td>";
+ # only show if EXIF header exists
+ if ($exif_array["Make"]) {
+ echo "<td><a href=\"$ThisScript?galerie=$galerie&snimek=$snimek";
+ echo "&exif_style=simple&show_thumbs=$show_thumbs\">";
+ echo "<b>display line</b></a></td>\n";
+ }
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</table>";
+ } else {
+ // in one line
+ if ($exif_show) {
+ while(list($k,$v)=each($exif_array)) {
+ while ($x = current($exif_show)) {
+ if ($x==$k) {
+ echo "$v | ";
+ }
+ next($exif_show);
+ }
+ }
+ } else {
+ while(list($k,$v)=each($exif_array)) {
+ echo "$v | ";
+ }
+ }
+ # only show if EXIF header exists
+ if ($exif_array["Make"]) {
+ echo "<a href=\"$ThisScript?galerie=$galerie&snimek=$snimek";
+ echo "&exif_style=descriptive&show_thumbs=$show_thumbs\">";
+ echo "<b>display table</b></a>\n";
+ echo "</p>\n";
+ }
+ }
+
+} else {
+ // the old code, handles e.g. metacam and jhead as EXIF extractors
+ // loading lq means it won't work if the convertor doesn't copy EXIF data
+ // (newer ImageMagick can)
+ exec("$exif_prog \"$gallery_dir/$galerie/lq/img-$snimek.jpg\"", $exif_data, $exif_status);
+ if ($exif_status!="2") {
+ if ($exif_style=="descriptive") {
+ // fancy table look
+ echo "<table border=\"0\" align=\"center\">\n";
+ while ($x = current($exif_data)) {
+ eregi("^ *([^:]*): *(.*)", $x, $y);
+ //filter according to $exif_show array
+ if (!$exif_show) { //all fields shown
+ echo "<tr>";
+ echo "<td align=\"right\">$y[1] :</td>";
+ echo "<td><b>$y[2]</b></td>";
+ echo "</tr>\n";
+ } else {
+ reset($exif_show);
+ while ($z = current($exif_show)) {
+ //echo ".$z. ::: .$y[1].<br>";
+ if (trim($z) == trim($y[1])) {
+ echo "<tr>";
+ echo "<td align=\"right\">$y[1] :</td>";
+ echo "<td><b>$y[2]</b></td>";
+ echo "</tr>\n";
+ }
+ next($exif_show);
+ }
+ }
+ next($exif_data);
+ }
+ echo "<tr>\n";
+ echo "<td></td>";
+ # only show if EXIF header exists
+ if ($y[1]!="File") { // don't show when no EXIF
+ echo "<td><a href=\"$ThisScript?galerie=$galerie&snimek=$snimek";
+ echo "&exif_style=simple&show_thumbs=$show_thumbs\">";
+ echo "<b>display line</b></a></td>\n";
+ }
+ echo "</tr>\n";
+ echo "</table>\n";
+ } else {
+ //simple plaintext look
+ echo "<p class=\"exif\" align=\"center\">";
+ while ($x = current($exif_data)) {
+ eregi("^ *([^:]*): *(.*)", $x, $y);
+ if (!$exif_show) { //all fields shown
+ echo "$y[2] |";
+ } else {
+ reset($exif_show);
+ while ($z = current($exif_show)) {
+ if (trim($z) == trim($y[1])) {
+ echo "$y[2] | ";
+ }
+ next($exif_show);
+ }
+ }
+ next($exif_data);
+ }
+ # only show if EXIF header exists
+ if ($y[1]!="File") {
+ echo "<a href=\"$ThisScript?galerie=$galerie&snimek=$snimek";
+ echo "&exif_style=descriptive&show_thumbs=$show_thumbs\">";
+ echo "<b>display table</b></a>\n";
+ echo "</p>\n";
+ }
+ }
+ }
+}
+?>
diff --git a/www/inc/footer.inc.php b/www/inc/footer.inc.php
new file mode 100644
index 0000000..7143fd5
--- /dev/null
+++ b/www/inc/footer.inc.php
@@ -0,0 +1,27 @@
+<?
+/*
+echo "<p class=\"copyright\">\n";
+echo "<a href=\"http://jigsaw.w3.org/css-validator/validator?uri=";
+echo "http://$HostName$ThisScript\">";
+echo "<img align=\"top\" style=\"border:0;width:88px;height:31px\"";
+echo " src=\"http://jigsaw.w3.org/css-validator/images/vcss\"";
+echo " alt=\"Valid CSS!\">";
+echo "</a>\n";
+
+echo "<a href=\"http://validator.w3.org/check?uri=";
+echo "http://$HostName$ThisScript\">";
+echo "<img align=\"top\" style=\"border:0;width:88px;height:31px\"";
+echo " src=\"http://www.w3.org/Icons/valid-html401\"";
+echo " alt=\"Valid HTML 4.01!\">";
+echo "</a>\n";
+*/
+
+echo "\n\n<div class=\"footer\">";
+echo "Generated by\n <em>";
+echo "<a href=\"" . $app["url"] . "\">";
+echo $app["name"];
+echo "</a>";
+echo " ver. " . $app["version"];
+echo "</em>\n";
+echo "</div>\n";
+?>
diff --git a/www/inc/funkce.inc.php b/www/inc/funkce.inc.php
new file mode 100644
index 0000000..2a1e8cc
--- /dev/null
+++ b/www/inc/funkce.inc.php
@@ -0,0 +1,96 @@
+<?php
+function navigation ($gallery, $snapshot, $image) {
+ global $gallery_dir, $root, $ThisScript, $textnav, $img,
+ $show_thumbs, $exif_style, $PNthumbScale;
+
+ $next = $snapshot + 1;
+ $prev = $snapshot - 1;
+
+ if (!$image) { // this will render a navigation bar - max 3 buttons
+ echo "\n<div class=\"navbuttons\">\n";
+ echo "<div class=\"navbuttonsshell\">\n";
+ if ($snapshot > 1) { //previous
+ echo "<a id=\"previcon\" href=\"$ThisScript?galerie=$gallery&amp;snimek=$prev";
+ echo "&amp;exif_style=$exif_style&amp;show_thumbs=$show_thumbs\">";
+ echo "&lt; previous</a>\n";
+ }
+ echo "&nbsp;";
+ if (is_file("$gallery_dir/$gallery/lq/img-$next.jpg")) { //next
+ echo "<a id=\"nexticon\" href=\"$ThisScript?galerie=$gallery&amp;snimek=$next";
+ echo "&amp;exif_style=$exif_style&amp;show_thumbs=$show_thumbs\">";
+ echo "next &gt;</a>\n";
+ }
+ echo "</div>\n</div>\n";
+ } elseif ($image=="prev") { //previous thumbnail
+ if ($snapshot > 1) { //previous
+ echo "<div class=\"prevthumb\">";
+ echo "<a href=\"$ThisScript?galerie=$gallery&amp;snimek=$prev";
+ echo "&amp;exif_style=$exif_style&amp;show_thumbs=$show_thumbs\">";
+ if (file_exists("$gallery_dir/$gallery/thumbs/img-$prev.png")) {
+ $Pthumb = "$gallery_dir/$gallery/thumbs/img-$prev.png";
+ } else {
+ $Pthumb = "$gallery_dir/$gallery/thumbs/img-$prev.jpg";
+ }
+ $v = getimagesize("$root/$Pthumb");
+ echo "<img alt=\"Previous\" src=\"";
+ echo $Pthumb . "\" width=\"" . round($v[0]/$PNthumbScale);
+ echo "\" height=\"" . round($v[1]/$PNthumbScale) . "\" />";
+ echo "<br />Previous";
+ echo "</a></div>\n";
+ }
+ } else { //next thumbnail
+ if (is_file("$gallery_dir/$gallery/lq/img-$next.jpg")) {
+ echo "<div class=\"nextthumb\">";
+ echo "<a href=\"$ThisScript?galerie=$gallery&amp;snimek=$next";
+ echo "&amp;exif_style=$exif_style&amp;show_thumbs=$show_thumbs\">";
+ if (file_exists("$gallery_dir/$gallery/thumbs/img-$next.png")) {
+ $Nthumb = "$gallery_dir/$gallery/thumbs/img-$next.png";
+ } else {
+ $Nthumb = "$gallery_dir/$gallery/thumbs/img-$next.jpg";
+ }
+ $v = getimagesize("$root/$Nthumb");
+ echo "<img alt=\"Next\" src=\"";
+ echo $Nthumb . "\" width=\"" . round($v[0]/$PNthumbScale);
+ echo "\" height=\"" . round($v[1]/$PNthumbScale) . "\" />";
+ echo "<br />Next";
+ echo "</a></div>\n";
+ }
+ }
+
+}
+
+function check($file) {
+ global $gallery_dir, $page;
+
+# if (eregi("[^0-9a-z\_\-\ ]",$file) || !file_exists("$gallery_dir/$file")) {
+# if (eregi("CVS",$file) || !file_exists("$gallery_dir/$file")) {
+ if (!file_exists("$gallery_dir/$file")) {
+ echo "funkce.inc.php/check(): Bad input";
+ $page->footer();
+ exit;
+ }
+}
+
+function browserCheck() {
+ global $HTTP_USER_AGENT;
+
+ if (eregi("(MSIE.[456789]).*Mac.*",$HTTP_USER_AGENT)) {
+ return("macie4+");
+ } elseif (eregi("(MSIE.[678])",$HTTP_USER_AGENT)) {
+ return("ie6+");
+ } elseif (eregi("(MSIE.[45])",$HTTP_USER_AGENT)) {
+ return("ie4+");
+ } elseif (eregi("Opera",$HTTP_USER_AGENT)) {
+ return("opera");
+ } elseif (eregi("(Mozilla.4)",$HTTP_USER_AGENT)) {
+ return("netscape4");
+ } elseif (eregi("(Mozilla.[5-9])",$HTTP_USER_AGENT)) {
+ return("mozilla");
+ } elseif (eregi("KMeleon",$HTTP_USER_AGENT)) {
+ return("mozilla");
+ } else {
+ return("Netscape3");
+ }
+}
+
+?>
diff --git a/www/inc/header.inc.php b/www/inc/header.inc.php
new file mode 100644
index 0000000..3242c1c
--- /dev/null
+++ b/www/inc/header.inc.php
@@ -0,0 +1,14 @@
+<div class="stylenavbar">
+[ style:
+<?
+foreach ($themes as $skin => $url) {
+ echo "<a href=\"#\" title=\"$skin\"";
+ echo " onclick=\"setActiveStyleSheet('$skin')\">";
+ echo "$skin</a> \n";
+}
+?>
+]
+</div>
+<?
+echo "<h1 class=\"title\"><a href=\"http://$HostName$ThisScript\">Photo Gallery<span /></a></h1>\n\n";
+?>
diff --git a/www/inc/javascript-eek.inc.php b/www/inc/javascript-eek.inc.php
new file mode 100644
index 0000000..3672c8c
--- /dev/null
+++ b/www/inc/javascript-eek.inc.php
@@ -0,0 +1,112 @@
+<script language="JavaScript">
+// javascript snipplets mostly nicked from
+// http://liorean.web-graphics.com/scripts
+
+//cookie handling
+
+var cookie={ // The Cookie Handler main object
+ Get:function(n){ // Function for getting cookies
+ var re=new RegExp(n+'=([^;]*);?','gi'); // Create regex for cookies fetching
+ var r=re.exec(document.cookie)||[]; // Fetch cookie using regex
+ return unescape(r.length>1?r[1]:null) // Return unescaped cookie
+ },
+ Set:function(n,v,e,p,d,s){ // Function for setting cookies
+ var t=new Date; // Get current time and date
+ if(e) // If days to expiry is set
+ t.setTime(t.getTime()+(e*8.64e7)); // calculate expiry date
+ document.cookie=n+'='+escape(v)+'; '+(!e?'':'; expires='+t.toUTCString())+(!p?'':'; path='+p)+(!d?'':'; domain='+d)+(!s?'':'; secure') // Set cookie
+ },
+ Del:function(n,p,d){ // Function for deleting cookies
+ var t=cookie.Get(n); // Get cookie
+ document.cookie=n+'='+(!p?'':'; path='+p)+(!d?'':'; domain='+d)+'; expires=Thu, 01-Jan-70 00:00:01 GMT'; // Delete cookie
+ return t // Return the deleted cookie
+ },
+ Sup:function(){ // Function for detecting cookies support
+ cookie.Set('c',true); // Set dummy cookie
+ return cookie.Del('c'); // Return whether dummy was written
+ }
+};
+
+
+// theme switching
+
+var style={ // Theme Switcher main object
+ Set:function(t){ // Function for setting active theme
+ for(var i in this.col) // For each existing title
+ for(var j=0,f;(f=(j<this.col[i].length)?this.col[i][j]:null);j++) // And all stylesheets of that title
+ f.disabled=i!=t?true:false; // Set to enabled or disabled depending on whether title matches user input
+ },
+ Get:function(){ // Function for determining active theme
+ for(var i in this.col) // For each existing title
+ if(!this.col[i][0].disabled) // Unless disabled
+ return i; // Return title
+ return this.Pref() // Otherwise try to determine preferred title
+ },
+ Pref:function(){ // Function to determine preferred title
+ for(var i in this.col) // For each existing title
+ if(!this.col[i][0].disabled) // Unless disabled
+ return i; // Return title
+ return null // Otherwise return null
+ },
+ sum:function(){ // Function to collect existing titles into a collection
+ var s=document.styleSheets,i=0; // Set needed variables
+ for(var f;(f=(i<s.length)?s[i]:null);i++) // For each existing stylesheet
+ switch(f.title){ // Read title
+ case '': // If none or blank
+ break; // Exit
+ default: // Otherwise
+ switch(typeof this.col[f.title]){ // Read title
+ case 'object': // If exists in collection
+ this.col[f.title][this.col[f.title].length]=f; // Add stylesheet to that title in the collection
+ break; // Exit
+ default: // Otherwise
+ this.col[f.title]=[f] // Add new titla to collection and add stylesheet to that title
+ }
+ }
+ },
+ onload:function(){ // Function to send to onload handler
+ style.sum(); // Collect titles
+ if(cookie.Sup()){ // If cookies support exists
+ var c=cookie.Get('style'); // Get preferred theme from cookie
+ style.Set(c||style.Pref()) // Otherwise use the author specified
+ }
+ },
+ onunload:function(){ // Function to send to onunload handler
+ if(cookie.Sup()){ // If cookies support exists
+ var s=style.Get(); // Get active theme
+ cookie.Set('style',s,356,'/') // Write active theme to cookie
+ }
+ },
+ col:{} // Collection for titles
+};
+
+event.Add(style.onload); // Add onload handler
+window.onunload=style.onunload; // Add onunload handler
+
+
+// IE/Mac voodoo
+
+var event={ // The Event Handler main object
+ Add:function(f){ // Function for adding onload handlers
+ event.col[event.col.length]=f; // Add event handler to collection
+ if(typeof window.addEventListener!='undefined') // If W3C compliant
+ window.addEventListener('load',f,false); // Apply event handler
+ else if(!event.ieSet) // Otherwise, unless already set
+ if(typeof document.onreadystatechange!='undefined') // If supported
+ document.onreadystatechange=event.onload; // Add In event handler handler
+ event.ieSet=true; // Specify that event handler already is set
+ return(typeof window.addEventListener!='undefined') // Return whether W3C compliant
+ },
+ onload:function(){ // Function for handling multiple onload handlers in IE
+ var m=/mac/i.test(navigator.platform); // Detect whether mac
+ if(typeof document.readyState!='undefined') // If supported
+ if(m?document.readyState!='interactive':document.readyState!='complete') // And not already finished
+ return; // Exit
+ for(var i=0,f;(f=(i<event.col.length)?event.col[i]:null);i++) // For all event handlers
+ f(); // Run event handler
+ return // Exit
+ },
+ ieSet:false, // Variable to say whether event handler is set or not
+ col:[] // Collection for event handlers
+};
+</script>
diff --git a/www/inc/javascript.inc.php b/www/inc/javascript.inc.php
new file mode 100644
index 0000000..f2e3deb
--- /dev/null
+++ b/www/inc/javascript.inc.php
@@ -0,0 +1,51 @@
+<script language="JavaScript">
+function setActiveStyleSheet(title) {
+ var i, a, main;
+ for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
+ if(a.getAttribute("rel").indexOf("style") != -1
+ && a.getAttribute("title")) {
+ a.disabled = true;
+ if(a.getAttribute("title") == title) a.disabled = false;
+ }
+ }
+ if (title!="") {
+ writeCookie(title);
+ }
+}
+
+function getInactiveStyleSheet() {
+ var i, a;
+ for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
+ if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && a.disabled) return a.getAttribute("title");
+ }
+ return null;
+}
+
+function readCookie() {
+ var theme = document.cookie;
+ var theme = unescape(theme);
+
+ return theme;
+}
+
+function writeCookie(theme) {
+ //FIXME - set expires
+ var original_cookie = "theme=" + escape(theme);
+ document.cookie = original_cookie;
+}
+
+function checkForTheme() {
+ var theme = readCookie();
+ //alert(theme);
+ if (theme=="undefined") {
+ var theme = "none";
+ }
+}
+
+// what a kludge. Luckily I found a clean way
+function alignForGorilla() {
+var image_preview = document.getElementById('preview');
+image_preview.style.marginLeft = "-" + (image_preview.width/2 + 16) + "px";
+}
+
+</script>
diff --git a/www/inc/styles/CVS/Entries b/www/inc/styles/CVS/Entries
new file mode 100644
index 0000000..138bf3e
--- /dev/null
+++ b/www/inc/styles/CVS/Entries
@@ -0,0 +1,2 @@
+D/gorilla////
+D/default////
diff --git a/www/inc/styles/CVS/Repository b/www/inc/styles/CVS/Repository
new file mode 100644
index 0000000..4339a69
--- /dev/null
+++ b/www/inc/styles/CVS/Repository
@@ -0,0 +1 @@
+original/www/inc/styles
diff --git a/www/inc/styles/CVS/Root b/www/inc/styles/CVS/Root
new file mode 100644
index 0000000..16bd216
--- /dev/null
+++ b/www/inc/styles/CVS/Root
@@ -0,0 +1 @@
+:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original
diff --git a/www/inc/styles/default/CVS/Entries b/www/inc/styles/default/CVS/Entries
new file mode 100644
index 0000000..9eaa230
--- /dev/null
+++ b/www/inc/styles/default/CVS/Entries
@@ -0,0 +1,12 @@
+/bcg.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+/default.css/1.1/Wed Oct 29 00:47:30 2003//
+/left-16.png/1.1/Tue Apr 8 13:23:53 2003/-kb/
+/left.png/1.1/Wed Apr 23 11:03:22 2003/-kb/
+/logo-mini.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+/minus.png/1.1/Thu Mar 28 19:34:49 2002/-kb/
+/plus.png/1.1/Thu Mar 28 19:34:49 2002/-kb/
+/right-16.png/1.1/Tue Apr 8 13:24:17 2003/-kb/
+/right.png/1.1/Wed Apr 23 11:04:26 2003/-kb/
+/title.png/1.1/Tue Oct 28 21:54:11 2003/-kb/
+/zip.png/1.1/Fri May 23 12:44:44 2003/-kb/
+D
diff --git a/www/inc/styles/default/CVS/Repository b/www/inc/styles/default/CVS/Repository
new file mode 100644
index 0000000..ec15a90
--- /dev/null
+++ b/www/inc/styles/default/CVS/Repository
@@ -0,0 +1 @@
+original/www/inc/styles/default
diff --git a/www/inc/styles/default/CVS/Root b/www/inc/styles/default/CVS/Root
new file mode 100644
index 0000000..16bd216
--- /dev/null
+++ b/www/inc/styles/default/CVS/Root
@@ -0,0 +1 @@
+:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original
diff --git a/www/inc/styles/default/bcg.png b/www/inc/styles/default/bcg.png
new file mode 100644
index 0000000..d4f7ac8
--- /dev/null
+++ b/www/inc/styles/default/bcg.png
Binary files differ
diff --git a/www/inc/styles/default/default.css b/www/inc/styles/default/default.css
new file mode 100644
index 0000000..482267d
--- /dev/null
+++ b/www/inc/styles/default/default.css
@@ -0,0 +1,285 @@
+/* Default stylesheet
+ ==================
+
+ stylesheet & artwork
+ (c) 2003 Jakub 'jimmac' Steiner
+
+*/
+
+body {
+ background-color: #f6f6f6;
+ background: url("bcg.png") top left repeat;
+ /*
+ margin: 0px 50px 0px 50px;
+ width: auto;
+ */
+ margin: auto;
+ width: 770px;
+ font-family: "Bitstream Vera Sans", sans-serif;
+ font-size: 10pt;
+}
+
+img {
+ border: 0px;
+}
+
+a:link {
+ color: #909090;
+}
+
+a:visited {
+ color: #808080;
+}
+
+a:hover {
+ color: #f0f0f0;
+ background-color: #707070;
+}
+
+
+h1.title {
+ background-color: #a7a9a6;
+ font-size: 16pt;
+ color: #808080;
+ width: 100%;
+ margin-bottom: 0px;
+ padding: 5px;
+
+}
+
+.title a {
+ display: block;
+ position:relative;
+ width:100%;
+ height:48px;
+ margin:0; padding:0;
+}
+
+.title a:hover {
+ border: 0px;
+ background-color: #a7a9a6;
+}
+
+.title a span {
+ /* this overlays text below with an image */
+ display: block;
+ position:absolute; left:0; top:0; z-index:1;
+ width:338px; height:48px;
+ margin:0; padding:0;
+ background-image: url("title.png");
+ background-attachment: top left;
+ background-repeat: no-repeat;
+}
+
+div.thumbroll {
+ margin: 10px 0px 4px 0px;
+ min-height: 29px;
+}
+
+p.bigthumbnails {
+ text-align: center;
+}
+
+p.bigthumbnails a {
+ padding: 0px;
+ margin: 0px;
+ border: 0px;
+
+}
+/*
+p.bigthumbnails a:link img {
+ border: 1px solid white;
+}
+
+p.bigthumbnails a:hover img {
+ border: 1px solid #909090;
+
+}
+*/
+
+a#minus,a#plus {
+ display: block;
+ position: relative;
+ float: left;
+ width:24px;
+ height:24px;
+ margin:0px; padding:0px;
+}
+
+a#minus {
+ background: url("minus.png") top left no-repeat;
+}
+
+a#plus {
+ background: url("plus.png") top left no-repeat;
+}
+
+a#zip {
+ /* display: block; */
+ position: relative;
+ width:16px;
+ height:16px;
+ margin:0px; padding:0px;
+ font-size: 9px;
+}
+
+a#zip span {
+ background: url("zip.png") top left no-repeat;
+ position:absolute; left:0; top:0; z-index:1;
+ width:16px; height:16px;
+}
+
+div.navigation {
+ background-color: #f6f6f6;
+ width: 100%;
+ padding: 5px;
+ font-size: 10px;
+}
+
+div.navigation a {
+ color: #a0a0a0;
+ font-weight: bold;
+}
+
+div.footer {
+ font-size: 9px;
+ width: 100%;
+ margin-top: 40px;
+ padding: 5px 5px 20px 5px;
+ clear: both;
+ border-top: 1px dotted #909090;
+}
+
+div.year {
+ font-size: 11pt;
+ float: left;
+ margin: 10px;
+}
+
+div.month {
+ margin: 0px 0px 0px 2em;
+ padding: 2px;
+}
+
+div.month h4 {
+ margin: 0px 0px 3px 0px;
+}
+
+/* ul won't work on safari with float: left */
+div.month p {
+ margin: 2px;
+ padding: 0px 0px 0px 6px;
+ list-style: none;
+ font-size: 10px;
+}
+
+div#image {
+ /* width: 800px; */
+ display: block;
+ position: relative;
+ clear: both;
+ margin-left: auto;
+ margin-right: auto;
+ /* border: 1px solid black; */
+ min-height: 480px; /* only works in gecko :/ */
+}
+
+img#preview {
+ position: relative;
+ float: left;
+ margin-right: 8px;
+}
+
+div.comment {
+ margin: 2em 0px;
+ color: #808080;
+ font-size: 9px;
+}
+
+div.comment span {
+ color: black;
+ font-weight: bold;
+ font-size: 10px;
+}
+
+div.navbuttons {
+ position: absolute;
+ top: 580px; left: 50%;
+ margin-left: 260px; /* 260px to the right of the center of the page */
+ width: 64px; height: 32px;
+ z-index: 1;
+}
+
+div.navbuttonsshell {
+ position: relative;
+ width: 100%;
+ margin: 2px;
+}
+
+div.navbuttonsshell a#previcon {
+ display: block;
+ position: absolute;
+ width: 24px; height: 24px;
+ margin: 2px; padding: 0;
+ top: 0px;
+ left: 0px;
+ color: #f6f6f6;
+ font-size: 30px; /* make unreadable */
+ text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */
+ overflow: hidden; /* hide the oveflow text */
+ background: url("left.png") top left no-repeat; /* have a pixmap */
+}
+
+div.navbuttonsshell a#nexticon {
+ display: block;
+ position: absolute;
+ width: 24px; height: 24px;
+ margin: 2px 4px 2px auto; padding: 0;
+ right: 4px; top: 0px;
+ color: #f6f6f6;
+ font-size: 30px; /* make unreadable */
+ text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */
+ overflow: hidden; /* hide the overflow text */
+ background: url("right.png") top left no-repeat; /* have a pixmap */
+}
+
+
+div.prevthumb,div.nextthumb {
+ margin-bottom: 1em;
+}
+
+div.nextthumb a,div.prevthumb a {
+ text-decoration: none;
+}
+
+div#mqhq {
+ margin: 2px 2px 4px 0px;
+ height: 32px;
+}
+
+div#mqhq a {
+ display: block;
+ border: 1px solid #909090;
+ padding: 2px;
+ font-size: 10px;
+ background-color: #f6f6f6;
+ color: black;
+ float: left;
+ width: 48px;
+ text-align: center;
+ margin: 2px;
+ -moz-border-radius: 2px;
+}
+
+div#mqhq a:hover {
+ background-color: #909090;
+ border: 1px solid black;
+ color: white;
+}
+
+div.stylenavbar {
+ position:relative;
+ font-size: 9px;
+ margin: 4px 0px;
+ padding-bottom: 0px;
+}
diff --git a/www/inc/styles/default/left-16.png b/www/inc/styles/default/left-16.png
new file mode 100644
index 0000000..625a1ab
--- /dev/null
+++ b/www/inc/styles/default/left-16.png
Binary files differ
diff --git a/www/inc/styles/default/left.png b/www/inc/styles/default/left.png
new file mode 100644
index 0000000..bd5607c
--- /dev/null
+++ b/www/inc/styles/default/left.png
Binary files differ
diff --git a/www/inc/styles/default/logo-mini.png b/www/inc/styles/default/logo-mini.png
new file mode 100644
index 0000000..8949154
--- /dev/null
+++ b/www/inc/styles/default/logo-mini.png
Binary files differ
diff --git a/www/inc/styles/default/minus.png b/www/inc/styles/default/minus.png
new file mode 100644
index 0000000..19eaef3
--- /dev/null
+++ b/www/inc/styles/default/minus.png
Binary files differ
diff --git a/www/inc/styles/default/plus.png b/www/inc/styles/default/plus.png
new file mode 100644
index 0000000..062d005
--- /dev/null
+++ b/www/inc/styles/default/plus.png
Binary files differ
diff --git a/www/inc/styles/default/right-16.png b/www/inc/styles/default/right-16.png
new file mode 100644
index 0000000..42e783f
--- /dev/null
+++ b/www/inc/styles/default/right-16.png
Binary files differ
diff --git a/www/inc/styles/default/right.png b/www/inc/styles/default/right.png
new file mode 100644
index 0000000..bc5bcc5
--- /dev/null
+++ b/www/inc/styles/default/right.png
Binary files differ
diff --git a/www/inc/styles/default/title.png b/www/inc/styles/default/title.png
new file mode 100644
index 0000000..8a6ad6b
--- /dev/null
+++ b/www/inc/styles/default/title.png
Binary files differ
diff --git a/www/inc/styles/default/zip.png b/www/inc/styles/default/zip.png
new file mode 100644
index 0000000..0bc44ab
--- /dev/null
+++ b/www/inc/styles/default/zip.png
Binary files differ
diff --git a/www/inc/styles/gorilla/CVS/Entries b/www/inc/styles/gorilla/CVS/Entries
new file mode 100644
index 0000000..ad515e3
--- /dev/null
+++ b/www/inc/styles/gorilla/CVS/Entries
@@ -0,0 +1,7 @@
+/minus.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+/plus.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+/title.png/1.1/Mon Oct 27 11:01:36 2003/-kb/
+/gorilla.css/1.4/Wed Oct 29 00:23:08 2003//
+/left.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+/right.png/1.1/Tue Oct 21 06:45:11 2003/-kb/
+D
diff --git a/www/inc/styles/gorilla/CVS/Repository b/www/inc/styles/gorilla/CVS/Repository
new file mode 100644
index 0000000..887b74e
--- /dev/null
+++ b/www/inc/styles/gorilla/CVS/Repository
@@ -0,0 +1 @@
+original/www/inc/styles/gorilla
diff --git a/www/inc/styles/gorilla/CVS/Root b/www/inc/styles/gorilla/CVS/Root
new file mode 100644
index 0000000..16bd216
--- /dev/null
+++ b/www/inc/styles/gorilla/CVS/Root
@@ -0,0 +1 @@
+:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original
diff --git a/www/inc/styles/gorilla/gorilla.css b/www/inc/styles/gorilla/gorilla.css
new file mode 100644
index 0000000..9b23168
--- /dev/null
+++ b/www/inc/styles/gorilla/gorilla.css
@@ -0,0 +1,258 @@
+/* Gorilla stylesheet
+ ==================
+
+ stylesheet & artwork
+ (c) 2003 Jakub 'jimmac' Steiner
+
+ bugs/TODO:
+
+ * navbuttons overlap minithubroll if there's many images
+*/
+
+body {
+ background-color: #dedfce;
+ margin: 0px 50px 0px 50px;
+ width: auto;
+ /*
+ margin: auto;
+ width: 780px;
+ */
+ font-family: "Bitstream Vera Sans", sans-serif;
+ font-size: 10pt;
+}
+
+img {
+ border: 0px;
+}
+
+a {
+}
+
+a:hover {
+}
+
+h1.title {
+ background-color: black;
+ font-size: 16pt;
+ color: #808080;
+ width: 100%;
+ margin-bottom: 0px;
+ padding: 5px;
+
+}
+
+.title a {
+ display: block;
+ position:relative;
+ width:100%;
+ height:48px;
+ margin:0; padding:0;
+}
+
+.title a span {
+ /* this overlays text below with an image */
+ display: block;
+ position:absolute; left:0; top:0; z-index:1;
+ width:400px; height:48px;
+ margin:0; padding:0;
+ background-image: url("title.png");
+ background-attachment: top left;
+ background-repeat: no-repeat;
+}
+
+div.thumbroll {
+ position: relative;
+ margin: 10px 0px 4px 0px;
+ min-height: 28px;
+}
+
+a#minus,a#plus {
+ display: block;
+ position: relative;
+ float: left;
+ width:24px;
+ height:24px;
+ margin:0px; padding:0px;
+}
+
+a#minus {
+ background: url("minus.png") top left no-repeat;
+}
+
+a#plus {
+ background: url("plus.png") top left no-repeat;
+}
+
+.navigation {
+ background-color: #505050;
+ width: 100%;
+ padding: 5px;
+ font-size: 10px;
+ clear: both;
+}
+
+.navigation a {
+ color: #a0a0a0;
+ font-weight: bold;
+}
+
+div.footer {
+ font-size: 9px;
+ background-color: #d9dac9;
+ width: 100%;
+ margin-top: 2em;
+ padding: 5px 5px 20px 5px;
+ clear: both;
+}
+
+div.year {
+ font-size: 11pt;
+ float: left;
+ margin: 10px;
+}
+
+div.month {
+ margin: 0px 0px 0px 2em;
+ padding: 2px;
+}
+
+div.month h4 {
+ margin: 0px 0px 3px 0px;
+}
+
+/* ul won't work on safari with float: left */
+div.month p {
+ margin: 2px;
+ padding: 0px 0px 0px 6px;
+ list-style: none;
+ font-size: 10px;
+}
+
+div#image {
+ position: relative;
+ display: block;
+ clear: both;
+ margin-left: auto;
+ margin-right: auto;
+ /* border: 1px solid black; */
+ min-height: 480px; /* only works in gecko :/ */
+ height: 500px;
+}
+
+img#preview {
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+ left: 0px;
+ margin-left: auto;
+ margin-right: auto;
+ /* margin-left: -320px; later fixed by javascript; what a kludge this was */
+}
+
+div.comment {
+ margin: 2em 0px;
+ color: #808080;
+ font-size: 9px;
+}
+
+div.comment span {
+ color: black;
+ font-weight: bold;
+ font-size: 10px;
+}
+
+div.prevthumb,div.nextthumb {
+ position: absolute;
+ margin-bottom: 1em;
+ width: 120px;
+ height: 140px;
+}
+
+div.prevthub {
+ top: 0px;
+ left: 0px;
+ text-align: right;
+}
+
+div.nextthumb {
+ margin-left: auto;
+ right: 0px;
+ top: 0px;
+}
+
+div.nextthumb a,div.prevthumb a {
+ text-decoration: none;
+}
+
+div#mqhq a {
+ display: block;
+ border: 2px solid black;
+ padding: 2px;
+ font-size: 10px;
+ font-weight: bold;
+ background-color: #d1940c;
+ color: black;
+ float: left;
+ width: 48px;
+ text-align: center;
+ margin: 2px;
+
+}
+
+div.navbuttons {
+ position: absolute;
+ top: 140px; left: 50%;
+ margin-left: -50px;
+ width: 64px; height: 32px;
+ z-index: 1;
+}
+
+div.navbuttonsshell {
+ position: relative;
+ width: 100%;
+ margin: 2px;
+}
+
+div.navbuttonsshell a#previcon {
+ display: block;
+ position: absolute;
+ width: 24px; height: 24px;
+ margin: 2px; padding: 0;
+ top: 0px;
+ left: 0px;
+ color: #f6f6f6;
+ font-size: 30px; /* make unreadable */
+ text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */
+ overflow: hidden; /* hide the oveflow text */
+ background: url("left.png") top left no-repeat; /* have a pixmap */
+}
+
+div.navbuttonsshell a#nexticon {
+ display: block;
+ position: absolute;
+ width: 24px; height: 24px;
+ margin: 2px 4px 2px auto; padding: 0;
+ right: 4px; top: 0px;
+ color: #f6f6f6;
+ font-size: 30px; /* make unreadable */
+ text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */
+ overflow: hidden; /* hide the overflow text */
+ background: url("right.png") top left no-repeat; /* have a pixmap */
+}
+div#mqhq {
+ margin: 2px 2px 4px 0px;
+ height: 32px;
+}
+
+div.stylenavbar {
+ position:relative;
+ /*
+ left: 0px;
+ right: auto;
+ top:auto;
+ bottom:0px;
+ */
+ margin: 2px;
+ font-size: 9px;
+}
diff --git a/www/inc/styles/gorilla/left.png b/www/inc/styles/gorilla/left.png
new file mode 100644
index 0000000..63d306c
--- /dev/null
+++ b/www/inc/styles/gorilla/left.png
Binary files differ
diff --git a/www/inc/styles/gorilla/minus.png b/www/inc/styles/gorilla/minus.png
new file mode 100644
index 0000000..bc7a830
--- /dev/null
+++ b/www/inc/styles/gorilla/minus.png
Binary files differ
diff --git a/www/inc/styles/gorilla/plus.png b/www/inc/styles/gorilla/plus.png
new file mode 100644
index 0000000..6b103cd
--- /dev/null
+++ b/www/inc/styles/gorilla/plus.png
Binary files differ
diff --git a/www/inc/styles/gorilla/right.png b/www/inc/styles/gorilla/right.png
new file mode 100644
index 0000000..f998098
--- /dev/null
+++ b/www/inc/styles/gorilla/right.png
Binary files differ
diff --git a/www/inc/styles/gorilla/title.png b/www/inc/styles/gorilla/title.png
new file mode 100644
index 0000000..275528f
--- /dev/null
+++ b/www/inc/styles/gorilla/title.png
Binary files differ
diff --git a/www/inc/styles/ie/ie.css b/www/inc/styles/ie/ie.css
new file mode 100644
index 0000000..36cd2c4
--- /dev/null
+++ b/www/inc/styles/ie/ie.css
@@ -0,0 +1,8 @@
+/* IE sucks; this is the only stylesheet doesn't crash it
+ this is low priority for me; if you want a nice stylesheet for IE
+ (if such thing can be written), please send a patch to jimmac@ximian.com
+*/
+
+body {
+ font-family: Verdana, Sans-Serif;
+}
diff --git a/www/inc/stylesheet.inc.css b/www/inc/stylesheet.inc.css
new file mode 100644
index 0000000..9415271
--- /dev/null
+++ b/www/inc/stylesheet.inc.css
@@ -0,0 +1,141 @@
+<!--
+ body {
+ <?php if ($this->background) echo "background-image: url('" . $this->background . "');\n";?>
+ background-color: <?php echo $this->bgcolor?>;
+ font-family: <?php echo $this->font?>;
+ font-size: <?php echo $this->fontsize?>;
+ color: <?php echo $this->textcol?>;
+ }
+
+ a:link {
+ color: <?php echo $this->link?>;
+ }
+
+ a:visited {
+ color: <?php echo $this->vlink?>;
+ }
+
+ a:active {
+ color: <?php echo $this->alink?>;
+ }
+
+ a:hover {
+ color: <?php echo $this->hover?>;
+ }
+
+ td {
+ font-family: <?php echo $this->font?>;
+ font-size: <?php echo $this->fontsize?>;
+ }
+
+ input {
+ font-family: <?php echo $this->font?>;
+ font-size: <?php echo $this->fontsize?>;
+ }
+ .navigation {
+ color: white;
+ background-color: #808080;
+ padding-top: 2px;
+ padding-bottom: 3px;
+ padding-left: 4px;
+ padding-right: 4px;
+ }
+
+ p.exif {
+ font-size: 9px;
+ }
+
+ p.navigation a {
+ color: #f0f0f0;
+ font-weight: bold;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ border: 0px;
+ text-align: left;
+ }
+
+ p.copyright {
+ clear: both;
+ padding-top: 4ex;
+ font-size: 9px;
+ text-align: left;
+ text-decoration: none;
+ }
+
+ h1 {
+ letter-spacing: .5em;
+ }
+
+ img {
+ /* makes really interesting stuff on nn4 ;)
+ display: inline; */
+ margin: 2px;
+ border-top: solid black 1px;
+ border-bottom: solid black 1px;
+ border-left: dotted #808080 1px;
+ border-right: dotted #808080 1px;
+ }
+
+ .navigation img, div.title img {
+ border: 0px;
+ margin: 0px;
+ text-align: left;
+ }
+
+ div.title {
+ font-size: 16pt;
+ font-weight: bold;
+ letter-spacing: .5em;
+ }
+
+ div.title a {
+ text-decoration: none;
+ }
+
+ p.image img {
+ /* margin-left: 10px; */
+ border: 0px;
+ margin: 0px;
+ text-align: center;
+ /*
+ border-bottom: 0px;
+ margin-bottom: 0px;
+ */
+ }
+
+ p.comment {
+ font-size: 10px;
+ text-align: justify;
+ color: #606060;
+ width: 640px;
+ /* margin-left: 130px; */
+ }
+
+ span {
+ color: black;
+ font-weight: bold;
+ }
+
+ img.thumb {
+ border: 1px black solid;
+ margin-top: 2px;
+ margin-bottom: 2px;
+ }
+
+ a:hover img.thumb {
+ border: 1px white solid;
+ }
+
+ div.year {
+ float: left;
+ margin: 2px 1em;
+ }
+
+ div.year p {
+ margin: 2px 2em;
+ }
+
+ div.year h4 {
+ margin: 1em 1em 2px 1em;
+ }
+-->
diff --git a/www/inc/www.class.inc.php b/www/inc/www.class.inc.php
new file mode 100644
index 0000000..6fa319e
--- /dev/null
+++ b/www/inc/www.class.inc.php
@@ -0,0 +1,210 @@
+<?php
+// www.class.inc.php
+class C_www {
+ var $background, $bgcolor, $link, $vlink, $alink, $hover, $language;
+ var $textcol, $font, $fontsize;
+
+ function C_www ($bgcolor="#ffffff", $link="blue", $vlink="#000000",
+ $alink="red", $hover="green",
+ $font="Bitstream Vera Sans, sans-serif",
+ $fontsize="11px", $textcol="black") {
+ #init colors etc
+
+ $this->bgcolor = $bgcolor;
+ $this->link = $link;
+ $this->vlink = $vlink;
+ $this->alink = $alink;
+ $this->hover = $hover;
+ $this->font = $font;
+ $this->fontsize = $fontsize;
+ $this->textcol = $textcol;
+ }
+
+ ////
+ // !vykpise HTML hlavicku dokumentu
+ // Ten CSS style jeste neni moc dodelanej
+ function header($title) {
+ global $gallery_dir,$root, $snimek, $galerie, $ThisScript, $themes;
+
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n";
+ echo " \"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd\">\n";
+
+ echo "<html>\n";
+ echo "<head>\n";
+ echo " <title>$title</title>\n";
+ # mozilla style links
+ if ($snimek && $galerie) {
+ #Top
+ echo " <link rel=\"Top\" href=\"$ThisScript\" />\n";
+ #First
+ #Prev
+ $predchozi = $snimek - 1;
+ $dalsi = $snimek + 1;
+ if ($snimek > 1) {
+ echo " <link rel=\"First\" ";
+ echo " href=\"$ThisScript?galerie=$galerie&amp;snimek=1\" />\n";
+ echo " <link rel=\"Previous\" ";
+ echo "href=\"$ThisScript?galerie=$galerie&amp;snimek=$predchozi\" />\n";
+ }
+ #Next
+ if (is_file("$gallery_dir/$galerie/lq/img-$dalsi.jpg")) {
+ echo " <link rel=\"Next\" ";
+ echo " href=\"$ThisScript?galerie=$galerie&amp;snimek=$dalsi\" />\n";
+ }
+ #Last
+ $adr = opendir("$gallery_dir/$galerie/thumbs/");
+ $i = -2;
+ while ($file = readdir($adr)) {
+ $i++;
+ }
+ if ($i!=$snimek) {
+ echo " <link rel=\"Last\" ";
+ echo " href=\"$ThisScript?galerie=$galerie&amp;snimek=$i\" />\n";
+ }
+ }
+
+ /* check the theme in a cookie */
+ $theme = $_COOKIE["theme"];
+ if (!$theme) { //we didn't set the cookie yet
+ if (browserCheck()=="ie6+" || browserCheck()=="ie4+") {
+ $theme = "ie"; //IE crashes on other themes
+ } else {
+ $theme = "default";
+ }
+ }
+ foreach ($themes as $skin => $url) {
+ echo "<link type=\"text/css\" rel=\"";
+ if ($skin==$theme) {
+ echo "stylesheet";
+ } else {
+ echo "alternate stylesheet";
+ }
+ echo "\" href=\"$url\" title=\"$skin\"";
+ echo " media=\"screen\" />\n";
+ }
+
+ require("javascript.inc.php");
+ echo "</head>\n\n";
+ echo "<body onload=\"checkForTheme()";
+ echo "\">\n";
+ }
+
+ ////
+ // !zavre html stranku
+ function footer() {
+ echo "</body>\n";
+ echo "</html>\n";
+ }
+
+ ////
+ // !vypise chybovou hlasku
+ // $title - nadpis a title HTML stranky
+ // $message - vlastni chybova hlaska
+ function error($title, $message) {
+ $this->header($title);
+ echo "<h1>$title</h1>\n";
+ echo $message;
+ $this->footer();
+ exit; //vysere se na vsechno
+ }
+
+
+
+ ////
+ // !zacatek fomrulare
+ function form_start($action, $method, $upload) {
+ echo "<form ";
+ if ($upload) echo "enctype=\"multipart/form-data\" ";
+ echo "target=\"_top\" action=\"$action\" method=\"$method\">\n";
+ echo "<table width=\"600\" border=\"0\">\n";
+ }
+
+ ////
+ // !konec formulare
+ function form_end() {
+ echo "</table>\n";
+ echo "</form>\n";
+ }
+
+ ////
+ // !vykresli polozku formulare
+ // umi text, password, submit, file, hidden, textarea, select
+ // u textarea je default pocet radku...
+ function input($type, $name, $value, $popis, $default) {
+ if ($type!="hidden") {
+ echo "<tr valign=\"top\">\n";
+ echo "<td>$popis</td>\n";
+ echo "<td>";
+ }
+ switch ($type) {
+ case "checkbox":
+ echo "<input type=\"$type\" name=\"$name\" value=\"$value\"";
+ if ($default) echo " checked";
+ echo ">";
+ break;
+ case "password":
+ case "text":
+ echo "<input type=\"$type\" size=\"30\" name=\"$name\" value=\"$value\">";
+ break;
+ case "file":
+ echo "<input type=\"$type\" size=\"30\" name=\"$name\">";
+ break;
+ case "hidden":
+ echo "<input type=\"$type\" name=\"$name\" value=\"$value\">\n";
+ break;
+ case "textarea":
+ echo "<textarea name=\"$name\" cols=\"40\"";
+ if ($default) {
+ echo " rows=\"$default\"";
+ } else {
+ echo " rows=\"10\"";
+ }
+ echo " wrap=\"virtual\">$value</textarea>";
+ break;
+ case "select":
+ echo "<select name=\"$name\" size=\"1\">\n";
+ while (list($optval, $option) = each($value)) {
+ echo "<option value=\"$optval\"";
+ if ($optval == $default) echo " selected";
+ echo ">";
+ echo $option;
+ echo "</option>\n";
+ }
+ echo "</select>";
+ break;
+ case "submit":
+ echo "<input type=\"$type\" name=\"$name\" value=\"$value\">";
+ break;
+ }
+ if ($type!="hidden") {
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+ }
+
+
+}
+
+# return dirs sorted
+class SortDir {
+ var $items;
+
+ function SortDir($directory) {
+ $handle=opendir($directory);
+ while ($file = readdir($handle)) {
+ if ($file != "." && $file != "..") {
+ $this->items[]=$file;
+ }
+ }
+ closedir($handle);
+ natsort($this->items);
+ }
+
+ function Read() {
+ $getback= (pos($this->items));
+ next($this->items);
+ return $getback;
+ }
+}
+
+?>
diff --git a/www/index.php b/www/index.php
new file mode 100644
index 0000000..0ef7bc8
--- /dev/null
+++ b/www/index.php
@@ -0,0 +1,284 @@
+<?php
+
+# uncomment this to check for uninitialized variables etc.:
+# error_reporting (E_ALL);
+
+# get variables from the _SERVER array in order to not
+# rely on register_globals = On
+# (this will not work with standalone PHP)
+$ThisScript=$_SERVER['PHP_SELF'];
+$ScriptFileName=$_SERVER['SCRIPT_FILENAME'];
+$HostName=$_SERVER['SERVER_NAME'];
+
+require("inc/config.inc.php");
+require("inc/www.class.inc.php");
+require("inc/funkce.inc.php");
+//session_name("navstevnik");
+//session_register("page");
+
+# always get sorted directory entries
+$adr = new SortDir("$gallery_dir");
+
+# get variables passed in from the URL:
+$galerie=$_GET["galerie"];
+$thumbsize=$_GET["thumbsize"];
+$snimek=$_GET["snimek"];
+$y=$_GET["y"];
+$cmnt=$_GET["cmnt"];
+$show_thumbs=$_GET["show_thumbs"];
+$exif_style=$_GET["exif_style"];
+
+$page = new C_www;
+//default colors
+
+if (!is_dir("$gallery_dir/$galerie/thumbs")) {
+ $galerie = "";
+}
+
+$page->header("Photos");
+require("inc/header.inc.php");
+
+// folder > tree
+echo "<div class=\"navigation\"><a href=\"$ThisScript\">Photo Gallery Index</a>";
+
+#########################################
+# Overall Gallery Index #
+#########################################
+if (!$galerie) {
+ # finish off navigation bar
+ echo "</div>\n\n";
+ /*
+ - nacti adresare
+ - setrid podle casu
+ - pro kazdy rok
+ - setrid podle mesice
+ - vypis
+ */
+# TODO: Make date file support date of the month
+# And add info to README about date files
+ while ($file = $adr->Read()) {
+ // checking for inc is only really needed when gallery_dir == $root
+ // hopefully not many galleries will be named inc ;)
+ if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") {
+ // Use date file for gallery date if avaliable
+ $datefile = "$root/$gallery_dir/$file/date.txt";
+ if (file_exists($datefile)) {
+ $date_array = file($datefile);
+ $year=trim($date_array[2]);
+ $month=trim($date_array[1]);
+ $galerieyear["$file"]=$year;
+ $galeriemonth["$file"]=$month;
+ } else { // Get Dates from modification times
+ $mtime = filemtime("$gallery_dir/$file");
+ $galerieyear["$file"] = date("Y", $mtime);
+ $galeriemonth["$file"] = date("F", $mtime);
+ }
+ }
+ }
+
+ // re-sort array in order of months - so that they will be printed in order
+ $months = array("December", "November", "October", "September", "August", "July", "June", "May", "April", "March", "February", "January");
+ for ($i = 2010; $i >= 1990; $i--) {
+ foreach ($months as $thismonth) {
+ foreach ($galeriemonth as $foldername => $month) {
+ if (strcasecmp($month, $thismonth) == 0) {
+ if ($galerieyear["$foldername"] == $i) {
+ $galerieyearordered["$foldername"]=$galerieyear["$foldername"];
+ $galeriemonthordered["$foldername"]=$galeriemonth["$foldername"];
+ }
+ }
+ }
+ }
+ }
+
+ foreach ($galerieyearordered as $file => $mtime) {
+ $year=$galerieyearordered["$file"];
+ $month=$galeriemonthordered["$file"];
+ if ($thisyear!=$year) { #if the year is not equal to the current year
+ #This is the first year
+ if ($thisyear) { echo " </div>\n</div>\n";}// end last year if this is
+ // not the first one
+ #This is a new year
+ unset($thismonth);
+ echo "<div class=\"year\"><h3>$year</h3>\n";
+ echo "";
+ }
+ # now months
+ if ($thismonth!=$month) {
+ #first one
+ if ($thismonth) { echo " </div>\n"; } // end of last month if
+ // this is not the first one
+ #new month
+ echo " <div class=\"month\"><h4>$month</h4>\n";
+ }
+
+ echo " <p><a href=\"$ThisScript?galerie=$file\">$file</a></p>\n";
+ $thisyear=$year;
+ $thismonth=$month;
+ }
+ echo " </div>\n</div>\n\n";
+
+##############################
+# Individual Gallery Index #
+##############################
+} elseif (!$snimek) {
+ # finish off navigation header
+ echo "\n &gt; $galerie</div>\n\n<p class=\"bigthumbnails\">\n";
+ //thumbnails
+ $path = "$gallery_dir/$galerie/thumbs";
+ $obrazky = new SortDir($path);
+ check($galerie); // check for nasty input
+ while ($file = $obrazky->read()) {
+ if (is_file("$path/$file") && eregi("^img-([0-9]+)\.(png|jpg)", $file, $x)) {
+ $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
+ $velikost = getimagesize("$root/$thumb");
+ echo " <a href=\"$ThisScript?galerie=$galerie&amp;snimek=${x[1]}\">";
+ echo "<img ";
+ if ($thumbsize) {
+ echo "width=\"120\" height=\"80\" ";
+ } else {
+ // scale portraits to 80 height
+ if ($velikost[0]>90) {
+ echo $velikost[3];
+ } else {
+ echo "width=\"";
+ $scaled = round($velikost[0] / 1.5);
+ echo $scaled;
+ echo "\" height=\"${velikost[0]}\"";
+ }
+ }
+ echo " src=\"$thumb\" ";
+ echo "alt=\"photo No. ${x[1]}\" />";
+ echo "</a>\n";
+ }
+ }
+ echo "</p>\n";
+ //and links to archived images:
+ echo "\n<p class=\"archives\">\n";
+ if (file_exists("$gallery_dir/$galerie/zip/mq.zip")) {
+ echo "[ <a href=\"$gallery_dir/$galerie/zip/mq.zip\">zipped MQ images</a> ] ";
+ }
+ if (file_exists("$gallery_dir/$galerie/zip/mq.tar.bz2")) {
+ echo "[ <a href=\"$gallery_dir/$galerie/zip/mq.tar.bz2\">MQ images tarball</a> ] ";
+ }
+ if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) {
+ echo "[ <a href=\"$gallery_dir/$galerie/zip/hq.zip\">zipped HQ images</a> ]";
+ }
+ if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) {
+ echo "[ <a href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">HQ images tarball</a> ]";
+ }
+ echo "</p>";
+
+#################################
+# Individual Image #
+#################################
+} else { //low-res image
+ # finish off header
+ echo "\n &gt; <a href=\"$ThisScript?galerie=$galerie\">$galerie</a>\n &gt; Photo";
+ echo " $snimek</div>";
+ $path = "$gallery_dir/$galerie/thumbs";
+ $obrazky = new SortDir("$path");
+ check($galerie);
+ $path = "$gallery_dir/$galerie/lq";
+ $file = "$path/img-$snimek.jpg";
+ if (!file_exists($file)) {
+ echo "No such image";
+ $page->footer();
+ exit;
+ }
+ $velikost = getimagesize("$root/$file");
+ /*
+ navigation($galerie, $snimek, null);
+ */
+
+ // mini thumbnail roll
+
+ if ($show_thumbs) {
+ echo "\n<!--mini thumbnail roll-->\n<div class=\"thumbroll\">";
+ echo "<a id=\"minus\" href=\"$ThisScript?galerie=$galerie&amp;snimek=$snimek";
+ echo "&amp;exif_style=$exif_style\">";
+ echo "</a>\n";
+ echo " : \n";
+ while ($thumbfile = $obrazky->read()) {
+ if ( eregi("^img-([0-9]+)\.(png|jpg)",
+ $thumbfile, $x)) {
+ $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
+ echo " <a href=\"$ThisScript?galerie=$galerie&amp;snimek=${x[1]}";
+ echo "&amp;show_thumbs=$show_thumbs&amp;exif_style=$exif_style\">";
+ echo "<img class=\"thumb\" ";
+ // hadess' hack (TM) ;)
+ if ($thumbsize) {
+ echo " width=\"24\" height=\"16\"";
+ } else {
+ $minithumb=getimagesize("$root/$thumb");
+ $w=$minithumb[0]/6;
+ $h=$minithumb[1]/6;
+ echo " width=\"$w\" height=\"$h\"";
+ }
+ echo " src=\"$thumb\" ";
+ echo "alt=\"photo No. ${x[1]}\" />";
+ echo "</a> \n";
+ }
+ }
+ if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) {
+ echo "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.zip\">";
+ echo "zip<span /></a>";
+ }
+ if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) {
+ echo "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">";
+ echo "zip<span /></a>";
+ }
+ echo "</div>\n";
+ } else {
+ // show the popup button
+ echo "\n<!--mini thumbnail popup-->\n<div class=\"thumbroll\">";
+ echo "<a id=\"plus\" href=\"$ThisScript?galerie=$galerie&amp;snimek=$snimek";
+ echo "&amp;exif_style=$exif_style&amp;show_thumbs=yes\">";
+ echo "</a>\n";
+ echo "</div>\n";
+ }
+
+ /* main image + thumbnail navigation (prev/next) */
+
+ $divheight = $velikost[1] + 10;
+ echo "<div id=\"image\" style=\"height: ${divheight}px\">\n"; // extra kludge
+ // because of tall
+ // images
+
+ echo "<img id=\"preview\" ${velikost[3]} src=\"$file\" alt=\"$snimek\" />\n";
+ navigation($galerie, $snimek, "prev");
+ navigation($galerie, $snimek, "next");
+ echo "</div>\n"; //image
+
+
+ if ($exif_prog) require("$root/inc/exif.inc.php"); // FIXME: prettify
+ $comment = "$root/$gallery_dir/$galerie/comments/$snimek.txt";
+ if (file_exists($comment)) {
+ $cmnt_array = file($comment);
+ while ($x = current($cmnt_array)) {
+ eregi("^ *(.*) *", $x, $y);
+ $cmnt .= $y[1];
+ next($cmnt_array);
+ }
+ /* php4 only
+ foreach ($cmnt_array as $x) {
+ $cmnt .= $x;
+ }
+ */
+ echo "<div class=\"comment\">$cmnt</div>";
+ }
+ echo "<div id=\"mqhq\">";
+ if (file_exists("$gallery_dir/$galerie/mq/img-$snimek.jpg")) {
+ echo "<a href=\"$gallery_dir/$galerie/mq/img-$snimek.jpg\">MQ</a> ";
+ }
+ if (file_exists("$gallery_dir/$galerie/hq/img-$snimek.jpg")) {
+ echo "<a href=\"$gallery_dir/$galerie/hq/img-$snimek.jpg\">HQ</a>";
+ }
+ echo "</div>\n"; //mqhq
+
+ navigation($galerie, $snimek, null);
+}
+
+require("inc/footer.inc.php");
+$page->footer();
+?>
diff --git a/www/left.png b/www/left.png
new file mode 100644
index 0000000..63d306c
--- /dev/null
+++ b/www/left.png
Binary files differ
diff --git a/www/logo-mini.png b/www/logo-mini.png
new file mode 100644
index 0000000..8949154
--- /dev/null
+++ b/www/logo-mini.png
Binary files differ
diff --git a/www/logo.png b/www/logo.png
new file mode 100644
index 0000000..24878c3
--- /dev/null
+++ b/www/logo.png
Binary files differ
diff --git a/www/minus.png b/www/minus.png
new file mode 100644
index 0000000..bc7a830
--- /dev/null
+++ b/www/minus.png
Binary files differ
diff --git a/www/plus.png b/www/plus.png
new file mode 100644
index 0000000..6b103cd
--- /dev/null
+++ b/www/plus.png
Binary files differ
diff --git a/www/right.png b/www/right.png
new file mode 100644
index 0000000..f998098
--- /dev/null
+++ b/www/right.png
Binary files differ
diff --git a/www/top.png b/www/top.png
new file mode 100644
index 0000000..8cc26b4
--- /dev/null
+++ b/www/top.png
Binary files differ
diff --git a/www/zip.png b/www/zip.png
new file mode 100644
index 0000000..b52d1d7
--- /dev/null
+++ b/www/zip.png
Binary files differ