summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:51:35 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:51:35 +0000
commit60b6594fad70d2d49676e02b6123385173bcdae3 (patch)
tree797c9f570b62a437741fa8c919c5d0cf53aabbeb
parentbbf969dc87143266abb170ec1334fcc444b33fb7 (diff)
some first draft of an working photo index page
git-svn-id: file:///var/lib/svn/phpfspot/trunk@20 fa6a889d-dae6-447d-9e79-4ba9a3039384
-rw-r--r--phpfspot.class.php10
-rw-r--r--phpfspot.js6
-rw-r--r--rpc.php5
-rw-r--r--templates/index.tpl2
-rw-r--r--templates/tags.tpl2
5 files changed, 24 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 379ad98..20ab36d 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -186,6 +186,16 @@ class PHPFSPOT {
} // resetTags()
+ public function showPhotoIndex()
+ {
+
+ foreach($this->avail_photos as $photo)
+ {
+ print "<img src=\"phpfspot_img.php?idx=". $photo ."&amp;width=". $this->cfg->thumb_width ."\" /><br />\n";
+ }
+
+ } // showPhotoIndex()
+
}
?>
diff --git a/phpfspot.js b/phpfspot.js
index 4f8fd52..ce49f35 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -36,3 +36,9 @@ function refreshSelectedTags()
content = document.getElementById("selected_tags");
content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags');
}
+
+function showPhotoIndex()
+{
+ content = document.getElementById("content");
+ content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_photo_index');
+}
diff --git a/rpc.php b/rpc.php
index d8d0743..c81a7ae 100644
--- a/rpc.php
+++ b/rpc.php
@@ -75,6 +75,11 @@ class PHPFSPOT_RPC {
$fspot->resetTags();
break;
+ case 'show_photo_index':
+
+ $fspot->showPhotoIndex();
+ break;
+
}
} // process_ajax_request();
diff --git a/templates/index.tpl b/templates/index.tpl
index e38a823..b3e8a16 100644
--- a/templates/index.tpl
+++ b/templates/index.tpl
@@ -5,7 +5,7 @@
{include file="tags.tpl"}
</div>
<div id="content">
- {include file="body.tpl"}
+ {include file="welcome.tpl"}
</div>
</body>
{include file="footer.tpl"}
diff --git a/templates/tags.tpl b/templates/tags.tpl
index d46ac21..f4664f9 100644
--- a/templates/tags.tpl
+++ b/templates/tags.tpl
@@ -4,3 +4,5 @@
The following tags have been selected: <br />
<div id='selected_tags'>
</div>
+<br />
+<a href="javascript:showPhotoIndex();">Photo Index</a>