X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=168d08134fc5b3461a24b23d222dc47bca7802de;hp=379ad98f5c8b28354cc5a95b48549a443e0d5eff;hb=495fee6e4ea622177353c74425d546aedf467991;hpb=193a2982417fb5b004c47cc96dcd112e1b07e47d;ds=sidebyside
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 379ad98..168d081 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -186,6 +186,40 @@ class PHPFSPOT {
} // resetTags()
+ public function getAllTagPhotos()
+ {
+ $selected = "";
+ foreach($_SESSION['selected_tags'] as $tag)
+ $selected.= $tag .",";
+ $selected = substr($selected, 0, strlen($selected)-1);
+
+ $tagged_photos = Array();
+
+ $result = $this->db->db_query("
+ SELECT DISTINCT photo_id
+ FROM photo_tags
+ WHERE tag_id IN (". $selected .")
+ ");
+
+ while($row = $this->db->db_fetch_object($result)) {
+ array_push($tagged_photos, $row['photo_id']);
+ }
+
+
+ return $tagged_photos;
+
+ } // getAllTagPhotos()
+
+ public function showPhotoIndex()
+ {
+
+ foreach($this->getAllTagPhotos() as $photo)
+ {
+ print "cfg->thumb_width ."\" />
\n";
+ }
+
+ } // showPhotoIndex()
+
}
?>