session->offlineAlbums["albums.php"]=true; /* Read the album list */ $albumDB = new AlbumDB(FALSE); $gallery->session->albumName = ""; $page = 1; /* If there are albums in our list, display them in the table */ list ($numPhotos, $numAccess, $numAlbums) = $albumDB->numAccessibleItems($gallery->user); if (empty($gallery->session->albumListPage)) { $gallery->session->albumListPage = 1; } $perPage = $gallery->app->albumsPerPage; $maxPages = max(ceil($numAlbums / $perPage), 1); if ($gallery->session->albumListPage > $maxPages) { $gallery->session->albumListPage = $maxPages; } $pixelImage = 'pixel_trans'; $borderColor = $gallery->app->default["bordercolor"]; $navigator["page"] = $gallery->session->albumListPage; $navigator["pageVar"] = "set_albumListPage"; $navigator["url"] = makeGalleryUrl("albums.php"); $navigator["maxPages"] = $maxPages; $navigator["spread"] = 6; $navigator["fullWidth"] = 100; $navigator["widthUnits"] = "%"; $navigator["bordercolor"] = $borderColor; $displayCommentLegend = 0; // this determines if we display "* Item contains a comment" at end of page /* ** when direction is ltr(left to right) everything is fine) ** when rtl(right to left), like in hebrew, we have to switch the alignment at some places. */ if ($gallery->direction == 'ltr') { $left="left"; $right="right"; } else { $left="right"; $right="left"; } if (!$GALLERY_EMBEDDED_INSIDE) { doctype(); ?> <?php echo $gallery->app->galleryTitle ?> 1) { ?> session->offline && !strcmp($gallery->app->showSearchEngine, "yes")) { ?> '. sprintf($lang['Forum_Index'], $board_config['sitename']) . ''; } ?>
:
"; $toplevel_str= pluralize_n($numAlbums, ($numAccess != $numAlbums) ? _("1 top-level album") : _("1 album"), ($numAccess != $numAlbums) ? _("top-level albums") : _("albums"), _("No albums")); $total_str= sprintf(_("%d total"), $numAccess); $image_str= pluralize_n($numPhotos, _("1 image"), _("images"), _("no images")); $page_str= pluralize_n($maxPages, _("1 page"), _("pages"), _("no pages")); if (($numAccess != $numAlbums) && $maxPages > 1) { $adminText .= sprintf(_("%s (%s), %s on %s"), $toplevel_str, $total_str, $image_str, $page_str); } else if ($numAccess != $numAlbums) { $adminText .= sprintf(_("%s (%s), %s"), $toplevel_str, $total_str, $image_str); } else if ($maxPages > 1) { $adminText .= sprintf(_("%s, %s on %s"), $toplevel_str, $image_str, $page_str); } else { $adminText .= sprintf(_("%s, %s"), $toplevel_str, $image_str); } $adminText .= ""; $adminCommands = ""; if ($gallery->user->isLoggedIn() && !$gallery->session->offline && ! ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2' && $gallery->user->uid == -1)) { $displayName = $gallery->user->getFullname(); if (empty($displayName)) { $displayName = $gallery->user->getUsername(); } $adminCommands .= sprintf(_("Welcome, %s"), $displayName) . "  
"; } if ($gallery->app->gallery_slideshow_type != "off") { $adminCommands .= "\n". ' null)) . '">['._("slideshow") . '] '; } if ($gallery->user->isAdmin()) { $doc = galleryDocs('admin'); if ($doc) { $adminCommands .= "\n$doc "; } } if ($gallery->user->canCreateAlbums() && !$gallery->session->offline) { $adminCommands .= "\n[". _("new album") ."] "; } if ($gallery->user->isAdmin()) { if ($gallery->userDB->canModifyUser() || $gallery->userDB->canCreateUser() || $gallery->userDB->canDeleteUser()) { $adminCommands .= popup_link("[" . _("manage users") ."]", "manage_users.php", false, true, 500, 500, 'admin') . ' '; } } if ($gallery->user->isLoggedIn() && !$gallery->session->offline) { if ($gallery->userDB->canModifyUser()) { $adminCommands .= popup_link("[". _("preferences") ."]", "user_preferences.php", false, true, 500, 500, 'admin') . ' '; } if (!$GALLERY_EMBEDDED_INSIDE) { $adminCommands .= "[". _("logout") ."]"; } } else { if (!$GALLERY_EMBEDDED_INSIDE) { $adminCommands .= popup_link("[" . _("login") . "]", "login.php", false, true, 500, 500, 'admin'); if (!strcmp($gallery->app->selfReg, 'yes')) { $adminCommands .= ' '; $adminCommands .= popup_link('[' . _("register") . ']', 'register.php', false, true, 500, 500, 'admin'); } } } $adminCommands .= "
"; $adminbox["text"] = $adminText; $adminbox["commands"] = $adminCommands; $adminbox["bordercolor"] = $borderColor; $adminbox["top"] = true; includeLayout('navtablebegin.inc'); includeLayout('adminbox.inc'); includeLayout('navtablemiddle.inc'); echo ""; includeLayout('navigator.inc'); includeLayout('navtableend.inc'); includeLayout('ml_pulldown.inc'); echo ""; /* Display warnings about broken albums */ if (sizeof($albumDB->brokenAlbums) && $gallery->user->isAdmin()) { echo "\n
"; echo "\n

