<div class="panel-heading"> <div class="pull-left"> <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/dates.png" alt="' . $date->getValue('dat_headline') . '" />' . $date->getValue('dat_begin', $gPreferences['system_date']) . $outputEndDate . ' ' . $date->getValue('dat_headline') . ' </div> <div class="pull-right text-right">' . $outputButtonIcal . $outputButtonCopy . $outputButtonEdit . $outputButtonDelete . ' </div> </div> <div class="panel-body"> ' . $htmlDateElements . '<br /> <p>' . $date->getValue('dat_description') . '</p>'); if ($outputButtonParticipation !== '' || $outputButtonParticipants !== '' || $outputButtonParticipantsEmail !== '' || $outputButtonParticipantsAssign !== '') { $page->addHtml('<div class="btn-group">' . $outputButtonParticipation . $outputButtonParticipants . $outputButtonParticipantsEmail . $outputButtonParticipantsAssign . '</div>'); } $page->addHtml(' </div> <div class="panel-footer">' . admFuncShowCreateChangeInfoByName($row['create_name'], $date->getValue('dat_timestamp_create'), $row['change_name'], $date->getValue('dat_timestamp_change'), $date->getValue('dat_usr_id_create'), $date->getValue('dat_usr_id_change')) . ' </div> </div>'); } else { // show table view of events // Change css class if date is highlighted $cssClass = ''; if ($row['dat_highlight']) { $cssClass = 'admidio-event-highlight'; } // date beginn $objDateBegin = new DateTime($row['dat_begin']); $dateBegin = $objDateBegin->format($gPreferences['system_date']); $timeBegin = $date->getValue('dat_begin', $gPreferences['system_time']); // date beginn $objDateEnd = new DateTime($row['dat_end']);
/** * Creates a html fragment with information about user and time when the recordset was created * and when it was at last edited. Therefore all necessary data must be set in the function * parameters. If userid is not set then the function will show @b deleted @b user. * @param int $userIdCreated Id of the user who create the recordset. * @param string $timestampCreate Date and time of the moment when the user create the recordset. * @param int $userIdEdited Id of the user last changed the recordset. * @param string $timestampEdited Date and time of the moment when the user last changed the recordset * @return string Returns a html string with usernames who creates item and edit item the last time */ function admFuncShowCreateChangeInfoById($userIdCreated, $timestampCreate, $userIdEdited, $timestampEdited) { global $gDb, $gProfileFields, $gL10n, $gPreferences; // only show info if system setting is activated if ($gPreferences['system_show_create_edit'] > 0) { $htmlCreateName = ''; $htmlEditName = ''; // compose name of user who create the recordset if ($timestampCreate !== '') { if ($userIdCreated > 0) { $userCreate = new User($gDb, $gProfileFields, $userIdCreated); if ($gPreferences['system_show_create_edit'] == 1) { $htmlCreateName = $userCreate->getValue('FIRST_NAME') . ' ' . $userCreate->getValue('LAST_NAME'); } else { $htmlCreateName = $userCreate->getValue('usr_login_name'); } } else { $htmlCreateName = $gL10n->get('SYS_DELETED_USER'); } } // compose name of user who edit the recordset if ($timestampEdited !== '') { if ($userIdEdited > 0) { $userEdit = new User($gDb, $gProfileFields, $userIdEdited); if ($gPreferences['system_show_create_edit'] == 1) { $htmlEditName = $userEdit->getValue('FIRST_NAME') . ' ' . $userEdit->getValue('LAST_NAME'); } else { $htmlEditName = $userEdit->getValue('usr_login_name'); } } else { $htmlEditName = $gL10n->get('SYS_DELETED_USER'); } } if ($htmlCreateName !== '' || $htmlEditName !== '') { // get html output from other function return admFuncShowCreateChangeInfoByName($htmlCreateName, $timestampCreate, $htmlEditName, $timestampEdited, $userIdCreated, $userIdEdited); } } return ''; }