$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 $notification = new Email(); $message = $gL10n->get('PHO_EMAIL_NOTIFICATION_MESSAGE', $gCurrentOrganization->getValue('org_longname'), $_POST['pho_name'], $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME'), date($gPreferences['system_date'], time())); $notification->adminNotfication($gL10n->get('PHO_EMAIL_NOTIFICATION_TITLE'), $message, $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME'), $gCurrentUser->getValue('EMAIL')); } $getPhotoId = $photo_album->getValue('pho_id'); } elseif ($getMode === 'change' && $ordner != SERVER_PATH . '/adm_my_files/photos/' . $_POST['pho_begin'] . '_' . $getPhotoId) {
} // 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 $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;