Пример #1
0
 }
 // 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) {
     $newFolder = SERVER_PATH . '/adm_my_files/photos/' . $_POST['pho_begin'] . '_' . $photo_album->getValue('pho_id');