示例#1
0
文件: albums.php 项目: shifter/ospap2
     $objMiniMenu->add('Create Album', 'index.php?action=albums&subaction=edit');
 } else {
     if ($objUser && $objAlbum->canCreateSubalbum($objUser)) {
         $objMiniMenu->add('Create Sub-album', 'index.php?action=albums&subaction=edit&album_album_id=' . $objAlbum->get('id'));
     }
 }
 /* Posting a picture. */
 if ($objAlbum->canPostPicture($objUser)) {
     $objMiniMenu->add('Post Picture', 'index.php?action=upload&' . $objAlbum->getIDPair());
 }
 if ($objUser) {
     $objMiniMenu->add('Mark All as Seen', 'index.php?action=albums&subaction=seen&' . $objAlbum->getIDPair());
 }
 $objTemplate->setText('PAGETITLE', 'Albums' . ($objAlbum->get('id') == 0 ? '' : " -- " . $objAlbum->get('name')));
 /* Get the array of sub albums. */
 $arrSubAlbums = $objAlbum->getSubAlbums($objUser);
 /* This script allows the albums to be expanded/hidden. */
 $objTemplate->setText('SCRIPT', clsAlbum::getSubAlbumScript());
 $objTemplate->setText('SCRIPT', clsAlbum::getAllAlbumScript($arrSubAlbums));
 /* Display the caption  */
 if (strlen($objAlbum->get('caption'))) {
     print "<span class='albumcaption'>" . bbcode_format($objAlbum->get('caption')) . "</span><hr>";
 }
 /* If it's the base album, allow filtering by user. */
 if ($objAlbum->isNew()) {
     print $objAlbum->getUserFilter("Filter by user") . "<hr>";
 }
 /* Display the expand/contract all buttons. */
 print "<a href='#' onClick='expand_all()' class='nounderline'><img src='images/expand.png'> Expand All</a><br>";
 print "<a href='#' onClick='contract_all()' class='nounderline'><img src='images/contract.png'> Hide All</a><br>";
 print "<br>";