user->canReadAlbum($gallery->album)) { header("Location: " . makeAlbumUrl()); return; } if (isset($full) && !$gallery->user->canViewFullImages($gallery->album)) { header("Location: " . makeAlbumUrl($gallery->session->albumName, $id)); return; } if ($id) { $index = $gallery->album->getPhotoIndex($id); if ($index == -1) { // That photo no longer exists. header("Location: " . makeAlbumUrl($gallery->session->albumName)); return; } } else { $id = $gallery->album->getPhotoId($index); } // is photo hidden? should user see it anyway? if (($gallery->album->isHidden($index)) && (!$gallery->user->canWriteToAlbum($gallery->album))){ header("Location: " . makeAlbumUrl($gallery->session->albumName)); return; } $albumName = $gallery->session->albumName; if (!$gallery->session->viewedItem[$gallery->session->albumName][$id] && !$gallery->session->offline) { $gallery->session->viewedItem[$albumName][$id] = 1; $gallery->album->incrementItemClicks($index); } $photo = $gallery->album->getPhoto($index); if ($photo->isMovie()) { $image = $photo->thumbnail; } else { $image = $photo->image; } $photoURL = $gallery->album->getAlbumDirURL("full") . "/" . $image->name . "." . $image->type; list($imageWidth, $imageHeight) = $image->getRawDimensions(); $do_fullOnly = isset($gallery->session->fullOnly) && !strcmp($gallery->session->fullOnly,"on") && !strcmp($gallery->album->fields["use_fullOnly"],"yes"); if ($do_fullOnly) { $full = 1; } $fitToWindow = !strcmp($gallery->album->fields["fit_to_window"], "yes") && !$gallery->album->isResized($index) && !$full; if ($full) { $fullTag = "?full=1"; } $numPhotos = $gallery->album->numPhotos($gallery->user->canWriteToAlbum($gallery->album)); $next = $index+1; if ($next > $numPhotos) { //$next = 1; $last = 1; } $prev = $index-1; if ($prev <= 0) { //$prev = $numPhotos; $first = 1; } if ($index > $gallery->album->numPhotos(1)) { $index = $numPhotos; } /* * We might be prev/next navigating using this page * so recalculate the 'page' variable */ $rows = $gallery->album->fields["rows"]; $cols = $gallery->album->fields["cols"]; $perPage = $rows * $cols; $page = ceil($index / ($rows * $cols)); /* * Relative URLs are tricky if we don't know if we're rewriting * URLs or not. If we're rewriting, then the browser will think * we're down 1 dir farther than we really are. Use absolute * urls wherever possible. */ $top = $gallery->app->photoAlbumURL; $bordercolor = $gallery->album ->fields["bordercolor"]; $borderwidth = $gallery->album->fields["border"]; if (!strcmp($borderwidth, "off")) { $borderwidth = 1; } if (!strcmp($gallery->album->fields["resize_size"], "off")) { $mainWidth = 0; } else { $mainWidth = "100%"; } $navigator["id"] = $id; $navigator["allIds"] = $gallery->album->getIds($gallery->user->canWriteToAlbum($gallery->album)); $navigator["fullWidth"] = "100"; $navigator["widthUnits"] = "%"; $navigator["url"] = "."; $navigator["bordercolor"] = $bordercolor; #-- breadcrumb text --- $breadCount = 0; $breadtext[$breadCount] = "Album: session->albumName) . "\">" . $gallery->album->fields['title'] . ""; $breadCount++; $pAlbum = $gallery->album; do { if (!strcmp($pAlbum->fields["returnto"], "no")) { break; } $pAlbumName = $pAlbum->fields['parentAlbumName']; if ($pAlbumName && (!$gallery->session->offline || $gallery->session->offlineAlbums[$pAlbumName])) { $pAlbum = new Album(); $pAlbum->load($pAlbumName); $breadtext[$breadCount] = "Album: " . $pAlbum->fields['title'] . ""; } elseif (!$gallery->session->offline || $gallery->session->offlineAlbums["albums.php"]) { //-- we're at the top! --- $breadtext[$breadCount] = "Gallery: " . $gallery->app->galleryTitle . ""; } $breadCount++; } while ($pAlbumName); //-- we built the array backwards, so reverse it now --- for ($i = count($breadtext) - 1; $i >= 0; $i--) { $breadcrumb["text"][] = $breadtext[$i]; } $extra_fields=$gallery->album->getExtraFields(); $title=NULL; if (in_array("Title", $extra_fields)) { $title=$gallery->album->getExtraField($index, "Title"); } if (!$title) { $title=$index; } ?> <?php echo $gallery->app->galleryTitle ?> :: <?php echo $gallery->album->fields["title"] ?> :: <?php echo $title ?> 0) { if (!strcmp($navigator['allIds'][$navpage], $id)) { break; } $navpage--; } if ($navigator['allIds'][0] != $id) { if ($navigator['allIds'][0] != 'unknown') { ?> cellpadding=0 cellspacing=0>
album->isMovie($id)) { print "\n"; print ' 1)).'">'."\n"; if ($gallery->user->canWriteToAlbum($gallery->album)) { $adminCommands .= popup_link("[resize photo]", "resize_photo.php?index=$index"); } if ($gallery->user->canDeleteFromAlbum($gallery->album)) { $adminCommands .= popup_link("[delete photo]", "delete_photo.php?id=$id"); } if (!strcmp($gallery->album->fields["use_fullOnly"], "yes")) { if (!$gallery->session->offline) { $link = doCommand("", array("set_fullOnly" => (strcmp($gallery->session->fullOnly,"on") ? "on" : "off")), "view_photo.php", array("id" => $id)); } else { $link = makeAlbumUrl($gallery->session->albumName, $id, array("set_fullOnly" => (strcmp($gallery->session->fullOnly, "on") ? "on" : "off"))); } $adminCommands .= "View Images: [ "; if (strcmp($gallery->session->fullOnly,"on")) { $adminCommands .= "normal | full ]"; } else { $adminCommands .= "normal | full ]"; } $adminCommands .= ""; } if (!strcmp($gallery->album->fields["use_exif"],"yes") && (eregi("jpe?g\$", $photo->image->type)) && ($gallery->app->use_exif)) { $albumName = $gallery->session->albumName; $adminCommands .= popup_link("[photo properties]", "view_photo_properties.php?set_albumName=$albumName&index=$index", 0, false); } if (strcmp($gallery->album->fields["print_photos"],"none") && !$gallery->session->offline && !$gallery->album->isMovie($id)){ $photo = $gallery->album->getPhoto($GLOBALS["index"]); $photoPath = $gallery->album->getAlbumDirURL("full"); $rawImage = $photoPath . "/" . $photo->image->name . "." . $photo->image->type; $thumbImage= $photoPath . "/"; if ($photo->thumbnail) { $thumbImage .= $photo->image->name . "." . "thumb" . "." . $photo->image->type; } else if ($photo->image->resizedName) { $thumbImage .= $photo->image->name . "." . "sized" . "." . $photo->image->type; } else { $thumbImage .= $photo->image->name . "." . $photo->image->type; } list($imageWidth, $imageHeight) = $photo->image->getRawDimensions(); if (strlen($adminCommands) > 0) { $adminCommands .="
"; } $printService = $gallery->album->fields["print_photos"]; if (!strncmp($printService, "shutterfly", 10)) { $adminCommands .= "[print this photo on Shutterfly]"; $printShutterflyForm = 1; } else if (!strncmp($printService, "fotokasten", 10)) { $adminCommands .= popup_link("[Lasse dieses Foto drucken mit Fotokasten]", "'http://1071.partner.fotokasten.de/affiliateapi/standard.php?add=" . $rawImage . '&thumbnail=' . $thumbImage . '&height=' . $imageHeight . '&width=' . $imageWidth . "'", 1); } else if (!strncmp($printService, 'photoaccess', 11)) { $adminCommands .= "[print this photo on PhotoAccess]"; $printPhotoAccessForm = 1; } } if ($adminCommands) { $adminCommands = "$adminCommands"; $adminbox["commands"] = $adminCommands; $adminbox["text"] = " "; $adminbox["bordercolor"] = $bordercolor; $adminbox["top"] = true; include ($GALLERY_BASEDIR . "layout/adminbox.inc"); } } $breadcrumb["bordercolor"] = $bordercolor; $breadcrumb["top"] = true; $breadcrumb['bottom'] = false; include($GALLERY_BASEDIR . "layout/breadcrumb.inc"); ?>
album->fields["border"], "off")) { $bordercolor = $gallery->album->fields["bgcolor"]; } if ($bordercolor) { $bordercolor = "bgcolor=$bordercolor"; } ?>
cellpadding=0 cellspacing=0>
"); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); echo(""); ?>
"); echo(""); echo(""); echo "
"; $photoTag = $gallery->album->getPhotoTag($index, $full); if (!$gallery->album->isMovie($id)) { if ($gallery->album->isResized($index) && !$do_fullOnly) { if ($full) { echo ""; } else if ($gallery->user->canViewFullImages($gallery->album)) { echo " 1)) . ">"; } $openAnchor = 1; } } else { echo ""; $openAnchor = 1; } if ($fitToWindow && !$GALLERY_EMBEDDED_INSIDE) { ?>
"); echo(""); echo("
cellpadding=0 cellspacing=0> album->fields["public_comments"], "yes")) { ?> album->fields["print_photos"] == "shutterfly without donation") { ?> album->getCaption($index); if (empty($imbkprnt)) { $imbkprnt = makeAlbumUrl($gallery->session->albumName, $id); } ?> "); ?>
album, $index) ?>

"; unSet($extra_fields[$key]); } $field="Capture Date"; $key=array_search($field, $extra_fields); if (is_int($key)) { $itemCaptureDate = $gallery->album->getItemCaptureDate($index); print ""; unSet($extra_fields[$key]); } // skip title - only for header display $field="Title"; $key=array_search($field, $extra_fields); if (is_int($key)) { unSet($extra_fields[$key]); } foreach ($extra_fields as $field) { $value=$gallery->album->getExtraField($index, $field); if ($value) { print ""; } } ?>
$field:". date("m-d-Y H:i:s" , $gallery->album->getUploadDate($index)). "
$field:". $itemCaptureDate[mon] . "-" . $itemCaptureDate[mday] . "-" . $itemCaptureDate[year] . " ". $itemCaptureDate[hours] . ":" . $itemCaptureDate[minutes] . ":" . $itemCaptureDate[seconds]. "
$field:". str_replace("\n", "

", $value). "



"); includeHtmlWrap("inline_photo.footer"); echo("
cellpadding=0 cellspacing=0>