$row = $statement->fetch(); if ($row[0] > 0) { // Wenn dies der Fall ist, gibt es natuerlich keinen Gaestebucheintrag... $gMessage->show($gL10n->get('GBO_FLOODING_PROTECTION', $gPreferences['flooding_protection_time'])); } } // create html page object $page = new HtmlPage($headline); // add back link to module menu $guestbookCommentCreateMenu = $page->getMenu(); $guestbookCommentCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('guestbook_comment_edit_form', $g_root_path . '/adm_program/modules/guestbook/guestbook_function.php?id=' . $id . '&headline=' . $getHeadline . '&mode=' . $mode, $page); if ($gCurrentUser->getValue('usr_id') > 0) { // registered users should not change their name $form->addInput('gbc_name', $gL10n->get('SYS_NAME'), $guestbook_comment->getValue('gbc_name'), array('maxLength' => 60, 'property' => FIELD_DISABLED)); } else { $form->addInput('gbc_name', $gL10n->get('SYS_NAME'), $guestbook_comment->getValue('gbc_name'), array('maxLength' => 60, 'property' => FIELD_REQUIRED)); } $form->addInput('gbc_email', $gL10n->get('SYS_EMAIL'), $guestbook_comment->getValue('gbc_email'), array('type' => 'email', 'maxLength' => 254)); $form->addEditor('gbc_text', $gL10n->get('SYS_COMMENT'), $guestbook_comment->getValue('gbc_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_comment->getValue('gbc_usr_id_create'), $guestbook_comment->getValue('gbc_timestamp_create'), $guestbook_comment->getValue('gbc_usr_id_change'), $guestbook_comment->getValue('gbc_timestamp_change'))); // add form to html page and show page
if ($gPreferences['enable_dates_ical'] == 1) { $DatesMenu->addItem('admMenuItemICal', $g_root_path . '/adm_program/modules/dates/ical_dates.php?headline=' . $getHeadline . '&cat_id=' . $getCatId, $gL10n->get('DAT_EXPORT_ICAL'), 'database_out.png', 'right', 'menu_item_extras'); } if ($gCurrentUser->isWebmaster()) { // show link to system preferences of weblinks $DatesMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=events', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right', 'menu_item_extras'); } elseif ($gCurrentUser->editDates()) { // if no calendar selectbox is shown, then show link to edit calendars $DatesMenu->addItem('admMenuItemCategories', '/adm_program/modules/categories/categories.php?type=DAT&title=' . $gL10n->get('DAT_CALENDAR'), $gL10n->get('DAT_MANAGE_CALENDARS'), 'application_view_tile.png', 'right', 'menu_item_extras'); } } // create filter menu with elements for calendar and start-/enddate $FilterNavbar = new HtmlNavbar('menu_dates_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/dates/dates.php?headline=' . $getHeadline . '&view=' . $getView, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addSelectBoxForCategories('cat_id', $gL10n->get('DAT_CALENDAR'), $gDb, 'DAT', 'FILTER_CATEGORIES', array('defaultValue' => $dates->getParameter('cat_id'))); $form->addInput('date_from', $gL10n->get('SYS_START'), $dates->getParameter('dateStartFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('date_to', $gL10n->get('SYS_END'), $dates->getParameter('dateEndFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('view', '', $getView, array('property' => FIELD_HIDDEN)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); } elseif ($getViewMode === 'print') { $datatable = false; $hoverRows = false; $classTable = 'table table-condensed table-striped'; // create html page object without the custom theme files $page->hideThemeHtml(); $page->hideMenu(); $page->setPrintMode(); $page->addHtml('<h3>' . $gL10n->get('DAT_PERIOD_FROM_TO', $dates->getParameter('dateStartFormatAdmidio'), $dates->getParameter('dateEndFormatAdmidio')) . '</h3>'); }
} // 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();
$("#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()) { // show link to system preferences of announcements $ecardMenu->addItem('menu_item_preferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=ecards', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } // show form $form = new HtmlForm('ecard_form', 'ecard_send.php', $page); $form->addInput('submit_action', null, '', array('type' => 'hidden')); $form->addInput('photo_id', null, $getPhotoId, array('type' => 'hidden')); $form->addInput('photo_nr', null, $getPhotoNr, array('type' => 'hidden')); $form->openGroupBox('gb_layout', $gL10n->get('ECA_LAYOUT')); $form->addCustomContent($gL10n->get('SYS_PHOTO'), ' <a data-toggle="lightbox" data-type="image" data-title="' . $gL10n->get('SYS_PREVIEW') . '" href="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&photo_nr=' . $getPhotoNr . '&max_width=' . $gPreferences['photo_show_width'] . '&max_height=' . $gPreferences['photo_show_height'] . '"><img src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&photo_nr=' . $getPhotoNr . '&max_width=' . $gPreferences['ecard_thumbs_scale'] . '&max_height=' . $gPreferences['ecard_thumbs_scale'] . '" class="imageFrame" alt="' . $gL10n->get('ECA_VIEW_PICTURE_FULL_SIZED') . '" title="' . $gL10n->get('ECA_VIEW_PICTURE_FULL_SIZED') . '" /> </a>'); $templates = admFuncGetDirectoryEntries(THEME_SERVER_PATH . '/ecard_templates'); foreach ($templates as $key => $templateName) { $templates[$key] = ucfirst(preg_replace('/[_-]/', ' ', str_replace('.tpl', '', $templateName))); } $form->addSelectBox('ecard_template', $gL10n->get('ECA_TEMPLATE'), $templates, array('defaultValue' => $template, 'property' => FIELD_REQUIRED, 'showContextDependentFirstEntry' => false)); $form->closeGroupBox();
function markRoleRight(srcRight, destRight, checked) { if (document.getElementById(srcRight).checked && checked) { document.getElementById(destRight).checked = true; } if (!document.getElementById(srcRight).checked && !checked) { document.getElementById(destRight).checked = false; } }'); // add back link to module menu $rolesEditMenu = $page->getMenu(); $rolesEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('roles_edit_form', $g_root_path . '/adm_program/modules/roles/roles_function.php?rol_id=' . $getRoleId . '&mode=2', $page); $form->openGroupBox('gb_name_category', $gL10n->get('SYS_NAME') . ' & ' . $gL10n->get('SYS_CATEGORY')); if ($role->getValue('rol_webmaster') == 1) { $form->addInput('rol_name', $gL10n->get('SYS_NAME'), $role->getValue('rol_name'), array('maxLength' => 100, 'property' => FIELD_READONLY)); } else { $form->addInput('rol_name', $gL10n->get('SYS_NAME'), $role->getValue('rol_name'), array('maxLength' => 100, 'property' => FIELD_REQUIRED)); } $form->addMultilineTextInput('rol_description', $gL10n->get('SYS_DESCRIPTION'), $role->getValue('rol_description'), 3, array('maxLength' => 4000)); $form->addSelectBoxForCategories('rol_cat_id', $gL10n->get('SYS_CATEGORY'), $gDb, 'ROL', 'EDIT_CATEGORIES', array('property' => FIELD_REQUIRED, 'defaultValue' => $role->getValue('rol_cat_id'))); $form->closeGroupBox(); $form->openGroupBox('gb_properties', $gL10n->get('SYS_PROPERTIES')); if ($gPreferences['enable_mail_module']) { $selectBoxEntries = array(0 => $gL10n->get('SYS_NOBODY'), 1 => $gL10n->get('ROL_ONLY_ROLE_MEMBERS'), 2 => $gL10n->get('ROL_ALL_MEMBERS'), 3 => $gL10n->get('ROL_ALL_GUESTS')); $form->addSelectBox('rol_mail_this_role', $gL10n->get('ROL_SEND_MAILS'), $selectBoxEntries, array('defaultValue' => $role->getValue('rol_mail_this_role'), 'showContextDependentFirstEntry' => false, 'helpTextIdLabel' => array('ROL_RIGHT_MAIL_THIS_ROLE_DESC', $gL10n->get('ROL_RIGHT_MAIL_TO_ALL')))); } $selectBoxEntries = array(0 => $gL10n->get('SYS_NOBODY'), 1 => $gL10n->get('ROL_ONLY_ROLE_MEMBERS'), 2 => $gL10n->get('ROL_ALL_MEMBERS')); $form->addSelectBox('rol_this_list_view', $gL10n->get('ROL_SEE_ROLE_MEMBERSHIP'), $selectBoxEntries, array('defaultValue' => $role->getValue('rol_this_list_view'), 'showContextDependentFirstEntry' => false, 'helpTextIdLabel' => array('ROL_RIGHT_THIS_LIST_VIEW_DESC', $gL10n->get('ROL_RIGHT_ALL_LISTS_VIEW')))); $selectBoxEntries = array(0 => $gL10n->get('ROL_NO_ADDITIONAL_RIGHTS'), 1 => $gL10n->get('SYS_ASSIGN_MEMBERS'), 2 => $gL10n->get('SYS_EDIT_MEMBERS'), 3 => $gL10n->get('ROL_ASSIGN_EDIT_MEMBERS')); $form->addSelectBox('rol_leader_rights', $gL10n->get('SYS_LEADER'), $selectBoxEntries, array('defaultValue' => $role->getValue('rol_leader_rights'), 'showContextDependentFirstEntry' => false, 'helpTextIdLabel' => 'ROL_LEADER_RIGHTS_DESC'));
} 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 { $form->addInput('usf_name', $gL10n->get('SYS_NAME'), $userField->getValue('usf_name', 'database'), array('maxLength' => 100, 'property' => FIELD_REQUIRED)); } // show internal field name for information if ($getUsfId > 0) { $form->addInput('usf_name_intern', $gL10n->get('SYS_INTERNAL_NAME'), $userField->getValue('usf_name_intern'), array('maxLength' => 100, 'property' => FIELD_DISABLED, 'helpTextIdLabel' => 'SYS_INTERNAL_NAME_DESC')); } if ($userField->getValue('usf_system') == 1) { $form->addInput('usf_cat_id', $gL10n->get('SYS_CATEGORY'), $userField->getValue('cat_name'), array('maxLength' => 100, 'property' => FIELD_DISABLED)); } else { $form->addSelectBoxForCategories('usf_cat_id', $gL10n->get('SYS_CATEGORY'), $gDb, 'USF', 'EDIT_CATEGORIES', array('property' => FIELD_REQUIRED, 'defaultValue' => $userField->getValue('usf_cat_id'))); } $form->closeGroupBox(); $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'));
$gNavigation->addUrl(CURRENT_URL, $headline); if (isset($_SESSION['download_request'])) { $form_values = strStripSlashesDeep($_SESSION['download_request']); unset($_SESSION['download_request']); } else { $form_values['new_folder'] = null; $form_values['new_description'] = null; } try { // get recordset of current folder from database $folder = new TableFolder($gDb); $folder->getFolderForDownload($getFolderId); } catch (AdmException $e) { $e->showHtml(); } $parentFolderName = $folder->getValue('fol_name'); // create html page object $page = new HtmlPage($headline); // add back link to module menu // @ptabaden: Changed icon of back button $folderNewMenu = $page->getMenu(); $folderNewMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), '<i class="fa fa-arrow-left" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_BACK') . '</div>', ''); $page->addHtml('<p class="lead">' . $gL10n->get('DOW_CREATE_FOLDER_DESC', $parentFolderName) . '</p>'); // show form $form = new HtmlForm('new_folder_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=3&folder_id=' . $getFolderId, $page); $form->addInput('new_folder', $gL10n->get('SYS_NAME'), $form_values['new_folder'], array('maxLength' => 255, 'property' => FIELD_REQUIRED)); $form->addMultilineTextInput('new_description', $gL10n->get('SYS_DESCRIPTION'), $form_values['new_description'], 4, array('maxLength' => 4000)); $form->addSubmitButton('btn_create', $gL10n->get('DOW_CREATE_FOLDER'), array('icon' => THEME_PATH . '/icons/folder_create.png', 'class' => ' col-sm-offset-3')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
} unset($_SESSION['categories_request']); } // create html page object $page = new HtmlPage($headline); // add back link to module menu $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')); }
} $category = $field->getValue('cat_name'); $form->addHtml('<a id="cat-' . $field->getValue('cat_id') . '"></a>'); $form->openGroupBox('gb_category_' . $field->getValue('cat_name_intern'), $field->getValue('cat_name')); if ($field->getValue('cat_name_intern') === 'MASTER_DATA') { if ($getUserId > 0 || $getNewUser === 2) { // add username to form $fieldProperty = FIELD_DEFAULT; $fieldHelpId = 'PRO_USERNAME_DESCRIPTION'; if (!$gCurrentUser->isWebmaster() && $getNewUser === 0) { $fieldProperty = FIELD_DISABLED; $fieldHelpId = ''; } elseif ($getNewUser > 0) { $fieldProperty = FIELD_REQUIRED; } $form->addInput('usr_login_name', $gL10n->get('SYS_USERNAME'), $user->getValue('usr_login_name'), array('maxLength' => 35, 'property' => $fieldProperty, 'helpTextIdLabel' => $fieldHelpId, 'class' => 'form-control-small')); if ($getNewUser === 2) { // at registration add password and password confirm to form $form->addInput('usr_password', $gL10n->get('SYS_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8, 'helpTextIdLabel' => 'PRO_PASSWORD_DESCRIPTION', 'class' => 'form-control-small')); $form->addInput('password_confirm', $gL10n->get('SYS_CONFIRM_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8, 'class' => 'form-control-small')); // show selectbox with all organizations of database if ($gPreferences['system_organization_select'] == 1) { $sql = 'SELECT org_id, org_longname FROM ' . TBL_ORGANIZATIONS . ' ORDER BY org_longname ASC, org_shortname ASC'; $form->addSelectBoxFromSql('reg_org_id', $gL10n->get('SYS_ORGANIZATION'), $gDb, $sql, array('property' => FIELD_REQUIRED, 'defaultValue' => $registrationOrgId)); } } else { // only show link if user is member of this organization. // Password of own user could be changed. // Webmasters are allowed to change password if no login was configured or no email is set to send a generated password.
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; } }
$("#form_members_create_user .form-alert").html("<span class=\\"glyphicon glyphicon-ok\\"></span><strong>' . $gL10n->get('MEM_USER_COULD_BE_CREATED') . '</strong>"); $("#form_members_create_user .form-alert").fadeIn("slow"); setTimeout(function () { self.location.href="' . $g_root_path . '/adm_program/modules/profile/profile_new.php?new_user=1&lastname=" + $("#lastname").val() + "&firstname=" + $("#firstname").val(); },2500); } else { if(data.length > 1000) { $(".modal-body").html(data); } else { $("#form_members_create_user .form-alert").attr("class", "alert alert-danger form-alert"); $("#form_members_create_user .form-alert").fadeIn(); $("#form_members_create_user .form-alert").html("<span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"+data); } } } }); }); //--></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">' . $gL10n->get('MEM_CREATE_USER') . '</h4> </div> <div class="modal-body"> <p class="lead">' . $gL10n->get('MEM_INPUT_FIRSTNAME_LASTNAME') . '</p>'; $form = new HtmlForm('form_members_create_user', $g_root_path . '/adm_program/modules/members/members_assign.php'); $form->addInput('lastname', $gL10n->get('SYS_LASTNAME'), null, array('maxLength' => 100, 'property' => FIELD_REQUIRED)); $form->addInput('firstname', $gL10n->get('SYS_FIRSTNAME'), null, array('maxLength' => 100, 'property' => FIELD_REQUIRED)); $form->addSubmitButton('btn_add', $gL10n->get('MEM_CREATE_USER'), array('icon' => THEME_PATH . '/icons/add.png', 'class' => ' col-sm-offset-3')); $form->show(); echo '</div>';
// add entry to array of all photo albums $photoAlbumsArray[$parentPhotoAlbum->getValue('pho_id')] = $vorschub . '— ' . $parentPhotoAlbum->getValue('pho_name') . ' (' . $parentPhotoAlbum->getValue('pho_begin', 'Y') . ')'; subfolder($parentPhotoAlbum->getValue('pho_id'), $vorschub, $photoAlbum, $phoId); } //while } //function // create html page object $page = new HtmlPage($headline); // add back link to module menu $photoAlbumMenu = $page->getMenu(); $photoAlbumMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); if ($getMode === 'new') { $parentAlbumId = $getPhotoId; } else { $parentAlbumId = $photoAlbum->getValue('pho_pho_id_parent'); } // show form $form = new HtmlForm('photo_album_edit_form', $g_root_path . '/adm_program/modules/photos/photo_album_function.php?pho_id=' . $getPhotoId . '&mode=' . $getMode, $page); $form->addInput('pho_name', $gL10n->get('PHO_ALBUM'), $photoAlbum->getValue('pho_name'), array('property' => FIELD_REQUIRED, 'maxLength' => 50)); subfolder(null, '', $photoAlbum, $getPhotoId); $form->addSelectBox('pho_pho_id_parent', $gL10n->get('PHO_PARENT_ALBUM'), $photoAlbumsArray, array('property' => FIELD_REQUIRED, 'defaultValue' => $parentAlbumId, 'showContextDependentFirstEntry' => false, 'helpTextIdLabel' => array('PHO_PARENT_ALBUM_DESC', $gL10n->get('PHO_PHOTO_ALBUMS')))); $form->addInput('pho_begin', $gL10n->get('SYS_START'), $photoAlbum->getValue('pho_begin'), array('property' => FIELD_REQUIRED, 'type' => 'date', 'maxLength' => 10)); $form->addInput('pho_end', $gL10n->get('SYS_END'), $photoAlbum->getValue('pho_end'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('pho_photographers', $gL10n->get('PHO_PHOTOGRAPHER'), $photoAlbum->getValue('pho_photographers'), array('maxLength' => 100)); $form->addCheckbox('pho_locked', $gL10n->get('PHO_ALBUM_LOCK'), $photoAlbum->getValue('pho_locked'), array('helpTextIdLabel' => 'PHO_ALBUM_LOCK_DESC')); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($photoAlbum->getValue('pho_usr_id_create'), $photoAlbum->getValue('pho_timestamp_create'), $photoAlbum->getValue('pho_usr_id_change'), $photoAlbum->getValue('pho_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
// get parameters $rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true); $rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true); $rq->addAllowed('GET', 'page', '', '', true, false); $rq->addAllowed('GET', 'since', '0000-00-00', '/^\\d{4}-\\d{2}-\\d{2}$/', false, false); $rq->addAllowed('GET', 'until', '0000-00-00', '/^\\d{4}-\\d{2}-\\d{2}$/', false, false); $par = $rq->getParams(); $page->openBlock('div', 'iw-content'); $page->addInline('p', 'This tool creates a list of contributors to a given article on a given project in wikitext.'); $page->addInline('h2', 'Options'); $optionForm = new HtmlForm('index.php', 'GET'); $optionForm->addHTML('<table class="iw-nostyle">'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('lang', 'Language'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('project', 'Project'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('page', 'Page title'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('page', $par['page'], 'A page title in the main namespace (0)', 0, true); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('since', 'Revisions since'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('since', $par['since'], '(Format: YYYY-MM-DD)');
$sql = 'SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . ' WHERE rol_mail_this_role = 3 AND rol_valid = 1 AND rol_cat_id = cat_id AND cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' ORDER BY cat_sequence, rol_name '; $result = $gDb->query($sql); while ($row = $gDb->fetch_array($result)) { $list[] = array('groupID: ' . $row['rol_id'], $row['rol_name'], ''); } } $form->addSelectBox('msg_to', $gL10n->get('SYS_TO'), $list, array('property' => FIELD_REQUIRED, 'showContextDependentFirstEntry' => false, 'multiselect' => true, 'helpTextIdLabel' => 'MAI_SEND_MAIL_TO_ROLE')); $form->addLine(); if ($gCurrentUser->getValue('usr_id') > 0) { $form->addInput('name', $gL10n->get('MAI_YOUR_NAME'), $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME'), array('maxLength' => 50, 'property' => FIELD_DISABLED)); $form->addInput('mailfrom', $gL10n->get('MAI_YOUR_EMAIL'), $gCurrentUser->getValue('EMAIL'), array('maxLength' => 50, 'property' => FIELD_DISABLED)); } else { $form->addInput('name', $gL10n->get('MAI_YOUR_NAME'), $form_values['name'], array('maxLength' => 50, 'property' => FIELD_REQUIRED)); $form->addInput('mailfrom', $gL10n->get('MAI_YOUR_EMAIL'), $form_values['mailfrom'], array('maxLength' => 50, 'property' => FIELD_REQUIRED)); } // show option to send a copy to your email address only for registered users because of spam abuse if ($gValidLogin) { $form->addCheckbox('carbon_copy', $gL10n->get('MAI_SEND_COPY'), $form_values['carbon_copy']); } // if preference is set then show a checkbox where the user can request a delivery confirmation for the email if ($gCurrentUser->getValue('usr_id') > 0 && $gPreferences['mail_delivery_confirmation'] == 2 || $gPreferences['mail_delivery_confirmation'] == 1) { $form->addCheckbox('delivery_confirmation', $gL10n->get('MAI_DELIVERY_CONFIRMATION'), $form_values['delivery_confirmation']); } $form->closeGroupBox(); $form->openGroupBox('gb_mail_message', $gL10n->get('SYS_MESSAGE'));
// show message if there were no changes for users if ($getUserId > 0) { $gMessage->show($gL10n->get('MEM_NO_CHANGES_PROFIL', $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'))); } else { $gMessage->show($gL10n->get('MEM_NO_CHANGES')); } } // create html page object $page = new HtmlPage($headline); // add back link to module menu $profileFieldHistoryMenu = $page->getMenu(); $profileFieldHistoryMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // create filter menu with input elements for Startdate and Enddate $FilterNavbar = new HtmlNavbar('menu_profile_field_history_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/members/profile_field_history.php?usr_id=' . $getUserId, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addInput('filter_date_from', $gL10n->get('SYS_START'), $dateFromHtml, array('type' => 'date', 'maxLength' => 10)); $form->addInput('filter_date_to', $gL10n->get('SYS_END'), $dateToHtml, array('type' => 'date', 'maxLength' => 10)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); $table = new HtmlTable('profile_field_history_table', $page, true, true); $columnHeading = array(); if ($getUserId === 0) { $table->setDatatablesOrderColumns(array(array(6, 'desc'))); $columnHeading[] = $gL10n->get('SYS_NAME'); } else { $table->setDatatablesOrderColumns(array(array(5, 'desc'))); } $columnHeading[] = $gL10n->get('SYS_FIELD'); $columnHeading[] = $gL10n->get('SYS_NEW_VALUE'); $columnHeading[] = $gL10n->get('SYS_PREVIOUS_VALUE');
$sysmail->addRecipient($user->getValue('EMAIL'), $user->getValue('FIRST_NAME', 'database') . ' ' . $user->getValue('LAST_NAME', 'database')); $sysmail->setVariable(1, $newPassword); $sysmail->setVariable(2, $g_root_path . '/adm_program/system/password_activation.php?usr_id=' . $user->getValue('usr_id') . '&aid=' . $activationId); $sysmail->sendSystemMail('SYSMAIL_ACTIVATION_LINK', $user); $user->saveChangesWithoutRights(); $user->save(); $gMessage->setForwardUrl($g_root_path . '/adm_program/system/login.php'); $gMessage->show($gL10n->get('SYS_LOSTPW_SEND', $_POST['recipient_email'])); } catch (AdmException $e) { $e->showHtml(); } } else { /*********************HTML_PART*******************************/ // create html page object $page = new HtmlPage($headline); // add back link to module menu $lostPasswordMenu = $page->getMenu(); $lostPasswordMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml('<p class="lead">' . $gL10n->get('SYS_PASSWORD_FORGOTTEN_DESCRIPTION') . '</p>'); // show form $form = new HtmlForm('lost_password_form', $g_root_path . '/adm_program/system/lost_password.php', $page); $form->addInput('recipient_email', $gL10n->get('SYS_EMAIL'), null, array('maxLength' => 50, 'property' => FIELD_REQUIRED)); // if captchas are enabled then visitors of the website must resolve this if (!$gValidLogin && $gPreferences['enable_mail_captcha'] == 1) { $form->addCaptcha('captcha', $gPreferences['captcha_type']); } $form->addSubmitButton('btn_send', $gL10n->get('SYS_SEND'), array('icon' => THEME_PATH . '/icons/email.png')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); }
WHERE rol_name LIKE \'' . $gL10n->get('SYS_WEBMASTER') . '\' AND rol_webmaster = 1 AND ( cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' OR cat_org_id IS NULL )'; $pdoStatement = $gDb->query($sql); $row = $pdoStatement->fetch(); // create role object for webmaster $roleWebmaster = new TableRoles($gDb, $row['rol_id']); // create html page object $page = new HtmlPage($headline); // add back link to module menu $loginMenu = $page->getMenu(); $loginMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('login_form', $g_root_path . '/adm_program/system/login_check.php', $page, array('showRequiredFields' => false)); $form->addInput('usr_login_name', $gL10n->get('SYS_USERNAME'), null, array('maxLength' => 35, 'property' => FIELD_REQUIRED, 'class' => 'form-control-small')); // TODO Future: 'minLength' => 8 $form->addInput('usr_password', $gL10n->get('SYS_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'class' => 'form-control-small')); // show selectbox with all organizations of database if ($gPreferences['system_organization_select'] == 1) { $sql = 'SELECT org_id, org_longname FROM ' . TBL_ORGANIZATIONS . ' ORDER BY org_longname ASC, org_shortname ASC'; $form->addSelectBoxFromSql('org_id', $gL10n->get('SYS_ORGANIZATION'), $gDb, $sql, array('property' => FIELD_REQUIRED, 'defaultValue' => $gCurrentOrganization->getValue('org_id'))); } if ($gPreferences['enable_auto_login'] == 1) { $form->addCheckbox('auto_login', $gL10n->get('SYS_REMEMBER_ME'), '0'); } $form->addSubmitButton('btn_login', $gL10n->get('SYS_LOGIN'), array('icon' => THEME_PATH . '/icons/key.png')); $page->addHtml($form->show(false)); if ($gPreferences['registration_mode'] > 0) {
$("#menu_item_print").click(function() { window.open("' . $g_root_path . '/adm_program/modules/dates/dates.php?mode=' . $getMode . '&headline=' . $getHeadline . '&cat_id=' . $getCatId . '&date_from=' . $dates->getParameter('dateStartFormatEnglish') . '&date_to=' . $dates->getParameter('dateEndFormatEnglish') . '&view_mode=print", "_blank"); });', true); if ($gCurrentUser->isWebmaster()) { // show link to system preferences of weblinks $DatesMenu->addItem('admMenuItemPreferencesLinks', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=events', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } elseif ($gCurrentUser->editDates()) { // if no calendar selectbox is shown, then show link to edit calendars $DatesMenu->addItem('admMenuItemCategories', '/adm_program/modules/categories/categories.php?type=DAT&title=' . $gL10n->get('DAT_CALENDAR'), $gL10n->get('DAT_MANAGE_CALENDARS'), 'application_view_tile.png'); } } // create filter menu with elements for calendar and start-/enddate $FilterNavbar = new HtmlNavbar('menu_dates_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/dates/dates.php?headline=' . $getHeadline, $page, array('type' => 'navbar', 'setFocus' => false)); $form->addSelectBoxForCategories('cat_id', $gL10n->get('DAT_CALENDAR'), $gDb, 'DAT', 'FILTER_CATEGORIES', array('defaultValue' => $dates->getParameter('cat_id'))); $form->addInput('date_from', $gL10n->get('SYS_START'), $dates->getParameter('dateStartFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addInput('date_to', $gL10n->get('SYS_END'), $dates->getParameter('dateEndFormatAdmidio'), array('type' => 'date', 'maxLength' => 10)); $form->addSubmitButton('btn_send', $gL10n->get('SYS_OK')); $FilterNavbar->addForm($form->show(false)); $page->addHtml($FilterNavbar->show(false)); } if ($datesTotalCount == 0) { // No events found if ($getId > 0) { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRY') . '</p>'); } else { $page->addHtml('<p>' . $gL10n->get('SYS_NO_ENTRIES') . '</p>'); } } else { // Output table header for compact view if ($getViewMode === 'compact') {
</div> <div class="panel panel-default" id="panel_links"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion_modules" href="#collapse_links"> <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/weblinks.png" alt="' . $gL10n->get('LNK_WEBLINKS') . '" />' . $gL10n->get('LNK_WEBLINKS') . ' </a> </h4> </div> <div id="collapse_links" class="panel-collapse collapse"> <div class="panel-body">'); // show form $form = new HtmlForm('links_preferences_form', $g_root_path . '/adm_program/modules/preferences/preferences_function.php?form=links', $page, array('class' => 'form-preferences')); $selectBoxEntries = array('0' => $gL10n->get('SYS_DEACTIVATED'), '1' => $gL10n->get('SYS_ACTIVATED'), '2' => $gL10n->get('ORG_ONLY_FOR_REGISTERED_USER')); $form->addSelectBox('enable_weblinks_module', $gL10n->get('ORG_ACCESS_TO_MODULE'), $selectBoxEntries, array('defaultValue' => $form_values['enable_weblinks_module'], 'showContextDependentFirstEntry' => false, 'helpTextIdInline' => 'ORG_ACCESS_TO_MODULE_DESC')); $form->addInput('weblinks_per_page', $gL10n->get('ORG_NUMBER_OF_ENTRIES_PER_PAGE'), $form_values['weblinks_per_page'], array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 9999, 'helpTextIdInline' => 'ORG_NUMBER_OF_ENTRIES_PER_PAGE_DESC')); $selectBoxEntries = array('_self' => $gL10n->get('LNK_SAME_WINDOW'), '_blank' => $gL10n->get('LNK_NEW_WINDOW')); $form->addSelectBox('weblinks_target', $gL10n->get('LNK_LINK_TARGET'), $selectBoxEntries, array('defaultValue' => $form_values['weblinks_target'], 'showContextDependentFirstEntry' => false, 'helpTextIdInline' => 'LNK_LINK_TARGET_DESC')); $form->addInput('weblinks_redirect_seconds', $gL10n->get('LNK_DISPLAY_REDIRECT'), $form_values['weblinks_redirect_seconds'], array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 9999, 'helpTextIdInline' => 'LNK_DISPLAY_REDIRECT_DESC')); $html = '<a class="btn" href="' . $g_root_path . '/adm_program/modules/categories/categories.php?type=LNK"><img src="' . THEME_PATH . '/icons/application_view_tile.png" alt="' . $gL10n->get('SYS_SWITCH_TO_CATEGORIES_ADMINISTRATION') . '" />' . $gL10n->get('SYS_SWITCH_TO_CATEGORIES_ADMINISTRATION') . '</a>'; $htmlDesc = $gL10n->get('DAT_MAINTAIN_CATEGORIES_DESC') . '<div class="alert alert-warning alert-small" role="alert"><span class="glyphicon glyphicon-warning-sign"></span>' . $gL10n->get('ORG_NOT_SAVED_SETTINGS_LOST') . '</div>'; $form->addCustomContent($gL10n->get('SYS_MAINTAIN_CATEGORIES'), $html, array('helpTextIdInline' => $htmlDesc)); $form->addSubmitButton('btn_save_links', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3')); $page->addHtml($form->show(false)); $page->addHtml('</div> </div> </div>'); /* <div class="panel panel-default" id="panel_inventory"> <div class="panel-heading">
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();
$("#admidio_modal").modal("hide"); }, 2000); } else { $("#password_form .form-alert").attr("class", "alert alert-danger form-alert"); $("#password_form .form-alert").fadeIn(); $("#password_form .form-alert").html("<span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"+data); } }); }); }); --></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">' . $gL10n->get('PRO_EDIT_PASSWORD') . '</h4> </div> <div class="modal-body">'; // show form $form = new HtmlForm('password_form', $g_root_path . '/adm_program/modules/profile/password.php?usr_id=' . $getUserId . '&mode=change'); if ($gCurrentUser->getValue('usr_id') == $getUserId) { // to change own password user must enter the valid old password for verification // TODO Future: 'minLength' => 8 $form->addInput('old_password', $gL10n->get('PRO_CURRENT_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED)); $form->addLine(); } $form->addInput('new_password', $gL10n->get('PRO_NEW_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8, 'helpTextIdInline' => 'PRO_PASSWORD_DESCRIPTION')); $form->addInput('new_password_confirm', $gL10n->get('SYS_REPEAT'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8)); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3')); $form->show(); echo '</div>'; }
$fieldType = 'date'; $maxlength = '10'; } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'EMAIL') { // email could not be longer than 254 characters $fieldType = 'email'; $maxlength = '254'; } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'URL') { // maximal browser compatible url length will be 2000 characters $maxlength = '2000'; } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'NUMBER') { $fieldType = 'number'; $maxlength = array(0, 9999999999, 1); } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'cat_name_intern') === 'SOCIAL_NETWORKS') { $maxlength = '255'; } else { $maxlength = '50'; } $form->addInput('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $inventory->getValue($field->getValue('inf_name_intern')), array('type' => $fieldType, 'maxlength' => $maxlength, 'property' => $fieldProperty, 'helpTextIdInline' => $helpId, 'class' => $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon'))); } } // div-Container admGroupBoxBody und admGroupBox schliessen $form->closeGroupBox(); $btn_image = 'disk.png'; $btn_text = $gL10n->get('SYS_SAVE'); $form->addSubmitButton('btn_save', $btn_text, array('icon' => THEME_PATH . '/icons/' . $btn_image)); if ($getNewItem == 0) { // show information about inventory who creates the recordset and changed it $form->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->addHtml($form->show(false)); $page->show();
// Create room object $room = new TableRooms($gDb); if ($getRoomId > 0) { $room->readDataById($getRoomId); } if (isset($_SESSION['rooms_request'])) { // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt // nun die vorher eingegebenen Inhalte ins Objekt schreiben $room->setArray($_SESSION['rooms_request']); unset($_SESSION['rooms_request']); } // create html page object $page = new HtmlPage($headline); // add back link to module menu $roomsMenu = $page->getMenu(); $roomsMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // show form $form = new HtmlForm('rooms_edit_form', $g_root_path . '/adm_program/modules/rooms/rooms_function.php?room_id=' . $getRoomId . '&mode=1', $page); $form->openGroupBox('gb_name_properties', $gL10n->get('SYS_NAME') . ' & ' . $gL10n->get('SYS_PROPERTIES')); $form->addInput('room_name', $gL10n->get('SYS_ROOM'), $room->getValue('room_name'), array('maxLength' => 100, 'property' => FIELD_REQUIRED)); $form->addInput('room_capacity', $gL10n->get('ROO_CAPACITY') . ' (' . $gL10n->get('ROO_SEATING') . ')', $room->getValue('room_capacity'), array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 99999, 'property' => FIELD_REQUIRED)); $form->addInput('room_overhang', $gL10n->get('ROO_OVERHANG'), $room->getValue('room_overhang'), array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 99999, 'helpTextIdLabel' => 'DAT_ROOM_OVERHANG')); $form->closeGroupBox(); $form->openGroupBox('gb_description', $gL10n->get('SYS_DESCRIPTION'), 'admidio-panel-editor'); $form->addEditor('room_description', null, $room->getValue('room_description'), array('height' => '150px')); $form->closeGroupBox(); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($room->getValue('room_usr_id_create'), $room->getValue('room_timestamp_create'), $room->getValue('dat_usr_id_change'), $room->getValue('room_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
if(msg_result) { $("#dates_edit_form").submit(); } } else { $("#dates_edit_form").submit(); } });', true); // add back link to module menu // @ptabaden: deleted icon $datesMenu = $page->getMenu(); $datesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), '<i class="fa fa-arrow-left" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_BACK') . '</div>', ''); // show form // @ptabaden: added h3 and changed "&" to "und" $form = new HtmlForm('dates_edit_form', $g_root_path . '/adm_program/modules/dates/dates_function.php?dat_id=' . $getDateId . '&mode=' . $mode, $page); $form->openGroupBox('gb_title_location', '<h3>' . $gL10n->get('SYS_TITLE') . ' und ' . $gL10n->get('DAT_LOCATION') . '</h3>'); $form->addInput('dat_headline', $gL10n->get('SYS_TITLE'), $date->getValue('dat_headline'), array('maxLength' => 100, 'property' => FIELD_REQUIRED)); // if a map link should be shown in the event then show help text and a field where the user could choose the country if ($gPreferences['dates_show_map_link'] == true) { $form->addInput('dat_location', $gL10n->get('DAT_LOCATION'), $date->getValue('dat_location'), array('maxLength' => 50, 'helpTextIdLabel' => 'DAT_LOCATION_LINK')); if (strlen($date->getValue('dat_country')) === 0 && $getDateId === 0) { $date->setValue('dat_country', $gPreferences['default_country']); } $form->addSelectBox('dat_country', $gL10n->get('SYS_COUNTRY'), $gL10n->getCountries(), array('defaultValue' => $date->getValue('dat_country', 'database'))); } else { $form->addInput('dat_location', $gL10n->get('DAT_LOCATION'), $date->getValue('dat_location'), array('maxLength' => 50)); } // if room selection is activated then show a selectbox with all rooms if ($gPreferences['dates_show_rooms'] == true) { if ($gDbType === 'mysql') { $sql = 'SELECT room_id, CONCAT(room_name, \' (\', room_capacity, \'+\', IFNULL(room_overhang, \'0\'), \')\') FROM ' . TBL_ROOMS . '
if ($form_values['new_description'] == null) { $form_values['new_description'] = $file->getValue('fil_description'); } } else { // get recordset of current folder from databses $folder = new TableFolder($gDb); $folder->getFolderForDownload($getFolderId); $originalName = $folder->getValue('fol_name'); if ($form_values['new_name'] == null) { $form_values['new_name'] = $originalName; } if ($form_values['new_description'] == null) { $form_values['new_description'] = $folder->getValue('fol_description'); } } } catch (AdmException $e) { $e->showHtml(); } // create html page object $page = new HtmlPage($headline); // add back link to module menu $downloadRenameMenu = $page->getMenu(); $downloadRenameMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // create html form $form = new HtmlForm('edit_download_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=4&folder_id=' . $getFolderId . '&file_id=' . $getFileId, $page); $form->addInput('previous_name', $gL10n->get('DOW_PREVIOUS_NAME'), $originalName, array('property' => FIELD_DISABLED)); $form->addInput('new_name', $gL10n->get('DOW_NEW_NAME'), $form_values['new_name'], array('maxLength' => 255, 'property' => FIELD_REQUIRED, 'helpTextIdLabel' => 'DOW_FILE_NAME_RULES')); $form->addMultilineTextInput('new_description', $gL10n->get('SYS_DESCRIPTION'), $form_values['new_description'], 4, array('maxLength' => 255)); $form->addSubmitButton('btn_rename', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3')); $page->addHtml($form->show(false)); $page->show();
$db = new Database(); // create new request validator $rq = new RequestValidator(); // get parameters $rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true); $rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true); $par = $rq->getParams(); $page->openBlock('div', 'iw-content'); $page->addInline('p', 'This tool generates a list of DEFAULTSORT keys that match the page title exactly.'); $page->addInline('h2', 'Options'); $optionForm = new HtmlForm('index.php', 'GET'); $optionForm->addHTML('<table class="iw-nostyle">'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('lang', 'Language'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('<tr><td>'); $optionForm->addLabel('project', 'Project'); $optionForm->addHTML('</td><td>'); $optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('<tr><td colspan="2">'); $optionForm->addButton('submit', 'View useless defaultsorts'); $optionForm->addHTML('</td></tr>'); $optionForm->addHTML('</table>'); $optionForm->output(); $page->closeBlock(); if ($rq->allRequiredDefined() == true) { $page->openBlock('div', 'iw-content'); $page->addInline('h2', 'Results');
} elseif ($getMode === 'html') { $datatable = true; $hoverRows = true; // create html page object $page = new HtmlPage(); if ($getFullScreen) { $page->hideThemeHtml(); } $page->setTitle($title); $page->setHeadline($headline); // Only for active members of a role if ($getShowMembers === 0) { // create filter menu with elements for start-/enddate $filterNavbar = new HtmlNavbar('menu_list_filter', null, null, 'filter'); $form = new HtmlForm('navbar_filter_form', $g_root_path . '/adm_program/modules/lists/lists_show.php', $page, array('type' => 'navbar', 'setFocus' => false)); $form->addInput('date_from', $gL10n->get('LST_ROLE_MEMBERSHIP_IN_PERIOD'), $dateFrom, array('type' => 'date', 'maxLength' => 10)); $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?" +
// create html page object $page = new HtmlPage($headline); // add back link to module menu $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')));
$formValues['orgaShortName'] = ''; $formValues['orgaLongName'] = ''; $formValues['orgaEmail'] = ''; } $headline = $gL10n->get('INS_ADD_ORGANIZATION'); // create html page object $page = new HtmlPage($headline); // add current url to navigation stack $gNavigation->addUrl(CURRENT_URL, $headline); // add back link to module menu $organizationNewMenu = $page->getMenu(); $organizationNewMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); $page->addHtml('<p class="lead">' . $gL10n->get('ORG_NEW_ORGANIZATION_DESC') . '</p>'); // show form $form = new HtmlForm('add_new_organization_form', $g_root_path . '/adm_program/modules/preferences/preferences_function.php?mode=3', $page); $form->addInput('orgaShortName', $gL10n->get('SYS_NAME_ABBREVIATION'), $formValues['orgaShortName'], array('maxLength' => 10, 'property' => FIELD_REQUIRED, 'class' => 'form-control-small')); $form->addInput('orgaLongName', $gL10n->get('SYS_NAME'), $formValues['orgaLongName'], array('maxLength' => 50, 'property' => FIELD_REQUIRED)); $form->addInput('orgaEmail', $gL10n->get('ORG_SYSTEM_MAIL_ADDRESS'), $formValues['orgaEmail'], array('type' => 'email', 'maxLength' => 50, 'property' => FIELD_REQUIRED)); $form->addSubmitButton('btn_foward', $gL10n->get('INS_SET_UP_ORGANIZATION'), array('icon' => THEME_PATH . '/icons/database_in.png', 'class' => ' col-sm-offset-3')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show(); break; case 3: /******************************************************/ /* Create basic data for new organization in database */ /******************************************************/ $_SESSION['add_organization_request'] = strStripSlashesDeep($_POST); // form fields are not filled if ($_POST['orgaShortName'] === '' || $_POST['orgaLongName'] === '') { $gMessage->show($gL10n->get('INS_ORGANIZATION_NAME_NOT_COMPLETELY'));
echo '<div class="btn-group-vertical" role="group">'; // show link for logout if ($plg_show_icons) { echo '<a id="adm_logout_link" class="btn" href="' . $g_root_path . '/adm_program/system/logout.php"><img src="' . THEME_PATH . '/icons/door_in.png" alt="' . $gL10n->get('SYS_LOGOUT') . '" />' . $gL10n->get('SYS_LOGOUT') . '</a>'; } else { echo '<a id="adm_logout_link" href="' . $g_root_path . '/adm_program/system/logout.php">' . $gL10n->get('SYS_LOGOUT') . '</a>'; } echo '</div>'; } else { // create and show the login form if ($plg_show_icons == 1) { $iconCode = THEME_PATH . '/icons/key.png'; } $form = new HtmlForm('plugin-login-form', $g_root_path . '/adm_program/system/login_check.php', null, array('type' => 'vertical', 'setFocus' => false, 'showRequiredFields' => false)); $form->addInput('plg_usr_login_name', $gL10n->get('SYS_USERNAME'), null, array('property' => FIELD_REQUIRED, 'maxLength' => 35)); // TODO Future: 'minLength' => 8 $form->addInput('plg_usr_password', $gL10n->get('SYS_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED)); // show selectbox with all organizations of database if ($gPreferences['system_organization_select'] == 1) { $sql = 'SELECT org_id, org_longname FROM ' . TBL_ORGANIZATIONS . ' ORDER BY org_longname ASC, org_shortname ASC'; $form->addSelectBoxFromSql('plg_org_id', $gL10n->get('SYS_ORGANIZATION'), $gDb, $sql, array('defaultValue' => $gCurrentOrganization->getValue('org_id'), 'showContextDependentFirstEntry' => false)); } if ($gPreferences['enable_auto_login'] == 1) { $form->addCheckbox('plg_auto_login', $gL10n->get('SYS_REMEMBER_ME'), '0'); } $form->addSubmitButton('next_page', $gL10n->get('SYS_LOGIN'), array('icon' => $iconCode)); $form->show(); echo '<div class="btn-group-vertical" role="group">';