本文整理汇总了PHP中HtmlForm::addStaticControl方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::addStaticControl方法的具体用法?PHP HtmlForm::addStaticControl怎么用?PHP HtmlForm::addStaticControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlForm
的用法示例。
在下文中一共展示了HtmlForm::addStaticControl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlForm
if ($category != $field->getValue('cat_name') && (strlen($inventory->getValue($field->getValue('inf_name_intern'))) > 0 || $field->getValue('inf_type') === 'CHECKBOX')) {
if ($category !== '') {
// new category then show last form and close div container
$page->addHtml($form->show(false));
$page->addHtml('</div></div>');
}
$category = $field->getValue('cat_name');
$page->addHtml('
<div class="panel panel-default" id="' . $field->getValue('cat_name') . '_data_panel">
<div class="panel-heading">' . $field->getValue('cat_name') . '</div>
<div class="panel-body">');
// create a static form
$form = new HtmlForm('profile_user_data_form', null);
}
// show html of field, if user has a value for that field or it's a checkbox field
if (strlen($inventory->getValue($field->getValue('inf_name_intern'))) > 0 || $field->getValue('inf_type') === 'CHECKBOX') {
$field = getFieldCode($field->getValue('inf_name_intern'), $inventory);
if (strlen($field['value']) > 0) {
$form->addStaticControl('address', $field['label'], $field['value']);
}
}
}
}
if ($category !== '') {
// new category then show last form and close div container
$page->addHtml($form->show(false));
$page->addHtml('</div></div>');
}
// show information about user who creates the recordset and changed it
$page->addHtml(admFuncShowCreateChangeInfoById($inventory->getValue('inv_usr_id_create'), $inventory->getValue('inv_timestamp_create'), $inventory->getValue('inv_usr_id_change'), $inventory->getValue('inv_timestamp_change')));
$page->show();
示例2: unlink
ignore_user_abort(true);
unlink(SERVER_PATH . '/adm_my_files/' . $filename);
} elseif ($getMode === 'html' || $getMode === 'print') {
// add table list to the page
$page->addHtml($table->show(false));
// create a infobox for the role
if ($getMode === 'html' && $numberRoles === 1) {
$htmlBox = '';
// only show infobox if additional role information fields are filled
if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_date')) > 0 || strlen($role->getValue('rol_start_time')) > 0 || strlen($role->getValue('rol_location')) > 0 || strlen($role->getValue('rol_cost')) > 0 || strlen($role->getValue('rol_max_members')) > 0) {
$htmlBox = '
<div class="panel panel-default" id="adm_lists_infobox">
<div class="panel-heading">' . $gL10n->get('LST_INFOBOX') . ': ' . $role->getValue('rol_name') . '</div>
<div class="panel-body">';
$form = new HtmlForm('list_infobox_items', null);
$form->addStaticControl('infobox_category', $gL10n->get('SYS_CATEGORY'), $role->getValue('cat_name'));
// Description
if (strlen($role->getValue('rol_description')) > 0) {
$form->addStaticControl('infobox_description', $gL10n->get('SYS_DESCRIPTION'), $role->getValue('rol_description'));
}
// Period
if (strlen($role->getValue('rol_start_date')) > 0) {
$form->addStaticControl('infobox_period', $gL10n->get('SYS_PERIOD'), $gL10n->get('SYS_DATE_FROM_TO', $role->getValue('rol_start_date', $gPreferences['system_date']), $role->getValue('rol_end_date', $gPreferences['system_date'])));
}
// Event
if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_time')) > 0) {
if ($role->getValue('rol_weekday') > 0) {
$value = DateTimeExtended::getWeekdays($role->getValue('rol_weekday')) . ' ';
}
if (strlen($role->getValue('rol_start_time')) > 0) {
$value = $gL10n->get('LST_FROM_TO', $role->getValue('rol_start_time', $gPreferences['system_time']), $role->getValue('rol_end_time', $gPreferences['system_time']));
示例3: unset
// nun die vorher eingegebenen Inhalte ins Objekt schreiben
$form_values = $_SESSION['import_request'];
unset($_SESSION['import_request']);
} else {
$form_values['user_import_mode'] = 1;
$form_values['import_coding'] = 'iso-8859-1';
$form_values['import_role_id'] = 0;
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$importMenu = $page->getMenu();
$importMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('import_users_form', $g_root_path . '/adm_program/modules/members/import_function.php', $page, array('enableFileUpload' => true));
$form->addStaticControl('format', $gL10n->get('MEM_FORMAT'), 'CSV');
$form->addFileUpload('userfile', $gL10n->get('MEM_CHOOSE_FILE'), array('property' => FIELD_REQUIRED, 'allowedMimeTypes' => array('text/comma-separated-values')));
$selectBoxEntries = array('iso-8859-1' => $gL10n->get('SYS_ISO_8859_1'), 'utf-8' => $gL10n->get('SYS_UTF8'));
$form->addSelectBox('import_coding', $gL10n->get('MEM_CODING'), $selectBoxEntries, array('property' => FIELD_REQUIRED, 'defaultValue' => $form_values['import_coding']));
// add a selectbox to the form where the user can choose a role from all roles he could see
// first read all relevant roles from database and create an array with them
$condition = '';
if (!$gCurrentUser->manageRoles()) {
// keine Rollen mit Rollenzuordnungsrecht anzeigen
$condition .= ' AND rol_assign_roles = 0 ';
}
if (!$gCurrentUser->isWebmaster()) {
// Webmasterrolle nicht anzeigen
$condition .= ' AND rol_webmaster = 0 ';
}
$sql = 'SELECT * FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
示例4: HtmlForm
<a data-toggle="collapse" data-parent="#accordion_common" href="#collapse_system_informations">
<img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/info.png" alt="' . $gL10n->get('ORG_SYSTEM_INFOS') . '" />' . $gL10n->get('ORG_SYSTEM_INFOS') . '
</a>
</h4>
</div>
<div id="collapse_system_informations" class="panel-collapse collapse">
<div class="panel-body">');
// create a static form
$form = new HtmlForm('system_informations_preferences_form', null, $page);
$html = '<span id="admidio_version_content">' . ADMIDIO_VERSION_TEXT . '
<a id="link_check_for_update" href="#link_check_for_update" title="' . $gL10n->get('SYS_CHECK_FOR_UPDATE') . '">' . $gL10n->get('SYS_CHECK_FOR_UPDATE') . '</a>
</span>';
$form->addCustomContent($gL10n->get('SYS_ADMIDIO_VERSION'), $html);
// if database version is different to file version, then show database version
if (strcmp(ADMIDIO_VERSION, $gSystemComponent->getValue('com_version')) != 0) {
$form->addStaticControl('database_version', $gL10n->get('ORG_DIFFERENT_DATABASE_VERSION'), $gSystemComponent->getValue('com_version'));
}
$form->addStaticControl('last_update_step', $gL10n->get('ORG_LAST_UPDATE_STEP'), $gSystemComponent->getValue('com_update_step'));
if (version_compare(phpversion(), MIN_PHP_VERSION) == -1) {
$html = '<span class="text-danger"><strong>' . phpversion() . '</strong></span> → ' . $gL10n->get('SYS_PHP_VERSION_REQUIRED', MIN_PHP_VERSION);
} else {
$html = '<span class="text-success"><strong>' . phpversion() . '</strong></span>';
}
$form->addCustomContent($gL10n->get('SYS_PHP_VERSION'), $html);
if (version_compare($gDb->getVersion(), $gDb->getMinVersion()) == -1) {
$html = '<span class="text-danger"><strong>' . $gDb->getVersion() . '</strong></span> → ' . $gL10n->get('SYS_DATABASE_VERSION_REQUIRED', $gDb->getMinVersion());
} else {
$html = '<span class="text-success"><strong>' . $gDb->getVersion() . '</strong></span>';
}
$form->addCustomContent($gDb->getName() . '-' . $gL10n->get('SYS_VERSION'), $html);
if (ini_get('safe_mode') == 1) {
示例5: HtmlForm
<div class="panel panel-default album-list">
<div class="panel-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6">
<a href="' . $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $childPhotoAlbum->getValue('pho_id') . '"><img
class="thumbnail" src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $shuffle_image['shuffle_pho_id'] . '&photo_nr=' . $shuffle_image['shuffle_img_nr'] . '&thumb=1" alt="' . $gL10n->get('PHO_PHOTOS') . '" /></a>
</div>
</div>
</div>
<div class="panel-heading album-list">
<div class="pull-left title"><h2>' . $albumTitle . '</h2></div>
<div class="pull-left album-date">');
$form = new HtmlForm('form_album_' . $childPhotoAlbum->getValue('pho_id'), null, $page, array('type' => 'vertical'));
$form->addStaticControl('pho_date', '', $albumDate);
$page->addHtml($form->show(false));
$page->addHtml('</div>
<div class="pull-left text-left edit-options">');
// check if download option is enabled
// @ptabaden: Changed Icons
if ($gPreferences['photo_download_enabled'] == 1 && $childPhotoAlbum->getValue('pho_quantity') > 0) {
$page->addHtml('
<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/photos/photo_download.php?pho_id=' . $childPhotoAlbum->getValue('pho_id') . '"><i class="fa fa-download" alt="' . $gL10n->get('PHO_DOWNLOAD_PHOTOS') . '" title="' . $gL10n->get('PHO_DOWNLOAD_PHOTOS') . '"></i></a>');
}
// if user has admin rights for photo module then show some functions
// @ptabaden: Changed Icons
if ($gCurrentUser->editPhotoRight()) {
$page->addHtml('
<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/photos/photo_album_new.php?pho_id=' . $childPhotoAlbum->getValue('pho_id') . '&mode=change"><i class="fa fa-pencil" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '"></i></a>
<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal"
示例6: HtmlForm
$page->addHtml('
<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/roles/roles_new.php?rol_id=' . $role->getValue('rol_id') . '"><img
src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('ROL_EDIT_ROLE') . '" title="' . $gL10n->get('ROL_EDIT_ROLE') . '" /></a>');
}
$page->addHtml('</div>
</div>
<div id="collapse_' . $role->getValue('rol_id') . '" class="panel-collapse collapse">
<div class="panel-body" id="admRoleDetails' . $role->getValue('rol_id') . '">');
// create a static form
$form = new HtmlForm('lists_static_form', null);
// show combobox with lists if user is allowed to see members and the role has members
if ($row['num_members'] > 0 || $row['num_leader'] > 0) {
$form->addSelectBox('admSelectRoleList_' . $role->getValue('rol_id'), $gL10n->get('LST_SHOW_LIST'), $listConfigurations, array('firstEntry' => $gL10n->get('LST_CHOOSE_LIST')));
}
if (strlen($role->getValue('rol_description')) > 0) {
$form->addStaticControl('list_description', $gL10n->get('SYS_DESCRIPTION'), $role->getValue('rol_description'));
}
if (strlen($role->getValue('rol_start_date')) > 0) {
$form->addStaticControl('list_date_from_to', $gL10n->get('SYS_PERIOD'), $gL10n->get('SYS_DATE_FROM_TO', $role->getValue('rol_start_date', $gPreferences['system_date']), $role->getValue('rol_end_date', $gPreferences['system_date'])));
}
if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_time')) > 0) {
if ($role->getValue('rol_weekday') > 0) {
$html = DateTimeExtended::getWeekdays($role->getValue('rol_weekday')) . ' ';
}
if (strlen($role->getValue('rol_start_time')) > 0) {
$html = $gL10n->get('LST_FROM_TO', $role->getValue('rol_start_time', $gPreferences['system_time']), $role->getValue('rol_end_time', $gPreferences['system_time']));
}
$form->addStaticControl('list_date', $gL10n->get('DAT_DATE'), $html);
}
// Meeting point
if (strlen($role->getValue('rol_location')) > 0) {
示例7: HtmlForm
<a data-toggle="collapse" data-parent="#accordion_common" href="#collapse_system_informations">
<img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/info.png" alt="' . $gL10n->get('ORG_SYSTEM_INFORMATIONS') . '" />' . $gL10n->get('ORG_SYSTEM_INFORMATIONS') . '
</a>
</h4>
</div>
<div id="collapse_system_informations" class="panel-collapse collapse">
<div class="panel-body">');
// create a static form
$form = new HtmlForm('system_informations_preferences_form', null, $page);
$html = '<span id="admidio_version_content">' . ADMIDIO_VERSION_TEXT . '
<a id="link_check_for_update" href="#link_check_for_update" title="' . $gL10n->get('SYS_CHECK_FOR_UPDATE') . '">' . $gL10n->get('SYS_CHECK_FOR_UPDATE') . '</a>
</span>';
$form->addCustomContent($gL10n->get('SYS_ADMIDIO_VERSION'), $html);
// if database version is different to file version, then show database version
if (strcmp(ADMIDIO_VERSION, $gSystemComponent->getValue('com_version')) !== 0) {
$form->addStaticControl('admidio_database_version', $gL10n->get('ORG_DIFFERENT_DATABASE_VERSION'), $gSystemComponent->getValue('com_version'));
}
$form->addStaticControl('last_update_step', $gL10n->get('ORG_LAST_UPDATE_STEP'), $gSystemComponent->getValue('com_update_step'));
if (version_compare(phpversion(), MIN_PHP_VERSION) === -1) {
$html = '<span class="text-danger"><strong>' . phpversion() . '</strong></span> → ' . $gL10n->get('SYS_PHP_VERSION_REQUIRED', MIN_PHP_VERSION);
} else {
$html = '<span class="text-success"><strong>' . phpversion() . '</strong></span>';
}
$form->addStaticControl('php_version', $gL10n->get('SYS_PHP_VERSION'), $html);
if (version_compare($gDb->getVersion(), $gDb->getMinimumRequiredVersion()) == -1) {
$html = '<span class="text-danger"><strong>' . $gDb->getVersion() . '</strong></span> → ' . $gL10n->get('SYS_DATABASE_VERSION_REQUIRED', $gDb->getMinimumRequiredVersion());
} else {
$html = '<span class="text-success"><strong>' . $gDb->getVersion() . '</strong></span>';
}
$form->addStaticControl('database_version', $gDb->getName() . '-' . $gL10n->get('SYS_VERSION'), $html);
if (ini_get('safe_mode') === '1') {
示例8: urlencode
src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('SYS_EDIT') . '" title="' . $gL10n->get('SYS_EDIT') . '" /></a>
<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal"
href="' . $g_root_path . '/adm_program/system/popup_message.php?type=pho_album&element_id=panel_pho_' . $childPhotoAlbum->getValue('pho_id') . '&name=' . urlencode($childPhotoAlbum->getValue('pho_name')) . '&database_id=' . $childPhotoAlbum->getValue('pho_id') . '"><img
src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('SYS_DELETE') . '" title="' . $gL10n->get('SYS_DELETE') . '" /></a>');
}
$page->addHtml('</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6">
<a href="' . $g_root_path . '/adm_program/modules/photos/photos.php?pho_id=' . $childPhotoAlbum->getValue('pho_id') . '"><img
class="thumbnail" src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $shuffle_image['shuffle_pho_id'] . '&photo_nr=' . $shuffle_image['shuffle_img_nr'] . '&thumb=1" alt="' . $gL10n->get('PHO_PHOTOS') . '" /></a>
</div>
<div class="col-xs-12 col-sm-12 col-md-6">');
$form = new HtmlForm('form_album_' . $childPhotoAlbum->getValue('pho_id'), null, $page, array('type' => 'vertical'));
$form->addStaticControl('pho_date', $gL10n->get('SYS_DATE'), $albumDate);
$form->addStaticControl('pho_count', $gL10n->get('SYS_PHOTOS'), $childPhotoAlbum->countImages());
if (strlen($childPhotoAlbum->getValue('pho_photographers')) > 0) {
$form->addStaticControl('pho_photographer', $gL10n->get('PHO_PHOTOGRAPHER'), $childPhotoAlbum->getValue('pho_photographers'));
}
$page->addHtml($form->show(false));
$page->addHtml('</div>
</div>');
// Notice for users with foto edit rights that the folder of the album doesn't exists
if (file_exists($ordner) == false && $childPhotoAlbum->hasChildAlbums() == false && $gCurrentUser->editPhotoRight()) {
$page->addHtml('<div class="alert alert-warning alert-small" role="alert"><span class="glyphicon glyphicon-warning-sign"></span>' . $gL10n->get('PHO_FOLDER_NOT_FOUND') . '</div>');
}
// Notice for users with foto edit right that this album is locked
if ($adm_photo_list['pho_locked'] == 1 && file_exists($ordner)) {
$page->addHtml('<div class="alert alert-warning alert-small" role="alert"><span class="glyphicon glyphicon-warning-sign"></span>' . $gL10n->get('PHO_ALBUM_NOT_APPROVED') . '</div>');
}
示例9: next
$currentUserRankTitle = $rankTitle;
}
$rankTitle = next($plg_rank);
}
if ($currentUserRankTitle !== '') {
$htmlUserRank = ' (' . $currentUserRankTitle . ')';
}
}
if ($gCurrentUser->getValue('usr_last_login') === '') {
$lastLogin = '---';
} else {
$lastLogin = $gCurrentUser->getValue('usr_last_login');
}
// create a static form
$form = new HtmlForm('plugin-login-static-form', null, null, array('type' => 'vertical', 'setFocus' => false));
$form->addStaticControl('plg_user', $gL10n->get('SYS_MEMBER'), '<a href="' . $g_root_path . '/adm_program/modules/profile/profile.php?user_id=' . $gCurrentUser->getValue('usr_id') . '"
' . $plg_link_target . ' title="' . $gL10n->get('SYS_SHOW_PROFILE') . '">' . $gCurrentUser->getValue('FIRST_NAME') . ' ' . $gCurrentUser->getValue('LAST_NAME') . '</a>');
$form->addStaticControl('plg_active_since', $gL10n->get('PLG_LOGIN_ACTIVE_SINCE'), $gCurrentSession->getValue('ses_begin', $gPreferences['system_time']) . ' ' . $gL10n->get('SYS_CLOCK'));
$form->addStaticControl('plg_last_login', $gL10n->get('PLG_LOGIN_LAST_LOGIN'), $lastLogin);
$form->addStaticControl('plg_number_of_logins', $gL10n->get('PLG_LOGIN_NUMBER_OF_LOGINS'), $gCurrentUser->getValue('usr_number_login') . $htmlUserRank);
$form->show();
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