$page->addJavascript(' var countErrorFiles = 0; var countFiles = 0; $(function () { "use strict"; $("#fileupload").fileupload({ url: "../../system/file_upload.php?module=' . $getModule . '&mode=upload_files&id=' . $getId . '", sequentialUploads: true, dataType: "json", add: function (e, data) { $("#files").html(""); countErrorFiles = 0; countFiles = 0; data.submit(); }, done: function (e, data) { $.each(data.result.files, function (index, file) { if(typeof file.error !== "undefined") { $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>" + file.name + " - <strong>" + file.error + "</strong></div>").appendTo("#files"); countErrorFiles++; } else { var message = "' . $textFileUploaded . '"; var newMessage = message.replace("#VAR1_BOLD#", "<strong>" + file.name + "</strong>"); $("<p/>").html(newMessage).appendTo("#files"); countFiles++ } }); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $("#progress .progress-bar").css( "width", progress + "%" ); }, stop: function (e, data) { if(countErrorFiles === 0 && countFiles > 0) { $("<p/>").html("<div class=\\"alert alert-success\\"><span class=\\"glyphicon glyphicon-ok\\"></span>' . $textUploadSuccessful . '</div>").appendTo("#files"); } else { $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>' . $textUploadNotSuccessful . '</div>").appendTo("#files"); } } }).prop("disabled", !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : "disabled"); });', true);
checkbox.prop("checked", false); if(checkbox.hasClass("memlist_leader")) { $("input[type=checkbox]#member_"+userid).prop("checked", false); } } else { checkbox.prop("checked", true); } alert(data); return false; } return true; } ); });'; $page->addJavascript($javascriptCode, true); // get module menu $membersAssignmentMenu = $page->getMenu(); $membersAssignmentMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); if ($gCurrentUser->editUsers()) { $membersAssignmentMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/members/members_new.php', $gL10n->get('MEM_CREATE_USER'), 'add.png'); } $navbarForm = new HtmlForm('navbar_show_all_users_form', '', $page, array('type' => 'navbar', 'setFocus' => false)); $sql = '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'; $navbarForm->addSelectBoxFromSql('filter_rol_id', $gL10n->get('SYS_ROLE'), $gDb, $sql, array('defaultValue' => $getFilterRoleId, 'firstEntry' => $gL10n->get('SYS_ALL')));
// Foto aus PHP-Temp-Ordner einlesen $user_image_data = fread(fopen($_FILES['userfile']['tmp_name'][0], 'r'), $_FILES['userfile']['size'][0]); // Zwischenspeichern des neuen Fotos in der Session $gCurrentSession->setValue('ses_binary', $user_image_data); $gCurrentSession->save(); } //Image-Objekt löschen $user_image->delete(); if ($getItemId == $gCurrentUser->getValue('inv_id')) { $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE'); } else { $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $inventory->getValue('FIRST_NAME'), $inventory->getValue('LAST_NAME')); } // create html page object $page = new HtmlPage($headline); $page->addJavascript('$("#btn_cancel").click(function() { self.location.href=\'' . $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=dont_save&inv_id=' . $getItemId . '\'; });', true); // show form $form = new HtmlForm('show_new_profile_picture_form', $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=save&inv_id=' . $getItemId, $page); $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />'); $form->addCustomContent($gL10n->get('PRO_NEW_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '&new_photo=1" alt="' . $gL10n->get('PRO_NEW_PICTURE') . '" />'); $form->addLine(); $form->openButtonGroup(); $form->addButton('btn_cancel', $gL10n->get('SYS_ABORT'), array('icon' => THEME_PATH . '/icons/error.png')); $form->addSubmitButton('btn_update', $gL10n->get('SYS_APPLY'), array('icon' => THEME_PATH . '/icons/database_in.png')); $form->closeButtonGroup(); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); }
// durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt // nun die vorher eingegebenen Inhalte ins Objekt schreiben $role->setArray($_SESSION['roles_request']); unset($_SESSION['roles_request']); } // holt eine Liste der ausgewaehlten abhaengigen Rolen $childRoles = RoleDependency::getChildRoles($gDb, $getRoleId); $childRoleObjects = array(); // create html page object $page = new HtmlPage($headline); $page->addJavascript(' checkMaxMemberCount(); $("#rol_assign_roles").change(function() { markRoleRight("rol_assign_roles", "rol_all_lists_view", true); }); $("#rol_all_lists_view").change(function() { markRoleRight(\'rol_all_lists_view\', \'rol_assign_roles\', false); }); $("#rol_max_members").change(function() { checkMaxMemberCount(); });', true); $page->addJavascript(' // show/hide role dependencies if max count members will be changed function checkMaxMemberCount() { // Wenn eine Maximale Mitgliederzahl angeben wurde, duerfen keine Rollenabhaengigkeiten bestehen if($("#rol_max_members").val() > 0) { // Die Box zum konfigurieren der Rollenabhängig wird ausgeblendet $("#gb_dependencies").hide(); // Alle Abhängigen Rollen werden markiert und auf unabhängig gesetzt $("#dependent_roles").val("");
$gNavigation->addStartUrl(CURRENT_URL, $dates->getHeadline($getHeadline)); } // create html page object $page = new HtmlPage($dates->getHeadline($getHeadline)); $page->enableModal(); if ($getViewMode === 'html') { $datatable = true; $hoverRows = true; $classTable = 'table'; if ($gPreferences['enable_rss'] == 1 && $gPreferences['enable_dates_module'] == 1) { $page->addRssFile($g_root_path . '/adm_program/modules/dates/rss_dates.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } $page->addJavascript(' $("#sel_change_view").change(function () { self.location.href = "dates.php?view=" + $("#sel_change_view").val() + "&mode=' . $getMode . '&headline=' . $getHeadline . '&date_from=' . $dates->getParameter('dateStartFormatAdmidio') . '&date_to=' . $dates->getParameter('dateEndFormatAdmidio') . '&cat_id=' . $getCatId . '"; }); $("#menu_item_print_view").click(function () { window.open("' . $g_root_path . '/adm_program/modules/dates/dates.php?view_mode=print&view=' . $getView . '&mode=' . $getMode . '&headline=' . $getHeadline . '&cat_id=' . $getCatId . '&date_from=' . $dates->getParameter('dateStartFormatEnglish') . '&date_to=' . $dates->getParameter('dateEndFormatEnglish') . '", "_blank"); });', true); // If default view mode is set to compact we need a back navigation if one date is selected for detail view if ($getId > 0) { // add back link to module menu $datesMenu = $page->getMenu(); $datesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } // get module menu $DatesMenu = $page->getMenu(); // Add new event if ($gCurrentUser->editDates() && $getId === 0) { $DatesMenu->addItem('admMenuItemAdd', $g_root_path . '/adm_program/modules/dates/dates_new.php?headline=' . $getHeadline, $gL10n->get('SYS_CREATE_VAR', $getHeadline), 'add.png'); }
$page->addRssFile($g_root_path . '/adm_program/modules/guestbook/rss_guestbook.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } $page->addJavascript(' function getComments(commentId) { // RequestObjekt abschicken und Kommentar laden $.get("' . $g_root_path . '/adm_program/modules/guestbook/get_comments.php?cid=" + commentId + "&moderation=" + ' . $getModeration . ', function(data) { $("#comments_" + commentId).html(data); }); } function toggleComments(commentId) { toggleDiv("admCommentsInvisible_" + commentId); toggleDiv("admCommentsVisible_" + commentId); if (document.getElementById("comments_" + commentId).innerHTML.length === 0) { getComments(commentId); } else { toggleDiv("comments_" + commentId); } } function toggleDiv(objectId) { if($("#" + objectId).is(":hidden")) { $("#" + objectId).show(); } else { $("#" + objectId).hide(); } } '); // add headline and title of module if ($getModeration == 1) {
document.getElementById("mylist_configuration_form").action = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=3"; document.getElementById("mylist_configuration_form").submit(); } break; case "system": var msg_result = confirm("' . $gL10n->get('LST_WANT_CONFIGURATION_FOR_ALL_USERS') . '"); if(msg_result) { document.getElementById("mylist_configuration_form").action = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=4"; document.getElementById("mylist_configuration_form").submit(); } break; } }'; $page->addJavascript($javascriptCode); $page->addJavascript('$(document).ready(function() { $("#sel_select_configuation").change(function() { loadList(); }); $("#btn_show_list").click(function() { send("show"); }); $("#btn_add_column").click(function() { addColumn(); }); $("#btn_save").click(function() { send("save_as"); }); $("#btn_save_changes").click(function() { send("save"); }); $("#btn_delete").click(function() { send("delete"); }); $("#btn_copy").click(function() { send("save_as"); }); for(var counter = 0; counter < ' . $defaultColumnRows . '; counter++) { addColumn(); } });', true); // get module menu $myListMenu = $page->getMenu();
$memberElements[$date->getValue('dat_rol_id')] = $participants->getParticipantsArray($date->getValue('dat_rol_id')); } } $count++; } } // create html page object $page = new HtmlPage($getHeadline); if ($getViewMode === 'html' || $getViewMode === 'compact') { if ($gPreferences['enable_rss'] == 1 && $gPreferences['enable_dates_module'] == 1) { $page->addRssFile($g_root_path . '/adm_program/modules/dates/rss_dates.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } $page->addJavascript(' $("#admCalendar").change(function () { var calendarId = ""; if ($("#admCalendar").selectedIndex != 0) { var calendarId = $("#admCalendar").val(); } self.location.href = "dates.php?mode=' . $getMode . '&headline=' . $getHeadline . '&date_from=' . $dates->getParameter('dateStartFormatAdmidio') . '&date_to=' . $dates->getParameter('dateEndFormatAdmidio') . '&cat_id=" + calendarId; });', true); $page->addJavascript(' function Datefilter() { var field_error = "' . $gL10n->get('ECA_FIELD_ERROR') . '"; if (document.Formular.date_from.value == "" || document.Formular.date_to.value == "") { alert(field_error); document.Formular.date_from.focus(); return false; } }'); // If default view mode is set to compact we need a back navigation if one date is selected for detail view
if (isset($_SESSION['profile_request'][$field_name])) { $inventory->setValue($field->getValue('inf_name_intern'), $_SESSION['profile_request'][$field_name]); } } if (isset($_SESSION['profile_request']['usr_login_name'])) { $inventory->setArray(array('usr_login_name' => $_SESSION['profile_request']['usr_login_name'])); } if (isset($_SESSION['profile_request']['reg_org_id'])) { $registrationOrgId = $_SESSION['profile_request']['reg_org_id']; } unset($_SESSION['profile_request']); } // create html page object $page = new HtmlPage($headline); $page->addJavascript(' var profileJS = new profileJSClass(); profileJS.init();', true); // add back link to module menu $profileEditMenu = $page->getMenu(); $profileEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // create html form $form = new HtmlForm('edit_item_form', $g_root_path . '/adm_program/modules/inventory/item_save.php?item_id=' . $getItemId . '&new_item=' . $getNewItem, $page); // ******************************************************************************* // Schleife ueber alle Kategorien und Felder ausser den Stammdaten // ******************************************************************************* $category = ''; foreach ($gInventoryFields->mInventoryFields as $field) { // Kategorienwechsel den Kategorienheader anzeigen // bei schneller Registrierung duerfen nur die Pflichtfelder ausgegeben werden if ($category != $field->getValue('cat_name')) { if ($category !== '') {
$page->addHtml('<h4 id="album-overview"><ol class="breadcrumb"> <li><a href="' . $g_root_path . '/adm_program/modules/photos/photos.php"></a> <a href="' . $g_root_path . '/adm_program/modules/photos/photos.php">' . $gL10n->get('PHO_PHOTO_ALBUMS') . '</a></li>' . $navilink . '<li>' . $photoAlbum->getValue('pho_name') . '</li> </ol></h4>'); } $page->addHtml('</div>'); // add rss feed to announcements if ($gPreferences['enable_rss'] == 1) { $page->addRssFile($g_root_path . '/adm_program/modules/photos/rss_photos.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline)); } if ($gCurrentUser->editPhotoRight()) { $page->addJavascript(' // rotate image function imgrotate(img, direction) { $.get("' . $g_root_path . '/adm_program/modules/photos/photo_function.php", {pho_id: ' . $getPhotoId . ', photo_nr: img, job: "rotate", direction: direction}, function(data) { // Anhängen der Zufallszahl ist nötig um den Browsercache zu überlisten $("#img_"+img).attr("src", "photo_show.php?pho_id=' . $getPhotoId . '&photo_nr="+img+"&thumb=1&rand="+Math.random()); return false; }); }'); } // integrate bootstrap ekko lightbox addon if ($gPreferences['photo_show_mode'] == 1) { $page->addCssFile('adm_program/libs/lightbox/ekko-lightbox.css'); $page->addJavascriptFile('adm_program/libs/lightbox/ekko-lightbox.js'); $page->addJavascript('$(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); });', true); } $page->addJavascript(' $("body").on("hidden.bs.modal", ".modal", function () { $(this).removeData("bs.modal"); location.reload(); }); $("#menu_item_upload_photo").attr("data-toggle", "modal"); $("#menu_item_upload_photo").attr("data-target", "#admidio_modal");
$page->addJavascript(' var profileJS = new profileJSClass(); profileJS.deleteRole_ConfirmText = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.deleteFRole_ConfirmText = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.setBy_Text = "' . $gL10n->get('SYS_SET_BY') . '"; profileJS.usr_id = ' . $user->getValue('usr_id') . '; function showHideMembershipInformation(element) { id = "#" + element.attr("id") + "_Content"; if($(id).css("display") === "none") { $(id).show("fast"); } else { $(id).hide("fast"); } } function callbackProfilePhoto() { var img_src = $("#profile_photo").attr("src"); var timestamp = new Date().getTime(); $("#btn_delete_photo").hide(); $("#profile_photo").attr("src",img_src+"&"+timestamp); } function callbackRoles() { if(profileJS) { profileJS.formerRoleCount++; profileJS.reloadFormerRoleMemberships(); }; } function callbackFormerRoles() { if(profileJS) { profileJS.formerRoleCount--; if(profileJS.formerRoleCount === 0) { $("#profile_former_roles_box").fadeOut("slow"); } }; } function callbackFutureRoles() { if(profileJS) { profileJS.futureRoleCount--; if(profileJS.futureRoleCount === 0) { $("#profile_future_roles_box").fadeOut("slow"); } }; } function formSubmitEvent() { $(".button-membership-period-form").click(function(event) { var memberId = $(this).attr("data-admidio"); var dateStart = $("#membership_start_date_"+memberId).val(); var dateEnd = $("#membership_end_date_"+memberId).val(); var action = $("#membership_period_form_"+memberId).attr("action")+"&membership_start_date_"+memberId+"="+dateStart+"&membership_end_date_"+memberId+"="+dateEnd; $("#membership_period_form_"+memberId+" .form-alert").hide(); $.ajax({ type: "GET", url: action, success: function(data) { if(data === "success") { $("#membership_period_form_"+memberId+" .form-alert").attr("class", "alert alert-success form-alert"); $("#membership_period_form_"+memberId+" .form-alert").html("<span class=\\"glyphicon glyphicon-ok\\"></span><strong>' . $gL10n->get('SYS_SAVE_DATA') . '</strong>"); $("#membership_period_form_"+memberId+" .form-alert").fadeIn("slow"); $("#membership_period_form_"+memberId+" .form-alert").animate({opacity: 1.0}, 2500); $("#membership_period_form_"+memberId+" .form-alert").fadeOut("slow"); $("#membership_period_"+memberId).animate({opacity: 1.0}, 2500); $("#membership_period_"+memberId).fadeOut("slow"); profileJS.reloadRoleMemberships(); profileJS.reloadFormerRoleMemberships(); profileJS.reloadFutureRoleMemberships(); } else { $("#membership_period_form_"+memberId+" .form-alert").attr("class", "alert alert-danger form-alert"); $("#membership_period_form_"+memberId+" .form-alert").fadeIn(); $("#membership_period_form_"+memberId+" .form-alert").html("<span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"+data); } } }); }); } ');
// set headline if ($getActiveRole) { $headline = $gL10n->get('LST_ACTIVE_ROLES'); } else { $headline = $gL10n->get('LST_INACTIVE_ROLES'); } if ($getCatId > 0) { $category = new TableCategory($gDb, $getCatId); $headline .= ' - ' . $category->getValue('cat_name'); } // Navigation of the module starts here $gNavigation->addStartUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); if ($gPreferences['lists_hide_overview_details'] == 0) { $page->addJavascript('$(".collapse").collapse();', true); } $page->addJavascript(' $(".panel-collapse select").change(function () { elementId = $(this).attr("id"); roleId = elementId.substr(elementId.search(/_/)+1); if($(this).val() === "mylist") { self.location.href = gRootPath + "/adm_program/modules/lists/mylist.php?rol_id=" + roleId + "&active_role=' . $getActiveRole . '"; } else { self.location.href = gRootPath + "/adm_program/modules/lists/lists_show.php?mode=html&lst_id=" + $(this).val() + "&rol_id=" + roleId; } });', true); // add headline and title of module $page->addHtml('<div id="lists_overview">'); // get module menu
} }); }); }); --></script> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">' . $headline . '</h4> </div> <div class="modal-body">'; } else { // create html page object $page = new HtmlPage($headline); $page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js'); $page->addJavascript('var profileJS = new profileJSClass();'); // add back link to module menu $rolesMenu = $page->getMenu(); $rolesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } // show headline of module $html .= '<form id="roles_assignment_form" action="' . $g_root_path . '/adm_program/modules/profile/roles_save.php?usr_id=' . $getUserId . '&new_user='******'&inline=' . $getInline . '" method="post">'; // Create table $table = new HtmlTable('role_assignment_table'); $columnHeading = array(' ', $gL10n->get('ROL_ROLE'), $gL10n->get('SYS_DESCRIPTION'), $gL10n->get('SYS_LEADER')); $table->addRowHeadingByArray($columnHeading); $table->setColumnAlignByArray(array('center', 'left', 'left', 'left')); if ($gCurrentUser->manageRoles()) { // Benutzer mit Rollenrechten darf ALLE Rollen zuordnen $sql = 'SELECT cat_id, cat_name, rol_name, rol_description, rol_id, rol_visible, rol_leader_rights, mem_rol_id, mem_usr_id, mem_leader
$page = new HtmlPage($headline); $page->addCssFile(THEME_PATH . '/css/chat.css'); $page->addJavascriptFile('adm_program/modules/messages/chat.js'); $page->addJavascript(' // kick off chat var chat = new Chat(); chat.getState(); $(function() { // watch textarea for release of key press [enter] $("#sendie").keyup(function(e) { if (e.keyCode === 13) { var text = $(this).val().trim(); if (text.length > 0) { chat.send(text); } $(this).val(""); } }); }); $(document).ready(function() { var intervalID = setInterval(chat.update, 2500); }); '); // add back link to module menu $messagesChatMenu = $page->getMenu(); $messagesChatMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
$_SESSION['fields_request']['usf_hidden'] = 1; } // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt // nun die vorher eingegebenen Inhalte ins Objekt schreiben $userField->setArray($_SESSION['fields_request']); unset($_SESSION['fields_request']); } // create html page object $page = new HtmlPage($headline); $page->addJavascript(' function setValueList() { if ($("#usf_type").val() === "DROPDOWN" || $("#usf_type").val() === "RADIO_BUTTON") { $("#usf_value_list_group").show("slow"); $("#usf_value_list").attr("required", "required"); } else { $("#usf_value_list").removeAttr("required"); $("#usf_value_list_group").hide(); } } setValueList(); $("#usf_type").click(function() { setValueList(); });', true); // add back link to module menu $profileFieldsEditMenu = $page->getMenu(); $profileFieldsEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('profile_fields_edit_form', $g_root_path . '/adm_program/modules/preferences/fields_function.php?usf_id=' . $getUsfId . '&mode=1', $page); $form->openGroupBox('gb_designation', $gL10n->get('SYS_DESIGNATION')); if ($userField->getValue('usf_system') == 1) { $form->addInput('usf_name', $gL10n->get('SYS_NAME'), $userField->getValue('usf_name', 'database'), array('maxLength' => 100, 'property' => FIELD_DISABLED)); } else {
*/ require_once '../../system/common.php'; require_once '../../system/login_valid.php'; // nur berechtigte User duerfen die Profilfelder bearbeiten if (!$gCurrentUser->isWebmaster()) { $gMessage->show($gL10n->get('SYS_NO_RIGHTS')); } // set module headline $headline = $gL10n->get('ORG_PROFILE_FIELDS'); $gNavigation->addUrl(CURRENT_URL, $headline); unset($_SESSION['fields_request']); // create html page object $page = new HtmlPage($headline); $page->enableModal(); $page->addJavascript(' $(".admidio-group-heading").click(function() { showHideBlock($(this).attr("id")); });', true); $page->addJavascript(' function moveCategory(direction, usfID) { var actRow = document.getElementById("row_usf_" + usfID); var childs = actRow.parentNode.childNodes; var prevNode = null; var nextNode = null; var actRowCount = 0; var actSequence = 0; var secondSequence = 0; // erst einmal aktuelle Sequenz und vorherigen/naechsten Knoten ermitteln for (i=0; i < childs.length; i++) { if(childs[i].tagName === "TR") { actRowCount++;
} // read organization values into form array foreach ($gCurrentOrganization->dbColumns as $key => $value) { $form_values[$key] = $value; } // read all system preferences into form array foreach ($gPreferences as $key => $value) { $form_values[$key] = $value; } // create html page object $page = new HtmlPage($headline); $showOptionValidModules = array('announcements', 'downloads', 'guestbook', 'ecards', 'lists', 'messages', 'photos', 'profile', 'events', 'links', 'user_management'); // open the modules tab if the options of a module should be shown if (in_array($showOption, $showOptionValidModules) == true) { $page->addJavascript('$("#tabs_nav_modules").attr("class", "active"); $("#tabs-modules").attr("class", "tab-pane active"); $("#collapse_' . $showOption . '").attr("class", "panel-collapse collapse in"); location.hash = "#" + "panel_' . $showOption . '";', true); } else { $page->addJavascript('$("#tabs_nav_common").attr("class", "active"); $("#tabs-common").attr("class", "tab-pane active"); $("#collapse_' . $showOption . '").attr("class", "panel-collapse collapse in"); location.hash = "#" + "panel_' . $showOption . '";', true); } $page->addJavascript(' $(".form-preferences").submit(function(event) { var id = $(this).attr("id"); var action = $(this).attr("action"); $("#"+id+" .form-alert").hide(); // disable default form submit event.preventDefault();
$page->addJavascript(' // Funktion blendet Zeitfelder ein/aus function setAllDay() { if ($("#dat_all_day:checked").val() !== undefined) { $("#date_from_time").hide(); $("#date_to_time").hide(); } else { $("#date_from_time").show("slow"); $("#date_to_time").show("slow"); } } function setDateParticipation() { if ($("#date_registration_possible:checked").val() !== undefined) { $("#date_current_user_assigned_group").show("slow"); $("#dat_max_members_group").show("slow"); } else { $("#date_current_user_assigned_group").hide(); $("#dat_max_members_group").hide(); } } // Funktion belegt das Datum-bis entsprechend dem Datum-Von function setDateTo() { var dateFrom = Date.parseDate($("#date_from").val(), "' . $gPreferences['system_date'] . '"); var dateTo = Date.parseDate($("#date_to").val(), "' . $gPreferences['system_date'] . '"); if(dateFrom.getTime() > dateTo.getTime()) { $("#date_to").val($("#date_from").val()); $("#date_to").datepicker("update"); } } function setLocationCountry() { if($("#dat_location").val().length > 0) { $("#dat_country_group").show(); $("#dat_country").focus(); } else { $("#dat_country_group").hide(); } }');
// create html page object $page = new HtmlPage($headline); $page->enableModal(); $page->addJavascriptFile('adm_program/libs/lightbox/ekko-lightbox.min.js'); $page->addJavascript(' $(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); }); $("#admidio_modal").on("show.bs.modal", function () { $(this).find(".modal-dialog").css({width: "800px"}); }); $("#btn_ecard_preview").click(function(event) { event.preventDefault(); $("#ecard_form input[id=\'submit_action\']").val("preview"); $("#ecard_form textarea[name=\'ecard_message\']").text( CKEDITOR.instances.ecard_message.getData() ); $.ajax({ // create an AJAX call... data: $("#ecard_form").serialize(), // get the form data type: "POST", // GET or POST url: "ecard_preview.php", // the file to call success: function(response) { // on success.. $(".modal-content").html(response); $("#admidio_modal").modal(); } }); return false; }); ', true); // add back link to module menu $ecardMenu = $page->getMenu(); $ecardMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); if ($gCurrentUser->isWebmaster()) {
$page->addJavascript(' function moveCategory(direction, catID) { var actRow = document.getElementById("row_" + catID); var childs = actRow.parentNode.childNodes; var prevNode = null; var nextNode = null; var actRowCount = 0; var actSequence = 0; var secondSequence = 0; // erst einmal aktuelle Sequenz und vorherigen/naechsten Knoten ermitteln for (i=0; i < childs.length; i++) { if (childs[i].tagName === "TR") { actRowCount++; if (actSequence > 0 && nextNode === null) { nextNode = childs[i]; } if (childs[i].id === "row_" + catID) { actSequence = actRowCount; } if (actSequence === 0) { prevNode = childs[i]; } } } // entsprechende Werte zum Hoch- bzw. Runterverschieben ermitteln if (direction === "up") { if (prevNode !== null) { actRow.parentNode.insertBefore(actRow, prevNode); secondSequence = actSequence - 1; } } else { if (nextNode !== null) { actRow.parentNode.insertBefore(nextNode, actRow); secondSequence = actSequence + 1; } } if (secondSequence > 0) { // Nun erst mal die neue Position von der gewaehlten Kategorie aktualisieren $.get(gRootPath + "/adm_program/modules/categories/categories_function.php?cat_id=" + catID + "&type=' . $getType . '&mode=4&sequence=" + direction); } }');
// Foto in PHP-Temp-Ordner übertragen $userImage->copyToFile(null, $_FILES['userfile']['tmp_name'][0]); // Foto aus PHP-Temp-Ordner einlesen $userImageData = fread(fopen($_FILES['userfile']['tmp_name'][0], 'r'), $_FILES['userfile']['size'][0]); // Zwischenspeichern des neuen Fotos in der Session $gCurrentSession->setValue('ses_binary', $userImageData); $gCurrentSession->save(); } // Image-Objekt löschen $userImage->delete(); if ($getUserId == $gCurrentUser->getValue('usr_id')) { $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE'); } else { $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $user->getValue('FIRST_NAME'), $user->getValue('LAST_NAME')); } // create html page object $page = new HtmlPage($headline); $page->addJavascript('$("#btn_cancel").click(function() { self.location.href=\'' . $g_root_path . '/adm_program/modules/profile/profile_photo_edit.php?mode=dont_save&usr_id=' . $getUserId . '\'; });', true); // show form $form = new HtmlForm('show_new_profile_picture_form', $g_root_path . '/adm_program/modules/profile/profile_photo_edit.php?mode=save&usr_id=' . $getUserId, $page); $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="profile_photo_show.php?usr_id=' . $getUserId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />'); $form->addCustomContent($gL10n->get('PRO_NEW_PICTURE'), '<img class="imageFrame" src="profile_photo_show.php?usr_id=' . $getUserId . '&new_photo=1" alt="' . $gL10n->get('PRO_NEW_PICTURE') . '" />'); $form->addLine(); $form->addSubmitButton('btn_update', $gL10n->get('SYS_APPLY'), array('icon' => THEME_PATH . '/icons/database_in.png')); $form->addButton('btn_cancel', $gL10n->get('SYS_ABORT'), array('icon' => THEME_PATH . '/icons/error.png')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); }
document.getElementById("form_mylist").action = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=4"; document.getElementById("form_mylist").submit(); } break; case "default": var msg_result = confirm("' . $gL10n->get('LST_CONFIGURATION_DEFAULT') . '"); if(msg_result) { document.getElementById("form_mylist").action = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=5"; document.getElementById("form_mylist").submit(); } break; } }'; $page->addJavascript($javascriptCode); $page->addJavascript('$(document).ready(function() { $("form:first *:input[type!=hidden]:first").focus(); $("#btn_show_list").click(function() {send("show");}); for(var counter = 0; counter < ' . $default_column_rows . '; counter++) { addColumn(); } });', true); // if mylist was not called directly then show link to navigate to previous page if ($gNavigation->count() > 1) { // add back link to module menu $myListMenu = $page->getMenu(); $myListMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } $page->addHtml('
$page->addJavascript(' var countErrorFiles = 0; $(function () { "use strict"; $("#fileupload").fileupload({ url: "photoupload.php?mode=upload_files&pho_id=' . $getPhotoId . '", sequentialUploads: true, dataType: "json", done: function (e, data) { $.each(data.result.files, function (index, file) { if(typeof file.error != "undefined") { $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>" + file.name + " - <strong>" + file.error + "</strong></div>").appendTo("#files"); countErrorFiles++; } else { var message = "' . $gL10n->get('PHO_FILE_UPLOADED') . '"; var newMessage = message.replace("%VAR1%", "<strong>" + file.name + "</strong>"); $("<p/>").html(newMessage).appendTo("#files"); } }); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $("#progress .progress-bar").css( "width", progress + "%" ); }, stop: function (e, data) { if(countErrorFiles == 0) { $("<p/>").html("<div class=\\"alert alert-success\\"><span class=\\"glyphicon glyphicon-ok\\"></span>' . $gL10n->get('PHO_PHOTO_UPLOAD_SUCCESSFUL') . '</div>").appendTo("#files"); } else { $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>' . $gL10n->get('PHO_PHOTO_UPLOAD_NOT_SUCCESSFUL') . '</div>").appendTo("#files"); } } }).prop("disabled", !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : "disabled"); });', true);
$weblink = new TableWeblink($gDb, $getLinkId); // Wenn kein Link gefunden wurde Fehler ausgeben if (strlen($weblink->getValue('lnk_url')) === 0 || !$gValidLogin && $weblink->getValue('cat_hidden') == 1) { $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW')); } // Wenn Link gültig ist, Counter um eine Position erhöhen $weblink->setValue('lnk_counter', $weblink->getValue('lnk_counter') + 1); $weblink->save(); // MR: Neue Prüfung für direkte Weiterleitung oder mit Anzeige if ($gPreferences['weblinks_redirect_seconds'] > 0) { // create html page object $page = new HtmlPage($gL10n->get('LNK_REDIRECT')); // add special header for automatic redirection after x seconds $page->addHeader('<meta http-equiv="refresh" content="' . $gPreferences['weblinks_redirect_seconds'] . '; url=' . $weblink->getValue('lnk_url') . '">'); // Counter zählt die sekunden bis zur Weiterleitung runter $page->addJavascript(' function countDown(init) { if (init || --document.getElementById("counter").firstChild.nodeValue > 0 ) { window.setTimeout( "countDown()" , 1000 ); } }; countDown(true);'); // Html des Modules ausgeben $page->addHtml(' <p class="lead">' . $gL10n->get('LNK_REDIRECT_DESC', $gCurrentOrganization->getValue('org_longname'), '<span id="counter">' . $gPreferences['weblinks_redirect_seconds'] . '</span>', '<strong>' . $weblink->getValue('lnk_name') . '</strong> (' . $weblink->getValue('lnk_url') . ')', '<a href="' . $weblink->getValue('lnk_url') . '" target="_self">hier</a>') . ' </p>'); // show html of complete page $page->show(); } else { header('Location:' . $weblink->getValue('lnk_url')); }
} $gNavigation->addUrl(CURRENT_URL, $headline); // create html page object $page = new HtmlPage($headline); $page->addCssFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/css/datepicker3.css'); $page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/bootstrap-datepicker.js'); $page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/locales/bootstrap-datepicker.' . $gPreferences['system_language'] . '.js'); $page->addJavascript(' var profileJS = new profileJSClass(); profileJS.deleteRole_ConfirmText = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.deleteFRole_ConfirmText = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '"; profileJS.setBy_Text = "' . $gL10n->get('SYS_SET_BY') . '"; profileJS.inv_id = ' . $inventory->getValue('inv_id') . '; function showHideMembershipInformation(element) { id = "#" + element.attr("id") + "_Content"; if($(id).css("display") === "none") { $(id).show("fast"); } else { $(id).hide("fast"); } }'); $page->addJavascript(' profileJS.init(); $(".admidio-icon-link-popup").colorbox({rel:\'nofollow\', scrolling:false, onComplete:function() { $("#admButtonNo").focus(); }}); $(".admMemberInfo").click(function () { showHideMembershipInformation($(this)); }); $("#profile_authorizations_box_body").mouseout(function () { profileJS.deleteShowInfo(); }); $(".admidio-form-membership-period").submit(function(event) { var id = $(this).attr("id");
/** * Create a html page if necessary and show the message with the configured buttons. * @param string $content The message text that should be shown. The content could have html. * @param string $headline Optional a headline for the message. Default will be SYS_NOTE. */ public function show($content, $headline = '') { // noetig, da dies bei den includes benoetigt wird global $gDb, $gL10n, $page; $html = ''; // first perform a rollback in database if there is an open transaction $gDb->rollback(); // Ueberschrift setzen, falls diese vorher nicht explizit gesetzt wurde if ($headline === '') { $headline = $gL10n->get('SYS_NOTE'); } // Variablen angeben if (!$this->inline) { // nur pruefen, wenn vorher nicht schon auf true gesetzt wurde $this->inline = headers_sent(); } if (!$this->inline) { // create html page object $page = new HtmlPage($headline); $page->hideMenu(); if (!$this->includeThemeBody) { // don't show custom html of the current theme $page->hideThemeHtml(); } // forward to next page after x seconds if ($this->timer > 0) { $page->addJavascript('window.setTimeout("window.location.href=\'' . $this->forwardUrl . '\'", ' . $this->timer . ');'); } } elseif (!$this->modalWindowMode) { header('Content-type: text/html; charset=utf-8'); $html .= '<h1>' . $headline . '</h1>'; } // create html for buttons $htmlButtons = ''; if ($this->showButtons) { if ($this->forwardUrl !== '') { if ($this->showYesNoButtons) { $htmlButtons .= ' <button id="admButtonYes" class="btn" type="button" onclick="self.location.href=\'' . $this->forwardUrl . '\'"> <img src="' . THEME_PATH . '/icons/ok.png" alt="' . $gL10n->get('SYS_YES') . '" /> ' . $gL10n->get('SYS_YES') . ' </button> <button id="admButtonNo" class="btn" type="button" onclick="history.back()"> <img src="' . THEME_PATH . '/icons/error.png" alt="' . $gL10n->get('SYS_NO') . '" /> ' . $gL10n->get('SYS_NO') . ' </button>'; } else { // Wenn weitergeleitet wird, dann auch immer einen Weiter-Button anzeigen $htmlButtons .= ' <a class="btn" href="' . $this->forwardUrl . '">' . $gL10n->get('SYS_NEXT') . ' <img src="' . THEME_PATH . '/icons/forward.png" alt="' . $gL10n->get('SYS_NEXT') . '" title="' . $gL10n->get('SYS_NEXT') . '" /> </a>'; } } else { // Wenn nicht weitergeleitet wird, dann immer einen Zurueck-Button anzeigen // bzw. ggf. einen Fenster-Schließen-Button if (!$this->modalWindowMode) { $htmlButtons .= ' <a class="btn" href="javascript:history.back()"> <img src="' . THEME_PATH . '/icons/back.png" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '" />' . $gL10n->get('SYS_BACK') . '</a>'; } } } if ($this->modalWindowMode) { $html .= ' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h4 class="modal-title">' . $headline . '</h4> </div> <div class="modal-body">' . $content . '</div> <div class="modal-footer">' . $htmlButtons . '</div>'; } else { $html .= ' <div class="message"> <p class="lead">' . $content . '</p> ' . $htmlButtons . ' </div>'; } if ($this->showTextOnly) { // show the pure message text without any html echo strip_tags($content); } elseif ($this->showHtmlTextOnly) { // show the pure message text with their html echo $content; } elseif ($this->inline) { // show the message in html but without the theme specific header and body echo $html; } else { // show a Admidio html page with complete theme header and body $page->addHtml($html); $page->show(); } exit; }
$form->addInput('date_to', $gL10n->get('LST_ROLE_MEMBERSHIP_TO'), $dateTo, array('type' => 'date', 'maxLength' => 10)); $form->addInput('lst_id', '', $getListId, array('property' => FIELD_HIDDEN)); $form->addInput('rol_ids', '', $getRoleIds, array('property' => FIELD_HIDDEN)); $form->addInput('show_members', '', $getShowMembers, array('property' => FIELD_HIDDEN)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $filterNavbar->addForm($form->show(false)); $page->addHtml($filterNavbar->show(false)); } $page->addHtml('<h5>' . $htmlSubHeadline . '</h5>'); $page->addJavascript(' $("#export_list_to").change(function () { if($(this).val().length > 1) { var result = $(this).val(); $(this).prop("selectedIndex",0); self.location.href = "' . $g_root_path . '/adm_program/modules/lists/lists_show.php?" + "lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=" + result + "&show_members=' . $getShowMembers . '&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '"; } }); $("#menu_item_print_view").click(function () { window.open("' . $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=print&show_members=' . $getShowMembers . '&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '", "_blank"); });', true); // get module menu $listsMenu = $page->getMenu(); $listsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); if ($getFullScreen) { $listsMenu->addItem('menu_item_normal_picture', $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=html&show_members=' . $getShowMembers . '&full_screen=false&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '', $gL10n->get('SYS_NORMAL_PICTURE'), 'arrow_in.png'); } else { $listsMenu->addItem('menu_item_full_screen', $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=html&show_members=' . $getShowMembers . '&full_screen=true&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '', $gL10n->get('SYS_FULL_SCREEN'), 'arrow_out.png'); } if ($numberRoles === 1) {
} else { $headline = $gL10n->get('DOW_DOWNLOADS') . ' - ' . $currentFolder->getValue('fol_name'); } // Navigation of the module starts here $gNavigation->addStartUrl(CURRENT_URL, $headline); $getFolderId = $currentFolder->getValue('fol_id'); // Get folder content for style $folderContent = $currentFolder->getFolderContentsForDownload(); // Keep navigation link $navigationBar = $currentFolder->getNavigationForDownload(); // create html page object $page = new HtmlPage($headline); $page->enableModal(); $page->addJavascript(' $("body").on("hidden.bs.modal", ".modal", function () { $(this).removeData("bs.modal"); location.reload(); }); $("#menu_item_upload_files").attr("data-toggle", "modal"); $("#menu_item_upload_files").attr("data-target", "#admidio_modal"); ', true); // get module menu $DownloadsMenu = $page->getMenu(); if ($gCurrentUser->editDownloadRight()) { // upload only possible if upload filesize > 0 if ($gPreferences['max_file_upload_size'] > 0) { // show links for upload, create folder and folder configuration $DownloadsMenu->addItem('menu_item_create_folder', $g_root_path . '/adm_program/modules/downloads/folder_new.php?folder_id=' . $getFolderId, $gL10n->get('DOW_CREATE_FOLDER'), 'folder_create.png'); $DownloadsMenu->addItem('menu_item_upload_files', $g_root_path . '/adm_program/system/file_upload.php?module=downloads&id=' . $getFolderId, $gL10n->get('DOW_UPLOAD_FILES'), 'page_white_upload.png'); } $DownloadsMenu->addItem('menu_item_config_folder', $g_root_path . '/adm_program/modules/downloads/folder_config.php?folder_id=' . $getFolderId, $gL10n->get('SYS_AUTHORIZATION'), 'lock.png'); } if ($gCurrentUser->isWebmaster()) { // show link to system preferences of weblinks
$sql = 'SELECT inv_id, item_name.ind_value as item_name, room_id.ind_value as room_id, COALESCE(inv_timestamp_change, inv_timestamp_create) as timestamp FROM ' . TBL_INVENT . ' INNER JOIN ' . TBL_INVENT_DATA . ' as item_name ON item_name.ind_itm_id = inv_id AND item_name.ind_inf_id = ' . $gInventoryFields->getProperty('ITEM_NAME', 'inf_id') . ' INNER JOIN ' . TBL_INVENT_DATA . ' as room_id ON room_id.ind_itm_id = inv_id AND room_id.ind_inf_id = ' . $gInventoryFields->getProperty('ROOM_ID', 'inf_id') . ' WHERE inv_valid = 1 ORDER BY item_name.ind_value, room_id.ind_value '; $mglStatement = $gDb->query($sql); // create html page object $page = new HtmlPage($headline); $page->addJavascript(' $(".admidio-icon-link-popup").colorbox({rel:\'nofollow\', scrolling:false, onComplete:function() { $("#admButtonNo").focus(); }}); ', true); // get module menu $itemsAdministrationMenu = $page->getMenu(); $itemsAdministrationMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/inventory/item_new.php', $gL10n->get('INV_CREATE_ITEM'), 'add.png'); // show link to room management $itemsAdministrationMenu->addItem('menu_item_manage_rooms', $g_root_path . '/adm_program/modules/rooms/rooms.php', $gL10n->get('DAT_SWITCH_TO_ROOM_ADMINISTRATION'), 'home.png'); if ($gCurrentUser->isWebmaster()) { // show link to maintain profile fields $itemsAdministrationMenu->addItem('menu_item_maintain_inventory_fields', $g_root_path . '/adm_program/modules/inventory/fields.php', $gL10n->get('PRO_MAINTAIN_ITEM_FIELDS'), 'application_form_edit.png'); } // Create table object $itemsTable = new HtmlTable('tbl_invent', $page, true, true, 'table table-condensed'); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_ABR_NO'), $gL10n->get('SYS_NAME'), $gL10n->get('SYS_ROOM'), $gL10n->get('MEM_UPDATED_ON'), ' '); $itemsTable->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
} if ($getInvisible == true) { $visibleRolesLinkDescription = $gL10n->get('ROL_VISIBLE_ROLES'); $listDescription = $gL10n->get('ROL_INVISIBLE_ROLES'); $visibleRolesImage = 'light_on.png'; $visibleRolesFlag = '0'; // in invisible mode show active and inactive invisible roles $sqlRolesStatus = ' AND rol_visible = \'0\' '; } else { $visibleRolesLinkDescription = $gL10n->get('ROL_INVISIBLE_ROLES'); $visibleRolesImage = 'light_off.png'; $visibleRolesFlag = '1'; } // create html page object $page = new HtmlPage($headline); $page->addJavascript('$(".admidio-group-heading").click(function() {showHideBlock($(this).attr("id"));});', true); // get module menu $rolesMenu = $page->getMenu(); // define link to create new profile field $rolesMenu->addItem('menu_item_new_role', $g_root_path . '/adm_program/modules/roles/roles_new.php', $gL10n->get('SYS_CREATE_ROLE'), 'add.png'); // define link to maintain categories $rolesMenu->addItem('menu_item_maintain_category', $g_root_path . '/adm_program/modules/categories/categories.php?type=ROL', $gL10n->get('SYS_MAINTAIN_CATEGORIES'), 'edit.png'); // define link to show inactive roles $rolesMenu->addItem('menu_item_inactive_role', $g_root_path . '/adm_program/modules/roles/roles.php?inactive=' . $activeRolesFlag, $activeRolesLinkDescription, $activeRolesImage); // define link to show hidden roles $rolesMenu->addItem('menu_item_hidden_role', $g_root_path . '/adm_program/modules/roles/roles.php?invisible=' . $visibleRolesFlag, $visibleRolesLinkDescription, $visibleRolesImage); // Create table $table = new HtmlTable('roles_table', $page, true, true); // create array with all column heading values $columnHeading = array($gL10n->get('SYS_CATEGORY'), 'ORDER', $listDescription, $gL10n->get('SYS_AUTHORIZATION'), $gL10n->get('ROL_PREF'), $gL10n->get('SYS_FEATURES')); $table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'left', 'right'));