コード例 #1
0
$albumsCount = $albumStatement->rowCount();
// falls zum aktuellen Album Fotos und Unteralben existieren,
// dann einen Trennstrich zeichnen
if ($photoAlbum->getValue('pho_quantity') > 0 && $albumsCount > 0) {
    $page->addHtml('<hr />');
}
$childPhotoAlbum = new TablePhotos($gDb);
$page->addHtml('<div class="row">');
for ($x = $getStart; $x <= $getStart + $gPreferences['photo_albums_per_page'] - 1 && $x < $albumsCount; ++$x) {
    // Daten in ein Photo-Objekt uebertragen
    $childPhotoAlbum->clear();
    $childPhotoAlbum->setArray($albumList[$x]);
    // folder of the album
    $ordner = SERVER_PATH . '/adm_my_files/photos/' . $childPhotoAlbum->getValue('pho_begin', 'Y-m-d') . '_' . $childPhotoAlbum->getValue('pho_id');
    // show album if album is not locked or it has child albums or the user has the photo module edit right
    if (file_exists($ordner) && $childPhotoAlbum->getValue('pho_locked') == 0 || $childPhotoAlbum->hasChildAlbums() || $gCurrentUser->editPhotoRight()) {
        // Zufallsbild fuer die Vorschau ermitteln
        $shuffle_image = $childPhotoAlbum->shuffleImage();
        // Album angaben
        if (file_exists($ordner) || $childPhotoAlbum->hasChildAlbums()) {
            $albumTitle = '<a href="' . $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $childPhotoAlbum->getValue('pho_id') . '">' . $childPhotoAlbum->getValue('pho_name') . '</a><br />';
        } else {
            $albumTitle = $childPhotoAlbum->getValue('pho_name');
        }
        $albumDate = $childPhotoAlbum->getValue('pho_begin', $gPreferences['system_date']);
        if ($childPhotoAlbum->getValue('pho_end') != $childPhotoAlbum->getValue('pho_begin')) {
            $albumDate .= ' ' . $gL10n->get('SYS_DATE_TO') . ' ' . $childPhotoAlbum->getValue('pho_end', $gPreferences['system_date']);
        }
        // @ptabaden: komplettumbau (Order, added counter-value to col-sm-6)
        $page->addHtml('
          <div class="col-sm-6 album-sorting-' . $x . ' album-overview-container" id="panel_pho_' . $childPhotoAlbum->getValue('pho_id') . '">