");
$i = $rowStart;
$j = 1;
while ($j <= $cols && $i <= $numPhotos) {
if ($gallery->album->isAlbumName($i)) {
$iWidth = $gallery->album->fields['thumb_size'];
} else {
list($iWidth, $iHeight) = $gallery->album->getThumbDimensions($i);
}
echo("");
// put form outside caption to compress lines
if (!$gallery->session->offline &&
(($gallery->user->canDeleteFromAlbum($gallery->album)) ||
($gallery->user->canWriteToAlbum($gallery->album)) ||
($gallery->user->canChangeTextOfAlbum($gallery->album)))) {
$showAdminForm = 1;
} else {
$showAdminForm = 0;
}
if ($showAdminForm) {
echo makeFormIntro("view_album.php", array("name" => "image_form_$i"));
}
echo "";
$id = $gallery->album->getPhotoId($i);
if ($gallery->album->isHidden($i) && !$gallery->session->offline) {
echo "(hidden) ";
}
if ($gallery->album->isAlbumName($i)) {
$myAlbum = new Album();
$myAlbum->load($gallery->album->isAlbumName($i));
$myDescription = $myAlbum->fields['description'];
$buf = "";
$buf = $buf."Album: ".$myAlbum->fields['title']." ";
if ($myDescription != "No description") {
$buf = $buf." ".$myDescription."";
}
echo($buf." ");
?>
Changed: getLastModificationDate()?>.
Contains: numPhotos($gallery->user->canWriteToAlbum($myAlbum)), "item", "no")?>.
album->fields["display_clicks"] , "yes")) && !$gallery->session->offline && ($myAlbum->getClicks() > 0)) { ?>
Viewed: getClicks(), "time", "0")?>.
album->getCaption($i));
// indicate with * if we have a comment for a given photo
if ((!strcmp($gallery->album->fields["public_comments"], "yes")) &&
($gallery->album->numComments($i) > 0)) {
echo("* ");
$displayCommentLegend = 1;
}
echo(" ");
if (!(strcmp($gallery->album->fields["display_clicks"] , "yes")) && !$gallery->session->offline && ($gallery->album->getItemClicks($i) > 0)) {
echo("Viewed: ".pluralize($gallery->album->getItemClicks($i), "time", "0").". ");
}
}
echo "
";
if ($showAdminForm) {
if ($gallery->album->isMovie($id)) {
$label = "Movie";
} elseif ($gallery->album->isAlbumName($i)) {
$label = "Album";
} else {
$label = "Photo";
}
echo("");
echo("<< Edit $label>> ");
}
if ($gallery->user->canChangeTextOfAlbum($gallery->album)) {
if ($gallery->album->isAlbumName($i)) {
if ($gallery->user->canChangeTextOfAlbum($myAlbum)) {
showChoice("Edit Title",
"edit_field.php",
array("set_albumName" => $myAlbum->fields["name"],
"field" => "title")) .
showChoice("Edit Description",
"edit_field.php",
array("set_albumName" => $myAlbum->fields["name"],
"field" => "description"));
}
if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($myAlbum)) {
showChoice("Rename Album",
"rename_album.php",
array("set_albumName" => $myAlbum->fields["name"],
"index" => $i));
}
} else {
showChoice("Edit Text", "edit_caption.php", array("index" => $i));
}
}
if ($gallery->user->canWriteToAlbum($gallery->album)) {
if (!$gallery->album->isMovie($id) && !$gallery->album->isAlbumName($i)) {
showChoice("Edit Thumbnail", "edit_thumb.php", array("index" => $i));
showChoice("Rotate $label", "rotate_photo.php", array("index" => $i));
}
if (!$gallery->album->isMovie($id)) {
showChoice("Highlight $label", "highlight_photo.php", array("index" => $i));
}
if ($gallery->album->isAlbumName($i)) {
$myAlbumName = $gallery->album->isAlbumName($i);
showChoice("Reset Counter", "do_command.php",
array("cmd" => "reset-album-clicks",
"set_albumName" => $myAlbumName,
"return" => urlencode(makeGalleryUrl("view_album.php"))));
}
showChoice("Move $label", "move_photo.php", array("index" => $i));
if ($gallery->album->isHidden($i)) {
showChoice("Show $label", "do_command.php", array("cmd" => "show", "index" => $i));
} else {
showChoice("Hide $label", "do_command.php", array("cmd" => "hide", "index" => $i));
}
}
if ($gallery->user->canDeleteFromAlbum($gallery->album)) {
if($gallery->album->isAlbumName($i)) {
if($gallery->user->canDeleteAlbum($myAlbum)) {
showChoice("Delete $label", "delete_photo.php",
array("id" => $myAlbum->fields["name"],
"albumDelete" => 1));
}
} else {
showChoice("Delete $label", "delete_photo.php",
array("id" => $id));
}
}
if($gallery->album->isAlbumName($i)) {
if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($myAlbum) && $showAdminForm) {
showChoice("Permissions", "album_permissions.php",
array("set_albumName" => $myAlbum->fields["name"]));
}
}
if ($showAdminForm) {
echo(' ');
}
echo(' ');
$j++;
$i = getNextPhoto($i);
}
echo " ";
/* Now do the inline_albumthumb footer row */
echo("