本文整理汇总了PHP中HtmlForm::addInput方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::addInput方法的具体用法?PHP HtmlForm::addInput怎么用?PHP HtmlForm::addInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlForm
的用法示例。
在下文中一共展示了HtmlForm::addInput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlPage
$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
示例2: elseif
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>');
}
示例3: HtmlPage
}
// 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();
示例4: HtmlForm
$("#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();
示例5: markRoleRight
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'));
示例6: setValueList
} 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'));
示例7: strStripSlashesDeep
$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();
示例8: unset
}
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'));
}
示例9: elseif
}
$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.
示例10: getRoleMemberships
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>';
//.........这里部分代码省略.........
示例11: setTimeout
$("#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>';
示例12: subfolder
// 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();
示例13: HtmlForm
// 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)');
示例14: while
$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'));
示例15: HtmlPage
// 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');