} // Html-Kopf ausgeben if ($getLinkId > 0) { $headline = $gL10n->get('SYS_EDIT_VAR', $getHeadline); } else { $headline = $gL10n->get('SYS_CREATE_VAR', $getHeadline); } // add current url to navigation stack $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); // add back link to module menu $linksCreateMenu = $page->getMenu(); $linksCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // Html des Modules ausgeben if ($getLinkId > 0) { $modeEditOrCreate = '3'; } else { $modeEditOrCreate = '1'; } // show form $form = new HtmlForm('weblinks_edit_form', $g_root_path . '/adm_program/modules/links/links_function.php?lnk_id=' . $getLinkId . '&headline=' . $getHeadline . '&mode=' . $modeEditOrCreate, $page); $form->addInput('lnk_name', $gL10n->get('LNK_LINK_NAME'), $link->getValue('lnk_name'), array('maxLength' => 250, 'property' => FIELD_REQUIRED)); $form->addInput('lnk_url', $gL10n->get('LNK_LINK_ADDRESS'), $link->getValue('lnk_url'), array('maxLength' => 2000, 'property' => FIELD_REQUIRED)); $form->addSelectBoxForCategories('lnk_cat_id', $gL10n->get('SYS_CATEGORY'), $gDb, 'LNK', 'EDIT_CATEGORIES', array('property' => FIELD_REQUIRED, 'defaultValue' => $link->getValue('lnk_cat_id'))); $form->addEditor('lnk_description', $gL10n->get('SYS_DESCRIPTION'), $link->getValue('lnk_description'), array('height' => '150px')); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($link->getValue('lnk_usr_id_create'), $link->getValue('lnk_timestamp_create'), $link->getValue('lnk_usr_id_change'), $link->getValue('lnk_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
$form->openGroupBox('gb_dates_meetings', $gL10n->get('DAT_DATES') . ' / ' . $gL10n->get('ROL_MEETINGS') . ' (' . $gL10n->get('SYS_OPTIONAL') . ')'); $form->addInput('rol_start_date', $gL10n->get('ROL_VALID_FROM'), $role->getValue('rol_start_date'), array('type' => 'date')); $form->addInput('rol_end_date', $gL10n->get('ROL_VALID_TO'), $role->getValue('rol_end_date'), array('type' => 'date')); $form->addInput('rol_start_time', $gL10n->get('SYS_TIME_FROM'), $role->getValue('rol_start_time'), array('type' => 'time')); $form->addInput('rol_end_time', $gL10n->get('SYS_TIME_TO'), $role->getValue('rol_end_time'), array('type' => 'time')); $form->addSelectBox('rol_weekday', $gL10n->get('ROL_WEEKDAY'), DateTimeExtended::getWeekdays(), array('defaultValue' => $role->getValue('rol_weekday'))); $form->addInput('rol_location', $gL10n->get('SYS_LOCATION'), $role->getValue('rol_location'), array('maxLength' => 100)); $form->closeGroupBox(); $form->openGroupBox('gb_dependencies', $gL10n->get('ROL_DEPENDENCIES') . ' (' . $gL10n->get('SYS_OPTIONAL') . ')'); $rolename_var = $gL10n->get('ROL_NEW_ROLE'); if ($role->getValue('rol_name') !== '') { $rolename_var = $gL10n->get('SYS_ROLE') . ' <b>' . $role->getValue('rol_name') . '</b>'; } $form->addHtml('<p>' . $gL10n->get('ROL_ROLE_DEPENDENCIES', $rolename_var) . '</p>'); // list all roles that the user is allowed to see $sqlAllRoles = ' SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . ' WHERE rol_valid = 1 AND rol_visible = 1 AND rol_cat_id = cat_id AND ( cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' OR cat_org_id IS NULL ) ORDER BY cat_sequence, rol_name '; $form->addSelectBoxFromSql('dependent_roles', $gL10n->get('ROL_DEPENDENT'), $gDb, $sqlAllRoles, array('defaultValue' => $childRoles, 'multiselect' => true)); $form->closeGroupBox(); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($role->getValue('rol_usr_id_create'), $role->getValue('rol_timestamp_create'), $role->getValue('rol_usr_id_change'), $role->getValue('rol_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
if ($category != $field->getValue('cat_name') && (strlen($inventory->getValue($field->getValue('inf_name_intern'))) > 0 || $field->getValue('inf_type') === 'CHECKBOX')) { if ($category !== '') { // new category then show last form and close div container $page->addHtml($form->show(false)); $page->addHtml('</div></div>'); } $category = $field->getValue('cat_name'); $page->addHtml(' <div class="panel panel-default" id="' . $field->getValue('cat_name') . '_data_panel"> <div class="panel-heading">' . $field->getValue('cat_name') . '</div> <div class="panel-body">'); // create a static form $form = new HtmlForm('profile_user_data_form', null); } // show html of field, if user has a value for that field or it's a checkbox field if (strlen($inventory->getValue($field->getValue('inf_name_intern'))) > 0 || $field->getValue('inf_type') === 'CHECKBOX') { $field = getFieldCode($field->getValue('inf_name_intern'), $inventory); if (strlen($field['value']) > 0) { $form->addStaticControl('address', $field['label'], $field['value']); } } } } if ($category !== '') { // new category then show last form and close div container $page->addHtml($form->show(false)); $page->addHtml('</div></div>'); } // show information about user who creates the recordset and changed it $page->addHtml(admFuncShowCreateChangeInfoById($inventory->getValue('inv_usr_id_create'), $inventory->getValue('inv_timestamp_create'), $inventory->getValue('inv_usr_id_change'), $inventory->getValue('inv_timestamp_change'))); $page->show();
$form->openGroupBox('gb_presentation', $gL10n->get('SYS_PRESENTATION')); $userFieldText = array('CHECKBOX' => $gL10n->get('SYS_CHECKBOX'), 'DATE' => $gL10n->get('SYS_DATE'), 'DECIMAL' => $gL10n->get('SYS_DECIMAL_NUMBER'), 'DROPDOWN' => $gL10n->get('SYS_DROPDOWN_LISTBOX'), 'EMAIL' => $gL10n->get('SYS_EMAIL'), 'NUMBER' => $gL10n->get('SYS_NUMBER'), 'PHONE' => $gL10n->get('SYS_PHONE'), 'RADIO_BUTTON' => $gL10n->get('SYS_RADIO_BUTTON'), 'TEXT' => $gL10n->get('SYS_TEXT') . ' (100 ' . $gL10n->get('SYS_CHARACTERS') . ')', 'TEXT_BIG' => $gL10n->get('SYS_TEXT') . ' (4000 ' . $gL10n->get('SYS_CHARACTERS') . ')', 'URL' => $gL10n->get('ORG_URL')); asort($userFieldText); if ($userField->getValue('usf_system') == 1) { // bei Systemfeldern darf der Datentyp nicht mehr veraendert werden $form->addInput('usf_type', $gL10n->get('ORG_DATATYPE'), $userFieldText[$userField->getValue('usf_type')], array('maxLength' => 30, 'property' => FIELD_DISABLED)); } else { // fuer jeden Feldtypen einen Eintrag in der Combobox anlegen $form->addSelectBox('usf_type', $gL10n->get('ORG_DATATYPE'), $userFieldText, array('property' => FIELD_REQUIRED, 'defaultValue' => $userField->getValue('usf_type'))); } $form->addMultilineTextInput('usf_value_list', $gL10n->get('ORG_VALUE_LIST'), $userField->getValue('usf_value_list', 'database'), 6, array('property' => FIELD_REQUIRED, 'helpTextIdLabel' => 'ORG_VALUE_LIST_DESC')); $form->addInput('usf_icon', $gL10n->get('SYS_ICON'), $userField->getValue('usf_icon', 'database'), array('maxLength' => 2000)); $form->addInput('usf_url', $gL10n->get('ORG_URL'), $userField->getValue('usf_url'), array('maxLength' => 2000, 'helpTextIdLabel' => 'ORG_FIELD_URL_DESC')); $form->closeGroupBox(); $form->openGroupBox('gb_authorization', $gL10n->get('SYS_AUTHORIZATION')); $form->addCheckbox('usf_hidden', $gL10n->get('ORG_FIELD_NOT_HIDDEN'), $userField->getValue('usf_hidden'), array('helpTextIdLabel' => 'ORG_FIELD_HIDDEN_DESC', 'icon' => 'eye.png')); $form->addCheckbox('usf_disabled', $gL10n->get('ORG_FIELD_DISABLED', $gL10n->get('ROL_RIGHT_EDIT_USER')), $userField->getValue('usf_disabled'), array('helpTextIdLabel' => 'ORG_FIELD_DISABLED_DESC', 'icon' => 'textfield_key.png')); if ($userField->getValue('usf_name_intern') === 'LAST_NAME' || $userField->getValue('usf_name_intern') === 'FIRST_NAME') { $form->addCheckbox('usf_mandatory', $gL10n->get('ORG_FIELD_REQUIRED'), $userField->getValue('usf_mandatory'), array('property' => FIELD_DISABLED, 'helpTextIdLabel' => 'ORG_FIELD_REQUIRED_DESC', 'icon' => 'asterisk_yellow.png')); } else { $form->addCheckbox('usf_mandatory', $gL10n->get('ORG_FIELD_REQUIRED'), $userField->getValue('usf_mandatory'), array('helpTextIdLabel' => 'ORG_FIELD_REQUIRED_DESC', 'icon' => 'asterisk_yellow.png')); } $form->closeGroupBox(); $form->openGroupBox('gb_description', $gL10n->get('SYS_DESCRIPTION'), 'admidio-panel-editor'); $form->addEditor('usf_description', null, $userField->getValue('usf_description'), array('height' => '200px')); $form->closeGroupBox(); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($userField->getValue('usf_usr_id_create'), $userField->getValue('usf_timestamp_create'), $userField->getValue('usf_usr_id_change'), $userField->getValue('usf_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
$page->addHtml('</div>'); } if ($getGboId == 0 && $commentStatement->rowCount() == 0 && ($gCurrentUser->commentGuestbookRight() || $gPreferences['enable_gbook_comments4all'] == 1) && $getModeration == 0) { // Falls keine Kommentare vorhanden sind, aber das Recht zur Kommentierung, wird der Link zur Kommentarseite angezeigt... $load_url = $g_root_path . '/adm_program/modules/guestbook/guestbook_comment_new.php?id=' . $guestbook->getValue('gbo_id'); $page->addHtml(' <button type="button" class="btn btn-default" onclick="window.location.href=\'' . $load_url . '\'"><img src="' . THEME_PATH . '/icons/comment_new.png" alt="' . $gL10n->get('GBO_WRITE_COMMENT') . '" title="' . $gL10n->get('GBO_WRITE_COMMENT') . '" />' . $gL10n->get('GBO_WRITE_COMMENT') . '</button>'); } // Falls eine ID uebergeben wurde und der dazugehoerige Eintrag existiert, // werden unter dem Eintrag die dazugehoerigen Kommentare (falls welche da sind) angezeigt. if ($countGuestbookEntries > 0 && $getGboId > 0) { ob_start(); include 'get_comments.php'; $page->addHtml(ob_get_contents()); ob_end_clean(); } $page->addHtml('</div>'); // show information about user who edit the recordset if (strlen($guestbook->getValue('gbo_usr_id_change')) > 0) { $page->addHtml('<div class="panel-footer">' . admFuncShowCreateChangeInfoById(0, '', $guestbook->getValue('gbo_usr_id_change'), $guestbook->getValue('gbo_timestamp_change')) . '</div>'); } $page->addHtml('</div>'); } // Ende While-Schleife } // If necessary show links to navigate to next and previous recordsets of the query $base_url = $g_root_path . '/adm_program/modules/guestbook/guestbook.php?headline=' . $getHeadline . '&moderation=' . $getModeration; $page->addHtml(admFuncGeneratePagination($base_url, $num_guestbook, $guestbook_entries_per_page, $getStart, true)); // show html of complete page $page->show();
if (!$announcement->editRight()) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS')); } } if (isset($_SESSION['announcements_request'])) { // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt // nun die vorher eingegebenen Inhalte ins Objekt schreiben $announcement->setArray($_SESSION['announcements_request']); unset($_SESSION['announcements_request']); } // create html page object $page = new HtmlPage($headline); // add back link to module menu $announcementsMenu = $page->getMenu(); $announcementsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('announcements_edit_form', $g_root_path . '/adm_program/modules/announcements/announcements_function.php?ann_id=' . $getAnnId . '&headline=' . $getHeadline . '&mode=1', $page); $form->addInput('ann_headline', $gL10n->get('SYS_TITLE'), $announcement->getValue('ann_headline'), array('maxLength' => 100, 'property' => FIELD_REQUIRED)); // if current organization has a parent organization or is child organizations then show option to set this announcement to global if ($gCurrentOrganization->getValue('org_org_id_parent') > 0 || $gCurrentOrganization->hasChildOrganizations()) { // show all organizations where this organization is mother or child organization $organizations = '- ' . $gCurrentOrganization->getValue('org_longname') . ',<br />- '; $organizations .= implode(',<br />- ', $gCurrentOrganization->getOrganizationsInRelationship(true, true, true)); $form->addCheckbox('ann_global', $gL10n->get('SYS_ENTRY_MULTI_ORGA'), $announcement->getValue('ann_global'), array('helpTextIdLabel' => array('SYS_DATA_GLOBAL', $organizations))); } $form->addEditor('ann_description', $gL10n->get('SYS_TEXT'), $announcement->getValue('ann_description'), array('property' => FIELD_REQUIRED)); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($announcement->getValue('ann_usr_id_create'), $announcement->getValue('ann_timestamp_create'), $announcement->getValue('ann_usr_id_change'), $announcement->getValue('ann_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
$guestbookCreateMenu = $page->getMenu(); $guestbookCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // Html des Modules ausgeben if ($getGboId > 0) { $mode = '3'; } else { $mode = '1'; } // show form $form = new HtmlForm('guestbook_edit_form', $g_root_path . '/adm_program/modules/guestbook/guestbook_function.php?id=' . $getGboId . '&headline=' . $getHeadline . '&mode=' . $mode, $page); if ($gCurrentUser->getValue('usr_id') > 0) { // registered users should not change their name $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_DISABLED)); } else { $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_REQUIRED)); } $form->addInput('gbo_email', $gL10n->get('SYS_EMAIL'), $guestbook->getValue('gbo_email'), array('type' => 'email', 'maxLength' => 254)); $form->addInput('gbo_homepage', $gL10n->get('SYS_WEBSITE'), $guestbook->getValue('gbo_homepage'), array('maxLength' => 50)); $form->addEditor('gbo_text', $gL10n->get('SYS_MESSAGE'), $guestbook->getValue('gbo_text'), array('property' => FIELD_REQUIRED, 'toolbar' => 'AdmidioGuestbook')); // if captchas are enabled then visitors of the website must resolve this if (!$gValidLogin && $gPreferences['enable_mail_captcha'] == 1) { $form->openGroupBox('gb_confirmation_of_entry', $gL10n->get('SYS_CONFIRMATION_OF_INPUT')); $form->addCaptcha('captcha', $gPreferences['captcha_type']); $form->closeGroupBox(); } // show information about user who creates the recordset and changed it $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($guestbook->getValue('gbo_usr_id_create'), $guestbook->getValue('gbo_timestamp_create'), $guestbook->getValue('gbo_usr_id_change'), $guestbook->getValue('gbo_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
$page->addHtml('</div>'); // close album-container } else { // show photos if lightbox is not used $photoThumbnailTable .= '</div>'; // close album-container $page->addHtml($photoThumbnailTable); } // show additional album information // @ptabaden: Moved display of addiditional album information to header // show information about user who creates the recordset and changed it // @ptabaden: Workaround to show correct link if albumcreator != albumchanger because of removed entry in layout if (strlen($photoAlbum->getValue('pho_usr_id_change')) > 0) { $page->addHtml(admFuncShowCreateChangeInfoById($photoAlbum->getValue('pho_usr_id_change'), $photoAlbum->getValue('pho_timestamp_change'), $photoAlbum->getValue('pho_usr_id_change'), $photoAlbum->getValue('pho_timestamp_change'))); } else { $page->addHtml(admFuncShowCreateChangeInfoById($photoAlbum->getValue('pho_usr_id_create'), $photoAlbum->getValue('pho_timestamp_create'), $photoAlbum->getValue('pho_usr_id_change'), $photoAlbum->getValue('pho_timestamp_change'))); } // show page navigations through thumbnails $url = $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $photoAlbum->getValue('pho_id'); $page->addHtml(admFuncGeneratePagination($url, $photoAlbum->getValue('pho_quantity'), $gPreferences['photo_thumbs_page'], $getPhotoNr, true, 'photo_nr')); } /************************Albumliste*************************************/ // erfassen der Alben die in der Albentabelle ausgegeben werden sollen $sql = 'SELECT * FROM ' . TBL_PHOTOS . ' WHERE pho_org_id = ' . $gCurrentOrganization->getValue('org_id'); if ($getPhotoId === 0) { $sql = $sql . ' AND (pho_pho_id_parent IS NULL) '; } if ($getPhotoId > 0) { $sql = $sql . ' AND pho_pho_id_parent = ' . $getPhotoId . '';
$page->addHtml(' <div class="panel panel-default" id="profile_other_orga_roles_box"> <div class="panel-heading">' . $gL10n->get('PRO_ROLE_MEMBERSHIP_OTHER_ORG') . HtmlForm::getHelpTextIcon('PRO_VIEW_ROLES_OTHER_ORGAS') . ' </div> <div class="panel-body" id="profile_other_orga_roles_box_body"> <ul class="list-group admidio-list-roles-assign">'); $showRolesOtherOrganizations = true; } $startDate = new DateTimeExtended($row['mem_begin'], 'Y-m-d'); // jede einzelne Rolle anzeigen $page->addHtml(' <li class="list-group-item"> <span>' . $row['org_shortname'] . ' - ' . $role->getValue('cat_name') . ' - ' . $role->getValue('rol_name')); if ($row['mem_leader'] == 1) { $page->addHtml(' - ' . $gL10n->get('SYS_LEADER')); } $page->addHtml(' </span> <span class="pull-right">' . $gL10n->get('SYS_SINCE', $startDate->format($gPreferences['system_date'])) . '</span> </li>'); } } $gCurrentUser->setOrganization($gCurrentOrganization->getValue('org_id')); if ($showRolesOtherOrganizations) { $page->addHtml('</ul></div></div>'); } } } // show information about user who creates the recordset and changed it $page->addHtml(admFuncShowCreateChangeInfoById($user->getValue('usr_usr_id_create'), $user->getValue('usr_timestamp_create'), $user->getValue('usr_usr_id_change'), $user->getValue('usr_timestamp_change'))); $page->show();
$categoryCreateMenu = $page->getMenu(); $categoryCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('categories_edit_form', $g_root_path . '/adm_program/modules/categories/categories_function.php?cat_id=' . $getCatId . '&type=' . $getType . '&mode=1', $page); // systemcategories should not be renamed $fieldPropertyCatName = FIELD_REQUIRED; if ($category->getValue('cat_system') == 1) { $fieldPropertyCatName = FIELD_DISABLED; } $form->addInput('cat_name', $gL10n->get('SYS_NAME'), $category->getValue('cat_name', 'database'), array('maxLength' => 100, 'property' => $fieldPropertyCatName)); if ($getType === 'USF') { // if current organization has a parent organization or is child organizations then show option to set this category to global if ($category->getValue('cat_system') == 0 && $gCurrentOrganization->countAllRecords() > 1) { // show all organizations where this organization is mother or child organization $organizations = '- ' . $gCurrentOrganization->getValue('org_longname') . ',<br />- '; $organizations .= implode(',<br />- ', $gCurrentOrganization->getOrganizationsInRelationship(true, true, true)); $value = 0; if ($category->getValue('cat_org_id') == 0) { $value = 1; } $form->addCheckbox('show_in_several_organizations', $gL10n->get('SYS_ENTRY_MULTI_ORGA'), $value, array('helpTextIdLabel' => array('SYS_DATA_GLOBAL', $organizations))); } } else { $form->addCheckbox('cat_hidden', $gL10n->get('SYS_VISIBLE_TO_USERS', $getTitle), $category->getValue('cat_hidden'), array('icon' => 'user_key.png')); } $form->addCheckbox('cat_default', $gL10n->get('CAT_DEFAULT_VAR', $getTitle), $category->getValue('cat_default'), array('icon' => 'star.png')); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($category->getValue('cat_usr_id_create'), $category->getValue('cat_timestamp_create'), $category->getValue('cat_usr_id_change'), $category->getValue('cat_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
function getRoleMemberships($htmlListId, $user, $result_role, $count_role, $directOutput) { global $gDb, $gL10n, $gCurrentUser, $gPreferences, $g_root_path, $gProfileFields; $countShowRoles = 0; $member = new TableMembers($gDb); $role = new TableRoles($gDb); $roleMemHTML = '<ul class="list-group admidio-list-roles-assign" id="' . $htmlListId . '">'; while ($row = $gDb->fetch_array($result_role)) { if ($gCurrentUser->hasRightViewRole($row['mem_rol_id']) && $row['rol_visible'] == 1) { $formerMembership = false; $futureMembership = false; $showRoleEndDate = false; $deleteMode = 'pro_role'; $member->clear(); $member->setArray($row); $role->clear(); $role->setArray($row); // if membership will not end, then don't show end date if (strcmp($member->getValue('mem_end', 'Y-m-d'), '9999-12-31') != 0) { $showRoleEndDate = true; } // check if membership ends in the past if (strcmp(DATE_NOW, $member->getValue('mem_end', 'Y-m-d')) > 0) { $formerMembership = true; $deleteMode = 'pro_former'; } // check if membership starts in the future if (strcmp($member->getValue('mem_begin', 'Y-m-d'), DATE_NOW) > 0) { $futureMembership = true; $deleteMode = 'pro_future'; } // create list entry for one role $roleMemHTML .= ' <li class="list-group-item" id="role_' . $row['mem_rol_id'] . '"> <ul class="list-group admidio-list-roles-assign-pos"> <li class="list-group-item"> <span>' . $role->getValue('cat_name') . ' - '; if ($gCurrentUser->hasRightViewRole($member->getValue('mem_rol_id'))) { $roleMemHTML .= '<a href="' . $g_root_path . '/adm_program/modules/lists/lists_show.php?mode=html&rol_id=' . $member->getValue('mem_rol_id') . '" title="' . $role->getValue('rol_description') . '">' . $role->getValue('rol_name') . '</a>'; } else { echo $role->getValue('rol_name'); } if ($member->getValue('mem_leader') == 1) { $roleMemHTML .= ' - ' . $gL10n->get('SYS_LEADER'); } $roleMemHTML .= ' </span> <span class="pull-right text-right">'; if ($showRoleEndDate == true) { $roleMemHTML .= $gL10n->get('SYS_SINCE_TO', $member->getValue('mem_begin', $gPreferences['system_date']), $member->getValue('mem_end', $gPreferences['system_date'])); } elseif ($futureMembership == true) { $roleMemHTML .= $gL10n->get('SYS_FROM', $member->getValue('mem_begin', $gPreferences['system_date'])); } else { $roleMemHTML .= $gL10n->get('SYS_SINCE', $member->getValue('mem_begin', $gPreferences['system_date'])); } if ($role->allowedToAssignMembers($gCurrentUser)) { // You are not allowed to delete your own webmaster membership, other roles could be deleted if ($role->getValue('rol_webmaster') == 1 && $gCurrentUser->getValue('usr_id') != $user->getValue('usr_id') || $role->getValue('rol_webmaster') == 0) { $roleMemHTML .= ' <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=' . $deleteMode . '&element_id=role_' . $role->getValue('rol_id') . '&database_id=' . $member->getValue('mem_id') . '&name=' . urlencode($role->getValue('rol_name')) . '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('PRO_CANCEL_MEMBERSHIP') . '" title="' . $gL10n->get('PRO_CANCEL_MEMBERSHIP') . '" /></a>'; } else { $roleMemHTML .= ' <a class="admidio-icon-link"><img src="' . THEME_PATH . '/icons/dummy.png" alt=""/></a>'; } // do not edit webmaster role if ($row['rol_webmaster'] == 0) { $roleMemHTML .= '<a class="admidio-icon-link" style="cursor:pointer;" onclick="profileJS.toggleDetailsOn(' . $member->getValue('mem_id') . ')"><img src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('PRO_CHANGE_DATE') . '" title="' . $gL10n->get('PRO_CHANGE_DATE') . '" /></a>'; } else { $roleMemHTML .= '<a class="admidio-icon-link"><img src="' . THEME_PATH . '/icons/dummy.png" alt=""/></a>'; } } // only show info if system setting is activated if ($gPreferences['system_show_create_edit'] > 0) { $roleMemHTML .= '<a class="admidio-icon-link admMemberInfo" id="member_info_' . $member->getValue('mem_id') . '" href="javascript:"><img src="' . THEME_PATH . '/icons/info.png" alt="' . $gL10n->get('SYS_INFORMATIONS') . '" title="' . $gL10n->get('SYS_INFORMATIONS') . '"/></a>'; } $roleMemHTML .= '</span> </li> <li class="list-group-item" id="membership_period_' . $member->getValue('mem_id') . '" style="visibility: hidden; display: none;"><div class="collapse navbar-collapse">'; $form = new HtmlForm('membership_period_form_' . $member->getValue('mem_id'), $g_root_path . '/adm_program/modules/profile/profile_function.php?mode=7&user_id=' . $user->getValue('usr_id') . '&mem_id=' . $row['mem_id'], null, array('type' => 'navbar', 'setFocus' => false, 'class' => 'admidio-form-membership-period')); $form->addInput('membership_start_date_' . $member->getValue('mem_id'), $gL10n->get('SYS_START'), $member->getValue('mem_begin', $gPreferences['system_date']), array('type' => 'date', 'maxLength' => 10)); $form->addInput('membership_end_date_' . $member->getValue('mem_id'), $gL10n->get('SYS_END'), $member->getValue('mem_end', $gPreferences['system_date']), array('type' => 'date', 'maxLength' => 10)); $form->addSubmitButton('btn_send_' . $member->getValue('mem_id'), $gL10n->get('SYS_OK')); $roleMemHTML .= $form->show(false); $roleMemHTML .= '</div></li> <li class="list-group-item" id="member_info_' . $member->getValue('mem_id') . '_Content" style="display: none;">'; // show informations about user who creates the recordset and changed it $roleMemHTML .= admFuncShowCreateChangeInfoById($member->getValue('mem_usr_id_create'), $member->getValue('mem_timestamp_create'), $member->getValue('mem_usr_id_change'), $member->getValue('mem_timestamp_change')) . ' </li> </ul> </li>'; $countShowRoles++; } } if ($countShowRoles == 0) { $roleMemHTML = '<div class="block-padding">' . $gL10n->get('PRO_NO_ROLES_VISIBLE') . '</div>'; } else { $roleMemHTML .= '</ul>'; } if ($directOutput) { echo $roleMemHTML; return ''; } else { return $roleMemHTML; } }
<div class="date-info"><h4>' . $announcement->getValue('ann_timestamp_create', $gPreferences['system_date']) . '<div class="date-actions">'); // aendern & loeschen duerfen nur User mit den gesetzten Rechten if ($gCurrentUser->editAnnouncements()) { if ($announcement->editRight()) { // @ptabaden: changed icons $page->addHtml(' <a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/announcements/announcements_new.php?ann_id=' . $announcement->getValue('ann_id') . '&headline=' . $getHeadline . '"><i class="fa fa-pencil" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '"></i></a>'); } // Loeschen darf man nur Ankuendigungen der eigenen Gliedgemeinschaft // @ptabaden: changed icons if ($announcement->getValue('ann_org_id') == $gCurrentOrganization->getValue('org_id')) { $page->addHtml(' <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=ann&element_id=ann_' . $announcement->getValue('ann_id') . '&name=' . urlencode($announcement->getValue('ann_headline')) . '&database_id=' . $announcement->getValue('ann_id') . '"><i class="fa fa-times" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '"></i></a>'); } } $page->addHtml('</div></h4></div> </div> <div class="panel-body">' . $announcement->getValue('ann_description') . '</div> <div class="panel-footer">' . admFuncShowCreateChangeInfoById($announcement->getValue('ann_usr_id_create'), $announcement->getValue('ann_timestamp_create'), $announcement->getValue('ann_usr_id_change'), $announcement->getValue('ann_timestamp_change')) . ' </div> </div>'); } // Ende foreach // If necessary show links to navigate to next and previous recordsets of the query $base_url = $g_root_path . '/adm_program/modules/announcements/announcements.php?headline=' . $getHeadline; $page->addHtml(admFuncGeneratePagination($base_url, $announcementsCount, $announcementsPerPage, $getStart, true)); } // show html of complete page $page->show();
$page->addHtml($outputNumberMembers . ' ' . $gL10n->get('SYS_PARTICIPANTS')); } $page->addHtml('</h4>'); } $page->addHtml(' <div class="panel-body"> <p>' . $date->getValue('dat_description') . '</p>'); if ($outputButtonParticipation !== '' || $outputButtonParticipants !== '' || $outputButtonParticipantsEmail !== '' || $outputButtonParticipantsAssign !== '') { // @ptabaden: removed button-group $page->addHtml('<div class="btn-placement-group">' . $outputButtonParticipation . $outputButtonParticipants . $outputButtonParticipantsEmail . $outputButtonParticipantsAssign . '</div>'); } $page->addHtml(' </div> <div class="panel-footer">' . admFuncShowCreateChangeInfoById($date->getValue('dat_usr_id_create'), $date->getValue('dat_timestamp_create'), $date->getValue('dat_usr_id_change'), $date->getValue('dat_timestamp_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']) . ' ' . $gL10n->get('SYS_CLOCK'); // date beginn $objDateEnd = new DateTime($row['dat_end']);
src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>'; } echo '</div> </div> <div class="panel-body">' . $gbComment->getValue('gbc_text'); // Buttons zur Freigabe / Loeschen des gesperrten Eintrags if ($getModeration == 1) { echo ' <div class="btn-group" role="group"> <button class="btn btn-default" onclick="callUrlHideElement(\'gbc_' . $gbComment->getValue('gbc_id') . '\', \'guestbook_function.php?mode=10&id=' . $gbComment->getValue('gbc_id') . '\')"><img src="' . THEME_PATH . '/icons/ok.png" alt="' . $gL10n->get('SYS_UNLOCK') . '" />' . $gL10n->get('SYS_UNLOCK') . '</button> <button class="btn btn-default" onclick="callUrlHideElement(\'gbc_' . $gbComment->getValue('gbc_id') . '\', \'guestbook_function.php?mode=5&id=' . $gbComment->getValue('gbc_id') . '\')"><img src="' . THEME_PATH . '/icons/no.png" alt="' . $gL10n->get('SYS_REMOVE') . '" />' . $gL10n->get('SYS_REMOVE') . '</button> </div>'; } echo '</div>'; // show information about user who edit the recordset if (strlen($gbComment->getValue('gbc_usr_id_change')) > 0) { echo '<div class="panel-footer">' . admFuncShowCreateChangeInfoById(0, '', $gbComment->getValue('gbc_usr_id_change'), $gbComment->getValue('gbc_timestamp_change')) . '</div>'; } echo '</div>'; } if (($gCurrentUser->commentGuestbookRight() || $gPreferences['enable_gbook_comments4all'] == 1) && $getModeration == 0) { // Bei Kommentierungsrechten, wird der Link zur Kommentarseite angezeigt... echo ' <button type="button" class="btn btn-default" onclick="javascript:window.location.href=\'' . $g_root_path . '/adm_program/modules/guestbook/guestbook_comment_new.php?id=' . $getGbcId . '\'"><img src="' . THEME_PATH . '/icons/comment_new.png" alt="' . $gL10n->get('GBO_WRITE_COMMENT') . '" title="' . $gL10n->get('GBO_WRITE_COMMENT') . '" />' . $gL10n->get('GBO_WRITE_COMMENT') . '</button>'; } }