public function displayGalleryAdmin($id) { $image_disp = "<div id=\"admin_gal\">"; $dir = GAL_SAVE_DIR . $this->url0 . $id . '/'; $images = $this->getGalleryImages($id, TRUE); $i = 0; foreach ($images as $img) { $thumb = $dir . 'thumbs/' . $img; $imgURL = $dir . $img; $imgID = substr($img, 3); $gal = new ImageGallery(); $gal->dir = $dir; $gal->imgCap_album = $id; $title = $gal->getImageCaption($img); $image_disp .= "\n <div id=\"image_{$i}\">\n <img src=\"/{$thumb}\" alt=\"Gallery Image\" title=\"{$title}\" />\n <a href=\"javascript:var image_cap=prompt('Enter a caption for this photo');addPhotoCaption('{$this->url0}', '{$id}', '{$imgID}',image_cap);\">add a caption</a><br />\n <a href=\"javascript:deletePhoto('{$this->url0}', '{$id}', '{$imgURL}');\"\n onclick=\"return confirm('Are you sure you want to delete this entry?\\n\\nClick OK to continue.');\">delete this image</a>\n </div>"; ++$i; } $image_disp .= "</div>"; return "\n\n<!-- BEGIN FORM DISPLAY -->\n<form action=\"/_engine/Uploadify.inc.php\"\n method=\"post\"\n enctype=\"multipart/form-data\"\n class=\"ennui_form\">\n <fieldset class=\"ennui_form\">\n <h2>Add Photos</h2>\n <div id=\"fileUpload\">Loading...</div>\n <a href=\"javascript:window.location.reload()\">Back to This Entry</a>\n </fieldset>\n</form>{$image_disp}\n<!-- END FORM DISPLAY -->\n"; }