summaryrefslogtreecommitdiff
path: root/gallery_lookup_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_lookup_inc.php')
-rw-r--r--gallery_lookup_inc.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/gallery_lookup_inc.php b/gallery_lookup_inc.php
new file mode 100644
index 0000000..7d628a4
--- /dev/null
+++ b/gallery_lookup_inc.php
@@ -0,0 +1,24 @@
+<?php
+global $gContent;
+
+if (!empty($_REQUEST['gallery_id']) && is_numeric($_REQUEST['gallery_id'])) {
+ $gContent = new FisheyeGallery( $_REQUEST['gallery_id'] );
+ if( !$gContent->load() ) {
+ }
+} elseif (!empty($_REQUEST['content_id']) && is_numeric($_REQUEST['content_id'])) {
+ $gContent = new FisheyeGallery( NULL, $_REQUEST['content_id'] );
+ if( !$gContent->load() ) {
+ }
+} else {
+ $gContent = new FisheyeGallery();
+ $galleryId = NULL;
+}
+
+if( !empty( $_REQUEST['gallery_path'] ) ) {
+ $gContent->setGalleryPath( $_REQUEST['gallery_path'] );
+}
+
+$smarty->assign_by_ref('gContent', $gContent);
+$smarty->assign_by_ref('galleryId', $gContent->mGalleryId);
+
+?>