limit displayed photos within index to tag selection
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index ac08129b66b777aca8d1c49d2687201da62930a2..c81a7aed35aa1c52a3946433f24f2e20259b5ff7 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -44,8 +44,42 @@ class PHPFSPOT_RPC {
 
       switch($_GET['action']) {
          case 'showphoto':
-            print "test";
+
+            $fspot->prepare_single_photo($_GET['id']);
+            $fspot->tmpl->show("body.tpl");
+
+            break;
+   
+         case 'show_available_tags':
+
+            $fspot->getAvailableTags();
+            break;
+
+         case 'show_selected_tags':
+
+            $fspot->getSelectedTags();
+            break;
+
+         case 'addtag':
+
+            $fspot->addTag($_GET['id']);
             break;
+
+         case 'deltag':
+
+            $fspot->delTag($_GET['id']);
+            break;
+
+         case 'resettags':
+
+            $fspot->resetTags();
+            break;
+
+         case 'show_photo_index':
+
+            $fspot->showPhotoIndex();
+            break;
+
       }
 
    } // process_ajax_request();