コード例 #1
0
     }
 } else {
     $_POST['pho_end'] = $_POST['pho_begin'];
 }
 // Anfang muss vor oder gleich Ende sein
 if (strlen($_POST['pho_end']) > 0 && $_POST['pho_end'] < $_POST['pho_begin']) {
     $gMessage->show($gL10n->get('SYS_DATE_END_BEFORE_BEGIN'));
 }
 // Photographen
 if (strlen($_POST['pho_photographers']) === 0) {
     $_POST['pho_photographers'] = $gL10n->get('SYS_UNKNOWN');
 }
 // POST Variablen in das Role-Objekt schreiben
 foreach ($_POST as $key => $value) {
     if (strpos($key, 'pho_') === 0) {
         $photo_album->setValue($key, $value);
     }
 }
 /********************neuen Datensatz anlegen***********************************/
 if ($getMode === 'new') {
     // Album in Datenbank schreiben
     $photo_album->save();
     $error = $photo_album->createFolder();
     if (strlen($error['text']) > 0) {
         $photo_album->delete();
         // der entsprechende Ordner konnte nicht angelegt werden
         $gMessage->setForwardUrl($g_root_path . '/adm_program/modules/photos/photos.php');
         $gMessage->show($gL10n->get($error['text'], $error['path'], '<a href="mailto:' . $gPreferences['email_administrator'] . '">', '</a>'));
     }
     if (strlen($error['text']) === 0) {
         // Benachrichtigungs-Email für neue Einträge
コード例 #2
0
    $gNavigation->clear();
}
// URL auf Navigationstack ablegen
$gNavigation->addUrl(CURRENT_URL, $headline);
// pruefen, ob Album zur aktuellen Organisation gehoert
if ($getPhotoId > 0 && $photoAlbum->getValue('pho_org_id') != $gCurrentOrganization->getValue('org_id')) {
    $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
/*********************LOCKED************************************/
// Falls gefordert und Foto-edit-rechte, aendern der Freigabe
if ($getLocked === 0 || $getLocked === 1) {
    // erst pruefen, ob der User Fotoberarbeitungsrechte hat
    if (!$gCurrentUser->editPhotoRight()) {
        $gMessage->show($gL10n->get('PHO_NO_RIGHTS'));
    }
    $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