} else { $teilnehmer = 'n/a'; } $notification = new Email(); if ($getMode == 1) { $message = $gL10n->get('DAT_EMAIL_NOTIFICATION_MESSAGE_PART1', $gCurrentOrganization->getValue('org_longname'), $_POST['dat_headline'], $datum . ' (' . $zeit . ')', $calendar) . $gL10n->get('DAT_EMAIL_NOTIFICATION_MESSAGE_PART2', $ort, $raum, $teilnehmer, $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME')) . $gL10n->get('DAT_EMAIL_NOTIFICATION_MESSAGE_PART3', date($gPreferences['system_date'], time())); $notification->adminNotfication($gL10n->get('DAT_EMAIL_NOTIFICATION_TITLE'), $message, $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME'), $gCurrentUser->getValue('EMAIL')); } else { $message = $gL10n->get('DAT_EMAIL_NOTIFICATION_CHANGE_MESSAGE_PART1', $gCurrentOrganization->getValue('org_longname'), $_POST['dat_headline'], $datum . ' (' . $zeit . ')', $calendar) . $gL10n->get('DAT_EMAIL_NOTIFICATION_CHANGE_MESSAGE_PART2', $ort, $raum, $teilnehmer, $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME')) . $gL10n->get('DAT_EMAIL_NOTIFICATION_CHANGE_MESSAGE_PART3', date($gPreferences['system_date'], time())); $notification->adminNotfication($gL10n->get('DAT_EMAIL_NOTIFICATION_CHANGE_TITLE'), $message, $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME'), $gCurrentUser->getValue('EMAIL')); } } // ---------------------------------------- // ggf. Rolle fuer Anmeldungen wegschreiben // ---------------------------------------- if ($_POST['date_registration_possible'] == 1 && strlen($date->getValue('dat_rol_id')) == 0) { // Kategorie fuer Terminbestaetigungen einlesen $sql = 'SELECT cat_id FROM ' . TBL_CATEGORIES . ' WHERE cat_name_intern LIKE \'CONFIRMATION_OF_PARTICIPATION\''; $gDb->query($sql); $row = $gDb->fetch_array(); // create role for participations $role = new TableRoles($gDb); $role->setValue('rol_cat_id', $row['cat_id']); $role->setValue('rol_name', $gL10n->get('DAT_DATE') . ' ' . $date->getValue('dat_begin', 'Y-m-d H:i') . ' - ' . $date->getValue('dat_id')); $role->setValue('rol_description', $date->getValue('dat_headline')); $role->setValue('rol_this_list_view', '1'); // role members are allowed to view lists $role->setValue('rol_mail_this_role', '1'); // role members are allowed to send mail to this role $role->setValue('rol_visible', '0');
$outputButtonIcal = ''; $outputButtonEdit = ''; $outputButtonDelete = ''; $outputButtonCopy = ''; $outputButtonParticipation = ''; $outputButtonParticipants = ''; $outputButtonParticipantsEmail = ''; $outputButtonParticipantsAssign = ''; $outputLinkLocation = ''; $outputLinkRoom = ''; $outputNumberMembers = ''; $outputNumberLeaders = ''; $dateElements = array(); $participantsArray = array(); // set end date of event if ($date->getValue('dat_begin', $gPreferences['system_date']) != $date->getValue('dat_end', $gPreferences['system_date'])) { $outputEndDate = ' - ' . $date->getValue('dat_end', $gPreferences['system_date']); } if ($getViewMode === 'html') { // ical Download if ($gPreferences['enable_dates_ical'] == 1) { $outputButtonIcal = ' <a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/dates/dates_function.php?dat_id=' . $date->getValue('dat_id') . '&mode=6"> <img src="' . THEME_PATH . '/icons/database_out.png" alt="' . $gL10n->get('DAT_EXPORT_ICAL') . '" title="' . $gL10n->get('DAT_EXPORT_ICAL') . '" /></a>'; } // change and delete is only for users with additional rights if ($gCurrentUser->editDates()) { if ($date->editRight()) { $outputButtonCopy = ' <a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/dates/dates_new.php?dat_id=' . $date->getValue('dat_id') . '&copy=1&headline=' . $getHeadline . '"> <img src="' . THEME_PATH . '/icons/application_double.png" alt="' . $gL10n->get('SYS_COPY') . '" title="' . $gL10n->get('SYS_COPY') . '" /></a>';
$date->setValue('dat_begin', date('Y-m-d H:00:00', time() + 3600)); $date->setValue('dat_end', date('Y-m-d H:00:00', time() + 7200)); // a new event will be visible for all users per default $date->setVisibleRoles(array('0')); $dateRoles = array(0); } else { $date->readDataById($getDateId); // get the saved roles for visibility $dateRoles = $date->getVisibleRoles(); // Pruefung, ob der Termin zur aktuellen Organisation gehoert bzw. global ist if (!$date->editRight()) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS')); } } // check if a registration to this event is possible if ($date->getValue('dat_rol_id') > 0) { $dateRegistrationPossible = 1; } // check if current user is assigned to this date $dateCurrentUserAssigned = $gCurrentUser->isLeaderOfRole($date->getValue('dat_rol_id')); } if ($date->getValue('dat_rol_id') > 0) { $dateRoleID = $date->getValue('dat_rol_id'); } else { $dateRoleID = '0'; } // create html page object $page = new HtmlPage($headline); $page->addJavascriptFile('adm_program/system/js/date-functions.js'); $page->addJavascript(' // Funktion blendet Zeitfelder ein/aus
$dates = new ModuleDates(); // read events for output $datesResult = $dates->getDataset(0, 10); // ab hier wird der RSS-Feed zusammengestellt // create RSS feed object with channel information $rss = new RSSfeed($gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline, $gCurrentOrganization->getValue('org_homepage'), $gL10n->get('DAT_CURRENT_DATES_OF_ORGA', $gCurrentOrganization->getValue('org_longname')), $gCurrentOrganization->getValue('org_longname')); $date = new TableDate($gDb); // Dem RSSfeed-Objekt jetzt die RSSitems zusammenstellen und hinzufuegen if ($datesResult['numResults'] > 0) { $date = new TableDate($gDb); foreach ($datesResult['recordset'] as $row) { // ausgelesene Termindaten in Date-Objekt schieben $date->clear(); $date->setArray($row); // set data for attributes of this entry $title = $date->getValue('dat_begin', $gPreferences['system_date']); if ($date->getValue('dat_begin', $gPreferences['system_date']) != $date->getValue('dat_end', $gPreferences['system_date'])) { $title = $title . ' - ' . $date->getValue('dat_end', $gPreferences['system_date']); } $title = $title . ' ' . $date->getValue('dat_headline'); $link = $g_root_path . '/adm_program/modules/dates/dates.php?id=' . $date->getValue('dat_id'); $author = $row['create_name']; $pubDate = date('r', strtotime($date->getValue('dat_timestamp_create'))); // add additional information about the event to the description $descDateTo = ''; $descDateFrom = $date->getValue('dat_begin', $gPreferences['system_date']); $description = $descDateFrom; if ($date->getValue('dat_all_day') == 0) { $descDateFrom = $descDateFrom . ' ' . $date->getValue('dat_begin', $gPreferences['system_time']) . ' ' . $gL10n->get('SYS_CLOCK'); if ($date->getValue('dat_begin', $gPreferences['system_date']) != $date->getValue('dat_end', $gPreferences['system_date'])) { $descDateTo = $date->getValue('dat_end', $gPreferences['system_date']) . ' ';
} // create Object $plgDates = new ModuleDates(); // read events for output $plgDatesResult = $plgDates->getDataSet(0, $plg_dates_count); $plg_date = new TableDate($gDb); echo '<div id="plugin_' . $plugin_folder . '" class="admidio-plugin-content">'; if ($plg_show_headline == 1) { echo '<h3>' . $gL10n->get('PLG_DATES_HEADLINE') . '</h3>'; } if ($plgDatesResult['numResults'] > 0) { foreach ($plgDatesResult['recordset'] as $plg_row) { $plg_date->clear(); $plg_date->setArray($plg_row); $plg_html_end_date = ''; echo '<div>' . $plg_date->getValue('dat_begin', $gPreferences['system_date']) . ' '; if ($plg_date->getValue('dat_all_day') != 1) { echo $plg_date->getValue('dat_begin', $gPreferences['system_time']); } // Bis-Datum und Uhrzeit anzeigen if ($plg_show_date_end) { if ($plg_date->getValue('dat_begin', $gPreferences['system_date']) != $plg_date->getValue('dat_end', $gPreferences['system_date'])) { $plg_html_end_date .= $plg_date->getValue('dat_end', $gPreferences['system_date']); } if ($plg_date->getValue('dat_all_day') != 1) { $plg_html_end_date .= ' ' . $plg_date->getValue('dat_end', $gPreferences['system_time']); } if ($plg_html_end_date !== '') { $plg_html_end_date = ' - ' . $plg_html_end_date; } }
$gDb->setCurrentDB(); //create Object $plgDates = new ModuleDates(); // read events for output $plgDatesResult = $plgDates->getDataSet(0, $plg_dates_count); $plg_date = new TableDate($gDb); echo '<div id="plugin_' . $plugin_folder . '" class="admidio-plugin-content">'; if ($plg_show_headline == 1) { echo '<h3>' . $gL10n->get('PLG_DATES_HEADLINE') . '</h3>'; } if ($plgDatesResult['numResults'] > 0) { foreach ($plgDatesResult['recordset'] as $plg_row) { $plg_date->clear(); $plg_date->setArray($plg_row); $plg_html_end_date = ''; echo $plg_date->getValue('dat_begin', $gPreferences['system_date']) . ' '; if ($plg_date->getValue('dat_all_day') != 1) { echo $plg_date->getValue('dat_begin', $gPreferences['system_time']); } // Bis-Datum und Uhrzeit anzeigen if ($plg_show_date_end) { if ($plg_date->getValue('dat_begin', $gPreferences['system_date']) != $plg_date->getValue('dat_end', $gPreferences['system_date'])) { $plg_html_end_date .= $plg_date->getValue('dat_end', $gPreferences['system_date']); } if ($plg_date->getValue('dat_all_day') != 1) { $plg_html_end_date .= ' ' . $plg_date->getValue('dat_end', $gPreferences['system_time']); } if ($plg_html_end_date !== '') { $plg_html_end_date = ' - ' . $plg_html_end_date; } }