". _("Attention Gallery Administrator!") ."

"; echo sprintf(_("%s has detected the following %d invalid album(s) in your albums directory
(%s):"), Gallery(), sizeof($albumDB->brokenAlbums), $gallery->app->albumDir); echo "\n

"; foreach ($albumDB->brokenAlbums as $tmpAlbumName) { echo "
$tmpAlbumName\n"; } echo "\n

". _("Please move it/them out of the albums directory.") ; echo "\n

\n"; } ?> session->albumListPage - 1) * $perPage + 1; $end = min($start + $perPage - 1, $numAlbums); for ($i = $start; $i <= $end; $i++) { $gallery->album = $albumDB->getAlbum($gallery->user, $i); $isRoot = $gallery->album->isRoot(); // Only display album if it is a root album if($isRoot) { if (strcmp($gallery->app->showOwners, "no")) { $owner = $gallery->album->getOwner(); } $tmpAlbumName = $gallery->album->fields["name"]; $albumURL = makeAlbumUrl($tmpAlbumName); ?> app->showAlbumTree, "yes")) { ?> app->showAlbumTree, "yes")) { ?>
html_wrap['borderColor'] = $borderColor; $gallery->html_wrap['borderWidth'] = 1; $gallery->html_wrap['pixelImage'] = getImagePath('pixel_trans.gif'); $scaleTo = $gallery->app->highlight_size; list($iWidth, $iHeight) = $gallery->album->getHighlightDimensions($scaleTo); if (!$iWidth) { $iWidth = $gallery->app->highlight_size; $iHeight = 100; } $gallery->html_wrap['imageWidth'] = $iWidth; $gallery->html_wrap['imageHeight'] = $iHeight; $gallery->html_wrap['imageTag'] = $gallery->album->getHighlightTag($scaleTo,'', _("Highlight for Album: "). htmlentities(removeTags($gallery->album->fields["title"]),ENT_COMPAT)); $gallery->html_wrap['imageHref'] = $albumURL; $gallery->html_wrap['frame'] = $gallery->app->gallery_thumb_frame_style; includeHtmlWrap('inline_gallerythumb.frame'); ?>
album, "title", $albumURL) ?>
album, "description") ; if ($description != "") { echo "\n
"; echo "\n\t$description"; echo "\n
"; } if (strcmp($gallery->app->showOwners, "no")) { echo "\n
"; echo _("Owner:") . " "; if (!$owner->getEmail()) { echo $owner->getFullName(); } else { echo "getEmail() . "\">" . $owner->getFullName() . ""; } echo '
'; } if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($gallery->album)) { echo _("url:") . ''; if (!$gallery->session->offline) { echo breakString(urldecode($albumURL), 60, '&', 5); } else { echo $tmpAlbumName; } echo ''; if (ereg("album[[:digit:]]+$", $albumURL)) { if (!$gallery->session->offline) { echo '
' . _("Hey!") . sprintf(_("%s this album so that the URL is not so generic!"), popup_link(_("Rename"), "rename_album.php?set_albumName={$tmpAlbumName}&index=$i")); echo ''; } } if ($gallery->album->versionOutOfDate()) { if ($gallery->user->isAdmin()) { echo '
'; echo _("Note: This album is out of date!") ?> '; } } } ?>
album->getLastModificationDate() )?> album->numVisibleItems($gallery->user)), _("1 item"), _("items"), _("no items"))); if (!($gallery->album->fields["display_clicks"] == "no") && !$gallery->session->offline) { ?>

album->getClicks(), _("1 time"), _("times") , _("0 times")), $gallery->album->getClicksDate() ); } $albumName=$gallery->album->fields["name"]; if ($gallery->user->canWriteToAlbum($gallery->album) && (!($gallery->album->fields["display_clicks"] == "no"))) { ?> $albumName), "albums.php"), 1) ?> app->comments_enabled == 'yes') { $lastCommentDate = $gallery->album->lastCommentDate(); print lastCommentString($lastCommentDate, $displayCommentLegend); } ?>
*