コード例 #1
0
    }
    $photoAlbum->setValue('pho_locked', $getLocked);
    $photoAlbum->save();
    // Zurueck zum Elternalbum
    $getPhotoId = $photoAlbum->getValue('pho_pho_id_parent');
    $photoAlbum->readDataById($getPhotoId);
}
/*********************HTML_PART*******************************/
// Breadcrump bauen
// @ptabaden: Split Breadcrumb-Code and integrated into panel-heading
$navilink = '';
$pho_parent_id = $photoAlbum->getValue('pho_pho_id_parent');
$photoAlbum_parent = new TablePhotos($gDb);
while ($pho_parent_id > 0) {
    // Einlesen des Eltern Albums
    $photoAlbum_parent->readDataById($pho_parent_id);
    // Link zusammensetzen
    $navilink = '<li><a href="' . $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $photoAlbum_parent->getValue('pho_id') . '">' . $photoAlbum_parent->getValue('pho_name') . '</a></li>' . $navilink;
    // Elternveranst
    $pho_parent_id = $photoAlbum_parent->getValue('pho_pho_id_parent');
}
// create html page object
$page = new HtmlPage($headline);
$page->enableModal();
// show additional album information
// @ptabaden: moved to beginning of page
$datePeriod = $photoAlbum->getValue('pho_begin', $gPreferences['system_date']);
if ($photoAlbum->getValue('pho_end') != $photoAlbum->getValue('pho_begin') && strlen($photoAlbum->getValue('pho_end')) > 0) {
    $datePeriod .= ' ' . $gL10n->get('SYS_DATE_TO') . ' ' . $photoAlbum->getValue('pho_end', $gPreferences['system_date']);
}
// @ptabaden: Changed, now with separate title of album
コード例 #2
0
ファイル: ecards.php プロジェクト: martinbrylski/admidio
// pruefen ob das Modul ueberhaupt aktiviert ist
if ($gPreferences['enable_ecard_module'] != 1) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
// URL auf Navigationstack ablegen
$gNavigation->addUrl(CURRENT_URL, $headline);
// Fotoveranstaltungs-Objekt erzeugen oder aus Session lesen
if (isset($_SESSION['photo_album']) && $_SESSION['photo_album']->getValue('pho_id') == $getPhotoId) {
    $photo_album =& $_SESSION['photo_album'];
    $photo_album->setDatabase($gDb);
} else {
    // einlesen des Albums falls noch nicht in Session gespeichert
    $photo_album = new TablePhotos($gDb);
    if ($getPhotoId > 0) {
        $photo_album->readDataById($getPhotoId);
    }
    $_SESSION['photo_album'] = $photo_album;
}
// pruefen, ob Album zur aktuellen Organisation gehoert
if ($getPhotoId > 0 && $photo_album->getValue('pho_org_id') != $gCurrentOrganization->getValue('org_id')) {
    $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
if ($gValidLogin && strlen($gCurrentUser->getValue('EMAIL')) === 0) {
    // der eingeloggte Benutzer hat in seinem Profil keine gueltige Mailadresse hinterlegt,
    // die als Absender genutzt werden kann...
    $gMessage->show($gL10n->get('SYS_CURRENT_USER_NO_EMAIL', '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php">', '</a>'));
}
if ($getUserId > 0) {
    // usr_id wurde uebergeben, dann Kontaktdaten des Users aus der DB fischen
    $user = new User($gDb, $gProfileFields, $getUserId);
コード例 #3
0
if ($gPreferences['enable_photo_module'] == 0) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_photo_module'] == 2) {
    // nur eingeloggte Benutzer duerfen auf das Modul zugreifen
    require_once '../../system/login_valid.php';
}
// check if download function is enabled
if ($gPreferences['photo_download_enabled'] == 0) {
    // das Modul ist deaktiviert
    $gMessage->show($gL10n->get('PHO_DOWNLOAD_DISABLED'));
}
// Fotoalbumobjekt anlegen
$photo_album = new TablePhotos($gDb);
// get id of album
$photo_album->readDataById($getPhotoId);
// check whether album belongs to the current organization
if ($photo_album->getValue('pho_org_id') != $gCurrentOrganization->getValue('org_id')) {
    $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// check whether album is locked
if ($photo_album->getValue('pho_locked') == 1 && !$gCurrentUser->editPhotoRight()) {
    $gMessage->show($gL10n->get('PHO_ALBUM_NOT_APPROVED'));
}
$albumFolder = SERVER_PATH . '/adm_my_files/photos/' . $photo_album->getValue('pho_begin', 'Y-m-d') . '_' . $photo_album->getValue('pho_id');
if ($photo_album->getValue('pho_quantity') == 0) {
    $gMessage->show($gL10n->get('PHO_NO_ALBUM_CONTENT'));
}
// check whether to take original version instead of scaled one
$takeOriginalsIfAvailable = false;
if ($gPreferences['photo_keep_original'] == 1) {