diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-08-22 15:10:42 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-08-22 15:10:42 +0000 |
commit | 3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66 (patch) | |
tree | 00aa120b631e00a3305d8e5b12db54332d95cada /pages/upload.php | |
parent | 4546f4f1e55042cebc9c77c84a37974ff01c08ff (diff) | |
download | elgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.gz elgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.bz2 |
moved core pages to new pages structure
Diffstat (limited to 'pages/upload.php')
-rw-r--r-- | pages/upload.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pages/upload.php b/pages/upload.php new file mode 100644 index 000000000..3550d5620 --- /dev/null +++ b/pages/upload.php @@ -0,0 +1,42 @@ +<?php
+ /**
+ * Tidypics Upload Images Page
+ *
+ */
+
+ include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
+
+ // must be logged in to upload images
+ gatekeeper();
+
+ $album_guid = (int) get_input('container_guid');
+ if (!$album_guid)
+ forward();
+
+ $album = get_entity($album_guid);
+
+ //if album does not exist or user does not have access
+ if (!$album || !$album->canEdit()) {
+ // throw warning and forward to previous page
+ forward($_SERVER['HTTP_REFERER']);
+ }
+
+ // set page owner based on container (user or group)
+ $container = $album->container_guid;
+ set_page_owner($container);
+
+ $page_owner = page_owner_entity();
+ if ($page_owner instanceof ElggGroup) {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username);
+ }
+
+ set_context('photos');
+ $title = elgg_echo('album:addpix') . ': ' . $album->title;
+ $area2 .= elgg_view_title($title);
+
+ $area2 .= elgg_view("tidypics/forms/upload", array('album' => $album_guid ) );
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+ page_draw($title, $body);
+?>
\ No newline at end of file |