// 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();
// checked - true destRight wird auf checked gesetzt // false destRight wird auf unchecked gesetzt 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'))));
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(); $form->openGroupBox('gb_contact_details', $gL10n->get('SYS_CONTACT_DETAILS')); // create list with all possible recipients // list all roles where login users could send mails to
addColumn(); } });', true); // get module menu $myListMenu = $page->getMenu(); // show link to system preferences of roles if ($gCurrentUser->isWebmaster()) { $myListMenu->addItem('admMenuItemPreferencesLists', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=lists', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right'); } // if mylist was not called directly then show link to navigate to previous page if ($gNavigation->count() > 1) { $myListMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); } // show form $form = new HtmlForm('mylist_configuration_form', $g_root_path . '/adm_program/modules/lists/mylist_prepare.php', $page); $form->openGroupBox('gb_configuration_list', $gL10n->get('LST_CONFIGURATION_LIST')); // read all relevant configurations from database and create an array $yourLastConfigurationsGroup = false; $yourConfigurationsGroup = false; $presetConfigurationsGroup = false; $actualGroup = ''; $configurationsArray[] = array(0, $gL10n->get('LST_CREATE_NEW_CONFIGURATION'), null); $numberLastConfigurations = 0; $sql = 'SELECT lst_id, lst_name, lst_global, lst_timestamp FROM ' . TBL_LISTS . ' WHERE lst_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' AND ( lst_usr_id = ' . $gCurrentUser->getValue('usr_id') . ' OR lst_global = 1) ORDER BY lst_global ASC, lst_name ASC, lst_timestamp DESC '; $configurationsStatement = $gDb->query($sql); $configurations = $configurationsStatement->fetchAll(); foreach ($configurations as $configuration) {
$guestbookCreateMenu = $page->getMenu(); $guestbookCreateMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png'); // Html des Modules ausgeben if ($getGboId > 0) { $mode = '3'; } else { $mode = '1'; } // show form $form = new HtmlForm('guestbook_edit_form', $g_root_path . '/adm_program/modules/guestbook/guestbook_function.php?id=' . $getGboId . '&headline=' . $getHeadline . '&mode=' . $mode, $page); if ($gCurrentUser->getValue('usr_id') > 0) { // registered users should not change their name $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_DISABLED)); } else { $form->addInput('gbo_name', $gL10n->get('SYS_NAME'), $guestbook->getValue('gbo_name'), array('maxLength' => 60, 'property' => FIELD_REQUIRED)); } $form->addInput('gbo_email', $gL10n->get('SYS_EMAIL'), $guestbook->getValue('gbo_email'), array('type' => 'email', 'maxLength' => 254)); $form->addInput('gbo_homepage', $gL10n->get('SYS_WEBSITE'), $guestbook->getValue('gbo_homepage'), array('maxLength' => 50)); $form->addEditor('gbo_text', $gL10n->get('SYS_MESSAGE'), $guestbook->getValue('gbo_text'), array('property' => FIELD_REQUIRED, 'toolbar' => 'AdmidioGuestbook')); // if captchas are enabled then visitors of the website must resolve this if (!$gValidLogin && $gPreferences['enable_mail_captcha'] == 1) { $form->openGroupBox('gb_confirmation_of_entry', $gL10n->get('SYS_CONFIRMATION_OF_INPUT')); $form->addCaptcha('captcha', $gPreferences['captcha_type']); $form->closeGroupBox(); } // show information about user who creates the recordset and changed it $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); $form->addHtml(admFuncShowCreateChangeInfoById($guestbook->getValue('gbo_usr_id_create'), $guestbook->getValue('gbo_timestamp_create'), $guestbook->getValue('gbo_usr_id_change'), $guestbook->getValue('gbo_timestamp_change'))); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();
$("#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 { $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();
var msg_result = confirm("' . $gL10n->get('DAT_REMOVE_APPLICATION') . '"); 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\'), \')\')
$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 !== '') { // div-Container admGroupBoxBody und admGroupBox schliessen $form->closeGroupBox(); } $category = $field->getValue('cat_name'); $form->addHtml('<a name="cat-' . $field->getValue('cat_id') . '"></a>'); $form->openGroupBox('gb_category_name', $field->getValue('cat_name')); if ($field->getValue('cat_name_intern') === 'MASTER_DATA') { if ($getItemId > 0) { // add inventoryname to form $fieldProperty = FIELD_DEFAULT; $fieldHelpId = null; if (!$gCurrentUser->isWebmaster() && $getNewItem == 0) { $fieldProperty = FIELD_DISABLED; } elseif ($getNewItem > 0) { $fieldProperty = FIELD_REQUIRED; $fieldHelpId = 'PRO_inventoryNAME_DESCRIPTION'; } $form->addLine(); } } }
$showField = true; } elseif ($getNewUser !== 2 && ($getUserId == $gCurrentUser->getValue('usr_id') || $gCurrentUser->hasRightEditProfile($user))) { // bei fremden Profilen duerfen versteckte Felder nur berechtigten Personen angezeigt werden // Leiter duerfen dies nicht !!! $showField = true; } // Kategorienwechsel den Kategorienheader anzeigen // bei schneller Registrierung duerfen nur die Pflichtfelder ausgegeben werden if ($category != $field->getValue('cat_name') && $showField) { if ($category !== '') { // div-Container admGroupBoxBody und admGroupBox schliessen $form->closeGroupBox(); } $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_values['name'] = ''; $form_values['mailfrom'] = ''; $form_values['subject'] = $getSubject; $form_values['msg_body'] = ''; $form_values['msg_to'] = 0; $form_values['carbon_copy'] = $getCarbonCopy; $form_values['delivery_confirmation'] = $getDeliveryConfirmation; } $formParam = ''; // if subject was set as param then send this subject to next script if ($getSubject !== '') { $formParam .= 'subject=' . $getSubject . '&'; } // show form $form = new HtmlForm('mail_send_form', $g_root_path . '/adm_program/modules/messages/messages_send.php?' . $formParam, $page, array('enableFileUpload' => true)); $form->openGroupBox('gb_mail_contact_details', $gL10n->get('SYS_CONTACT_DETAILS')); if ($getUserId > 0) { // usr_id wurde uebergeben, dann E-Mail direkt an den User schreiben $preload_data = '{ id: "' . $getUserId . '", text: "' . $userEmail . '", locked: true}'; } elseif ($getRoleId > 0) { // Rolle wurde uebergeben, dann E-Mails nur an diese Rolle schreiben $preload_data = '{ id: "groupID: ' . $getRoleId . '", text: "' . $rollenName . '", locked: true}'; $list[] = array('groupID: ' . $getRoleId, $rollenName, ''); } // keine Uebergabe, dann alle Rollen entsprechend Login/Logout auflisten if ($gValidLogin) { // alle Rollen auflisten, // an die im eingeloggten Zustand Mails versendet werden duerfen $sql = 'SELECT rol_id, rol_name, cat_name, (SELECT COUNT(1) FROM ' . TBL_MEMBERS . '
} } $htmlRoleSelection .= ' </select> </div> <div class="col-sm-2" style="text-align: center;"> <br /><br /><br /> <a class="admidio-icon-link" href="javascript:removeRoles()"><img src="' . THEME_PATH . '/icons/back.png" alt="' . $gL10n->get('SYS_REMOVE_ROLE') . '" title="' . $gL10n->get('SYS_REMOVE_ROLE') . '" /></a> <a class="admidio-icon-link" href="javascript:addRoles()"><img src="' . THEME_PATH . '/icons/forward.png" alt="' . $gL10n->get('SYS_ADD_ROLE') . '" title="' . $gL10n->get('SYS_ADD_ROLE') . '" /></a> </div> <div class="col-sm-5 form-group"> <label for="adm_allowed_roles"><img class="admidio-icon-info" src="' . THEME_PATH . '/icons/ok.png" alt="' . $gL10n->get('DOW_ACCESS_ALLOWED') . '" title="' . $gL10n->get('DOW_ACCESS_ALLOWED') . '" />' . $gL10n->get('DOW_ACCESS_ALLOWED') . '</label> <select id="adm_allowed_roles" name="AllowedRoles[]" class="form-control" multiple="multiple" size="8" style="max-width: 300px;">'; for ($i = 0; $i < count($roleSet); $i++) { $nextRole = $roleSet[$i]; $htmlRoleSelection .= '<option value="' . $nextRole['rol_id'] . '">' . $nextRole['rol_name'] . '</option>'; } $htmlRoleSelection .= ' </select> </div>'; $form->addCheckbox('fol_public', $gL10n->get('DOW_NO_PUBLIC_ACCESS'), $checkboxValue, array('property' => $fieldMode, 'helpTextIdLabel' => 'DOW_PUBLIC_DOWNLOAD_FLAG', 'icon' => THEME_PATH . '/icons/lock.png')); $form->openGroupBox('adm_roles_box', $gL10n->get('DOW_ROLE_ACCESS_PERMISSIONS')); $form->addDescription($gL10n->get('DOW_ROLE_ACCESS_PERMISSIONS_DESC')); $form->addCustomContent(null, $htmlRoleSelection); $form->closeGroupBox(); $form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png')); // add form to html page and show page $page->addHtml($form->show(false)); $page->show();