some first draft of an working photo index page
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 5 Jun 2007 20:51:35 +0000 (20:51 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 5 Jun 2007 20:51:35 +0000 (20:51 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@20 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php
phpfspot.js
rpc.php
templates/index.tpl
templates/tags.tpl

index 379ad98f5c8b28354cc5a95b48549a443e0d5eff..20ab36d2c35bd4a1bf37f497f000dda7b5078edc 100644 (file)
@@ -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()
+
 }
 
 ?>
index 4f8fd5233d1a29517d3aa4556882a776a8d96da8..ce49f350eeac7380fc43451c8fe1c3b9c239d177 100644 (file)
@@ -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 d8d0743b36bacbffe93bdd1a21e9a3797e25c1d3..c81a7aed35aa1c52a3946433f24f2e20259b5ff7 100644 (file)
--- 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();
index e38a8230f11e616aa76e2323a43cbeda86176c6c..b3e8a160c8eab1f544f4c19f912f316f931660b6 100644 (file)
@@ -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"}
index d46ac21813a8aaae3294b17af299a0503771b418..f4664f910c6cc77f7886647a4cdb5600a50104ea 100644 (file)
@@ -4,3 +4,5 @@
  The following tags have been selected: <br />
 <div id='selected_tags'>
 </div>
+<br />
+<a href="javascript:showPhotoIndex();">Photo Index</a>