当前位置: 首页>>代码示例>>PHP>>正文


PHP HtmlForm::addSelectBox方法代码示例

本文整理汇总了PHP中HtmlForm::addSelectBox方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::addSelectBox方法的具体用法?PHP HtmlForm::addSelectBox怎么用?PHP HtmlForm::addSelectBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HtmlForm的用法示例。


在下文中一共展示了HtmlForm::addSelectBox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: HtmlForm

        if ($getFullScreen) {
            $listsMenu->addItem('menu_item_normal_picture', $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=html&show_members=' . $getShowMembers . '&full_screen=false&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '', $gL10n->get('SYS_NORMAL_PICTURE'), 'arrow_in.png');
        } else {
            $listsMenu->addItem('menu_item_full_screen', $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&rol_ids=' . $getRoleIds . '&mode=html&show_members=' . $getShowMembers . '&full_screen=true&date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '', $gL10n->get('SYS_FULL_SCREEN'), 'arrow_out.png');
        }
        if ($numberRoles === 1) {
            // link to assign or remove members if you are allowed to do it
            if ($role->allowedToAssignMembers($gCurrentUser)) {
                $listsMenu->addItem('menu_item_assign_members', $g_root_path . '/adm_program/modules/lists/members_assignment.php?rol_id=' . $role->getValue('rol_id'), $gL10n->get('SYS_ASSIGN_MEMBERS'), 'add.png');
            }
        }
        // link to print overlay and exports
        $listsMenu->addItem('menu_item_print_view', '#', $gL10n->get('LST_PRINT_PREVIEW'), 'print.png');
        $form = new HtmlForm('navbar_export_to_form', '', $page, array('type' => 'navbar', 'setFocus' => false));
        $selectBoxEntries = array('' => $gL10n->get('LST_EXPORT_TO') . ' ...', 'csv-ms' => $gL10n->get('LST_MICROSOFT_EXCEL') . ' (' . $gL10n->get('SYS_ISO_8859_1') . ')', 'pdf' => $gL10n->get('SYS_PDF') . ' (' . $gL10n->get('SYS_PORTRAIT') . ')', 'pdfl' => $gL10n->get('SYS_PDF') . ' (' . $gL10n->get('SYS_LANDSCAPE') . ')', 'csv-oo' => $gL10n->get('SYS_CSV') . ' (' . $gL10n->get('SYS_UTF8') . ')');
        $form->addSelectBox('export_list_to', null, $selectBoxEntries, array('showContextDependentFirstEntry' => false));
        $listsMenu->addForm($form->show(false));
        $table = new HtmlTable('adm_lists_table', $page, $hoverRows, $datatable, $classTable);
        $table->setDatatablesRowsPerPage($gPreferences['lists_members_per_page']);
    } else {
        $table = new HtmlTable('adm_lists_table', $page, $hoverRows, $datatable, $classTable);
    }
}
// initialize array parameters for table and set the first column for the counter
if ($getMode === 'html') {
    // in html mode we group leaders. Therefore we need a special hidden column.
    $columnAlign = array('left', 'left');
    $columnValues = array($gL10n->get('SYS_ABR_NO'), $gL10n->get('INS_GROUPS'));
} else {
    $columnAlign = array('left');
    $columnValues = array($gL10n->get('SYS_ABR_NO'));
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:lists_show.php

示例2: HtmlForm

$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'));
$selectBoxEntries = array(0 => $gL10n->get('ROL_SYSTEM_DEFAULT_LIST'));
// SQL-Statement fuer alle Listenkonfigurationen vorbereiten, die angezeigt werdne sollen
$sql = 'SELECT lst_id, lst_name FROM ' . TBL_LISTS . '
         WHERE lst_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
           AND lst_global = 1
           AND lst_name IS NOT NULL
         ORDER BY lst_global ASC, lst_name ASC';
$pdoStatement = $gDb->query($sql);
while ($row = $pdoStatement->fetch()) {
    $selectBoxEntries[$row['lst_id']] = $row['lst_name'];
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:roles_new.php

示例3: HtmlForm

     $datesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
 }
 // get module menu
 $DatesMenu = $page->getMenu();
 // Add new event
 if ($gCurrentUser->editDates() && $getId === 0) {
     $DatesMenu->addItem('admMenuItemAdd', $g_root_path . '/adm_program/modules/dates/dates_new.php?headline=' . $getHeadline, $gL10n->get('SYS_CREATE_VAR', $getHeadline), 'add.png');
 }
 if ($getId === 0) {
     $form = new HtmlForm('navbar_change_view_form', '', $page, array('type' => 'navbar', 'setFocus' => false));
     if ($gPreferences['dates_show_rooms']) {
         $selectBoxEntries = array('detail' => $gL10n->get('DAT_VIEW_MODE_DETAIL'), 'compact' => $gL10n->get('DAT_VIEW_MODE_COMPACT'), 'room' => $gL10n->get('DAT_VIEW_MODE_COMPACT') . ' - ' . $gL10n->get('SYS_ROOM'), 'participants' => $gL10n->get('DAT_VIEW_MODE_COMPACT') . ' - ' . $gL10n->get('SYS_PARTICIPANTS'), 'description' => $gL10n->get('DAT_VIEW_MODE_COMPACT') . ' - ' . $gL10n->get('SYS_DESCRIPTION'));
     } else {
         $selectBoxEntries = array('detail' => $gL10n->get('DAT_VIEW_MODE_DETAIL'), 'compact' => $gL10n->get('DAT_VIEW_MODE_COMPACT'), 'participants' => $gL10n->get('DAT_VIEW_MODE_COMPACT') . ' - ' . $gL10n->get('SYS_PARTICIPANTS'), 'description' => $gL10n->get('DAT_VIEW_MODE_COMPACT') . ' - ' . $gL10n->get('SYS_DESCRIPTION'));
     }
     $form->addSelectBox('sel_change_view', $gL10n->get('SYS_VIEW'), $selectBoxEntries, array('defaultValue' => $getView, 'showContextDependentFirstEntry' => false));
     $DatesMenu->addForm($form->show(false));
     // show print button
     $DatesMenu->addItem('menu_item_print_view', '#', $gL10n->get('LST_PRINT_PREVIEW'), 'print.png');
     if ($gPreferences['enable_dates_ical'] == 1 || $gCurrentUser->isWebmaster() || $gCurrentUser->editDates()) {
         $DatesMenu->addItem('menu_item_extras', null, $gL10n->get('SYS_MORE_FEATURES'), null, 'right');
     }
     // ical Download
     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
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:dates.php

示例4: HtmlForm

$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 . '&amp;photo_nr=' . $getPhotoNr . '&amp;max_width=' . $gPreferences['photo_show_width'] . '&amp;max_height=' . $gPreferences['photo_show_height'] . '"><img
            src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&amp;photo_nr=' . $getPhotoNr . '&amp;max_width=' . $gPreferences['ecard_thumbs_scale'] . '&amp;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
$arrayMailRoles = $gCurrentUser->getAllMailRoles();
$sql = 'SELECT rol_id, rol_name
              FROM ' . TBL_ROLES . '
        INNER JOIN ' . TBL_CATEGORIES . '
                ON cat_id = rol_cat_id
             WHERE rol_id IN (' . implode(',', $arrayMailRoles) . ')
               AND cat_name_intern <> \'CONFIRMATION_OF_PARTICIPATION\'
          ORDER BY rol_name';
$statement = $gDb->query($sql);
while ($row = $statement->fetch()) {
    $list[] = array('groupID: ' . $row['rol_id'], $row['rol_name'], $gL10n->get('SYS_ROLES'));
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:ecards.php

示例5: ListConfiguration

        ++$numberLastConfigurations;
        // only 5 configurations without a name should be saved for each user
        if ($numberLastConfigurations > 5) {
            // delete all other configurations
            $del_list = new ListConfiguration($gDb, $configuration['lst_id']);
            $del_list->delete();
        } else {
            // now add configuration to array
            $configurationsArray[] = array($configuration['lst_id'], $objListTimestamp->format($gPreferences['system_date'] . ' ' . $gPreferences['system_time']), $actualGroup);
        }
    } else {
        // now add configuration to array
        $configurationsArray[] = array($configuration['lst_id'], $configuration['lst_name'], $actualGroup);
    }
}
$form->addSelectBox('sel_select_configuation', $gL10n->get('LST_SELECT_CONFIGURATION'), $configurationsArray, array('defaultValue' => $formValues['sel_select_configuation'], 'showContextDependentFirstEntry' => false));
// Webmasters could upgrade a configuration to a global configuration that is visible to all users
if ($gCurrentUser->isWebmaster()) {
    $form->addCheckbox('cbx_global_configuration', $gL10n->get('LST_CONFIGURATION_ALL_USERS'), $list->getValue('lst_global'), array('defaultValue' => $formValues['cbx_global_configuration'], 'helpTextIdLabel' => 'LST_PRESET_CONFIGURATION_DESC'));
}
$form->addDescription($gL10n->get('LST_ADD_COLUMNS_DESC'));
$form->addHtml('
    <div class="table-responsive">
    <table class="table table-condensed" id="mylist_fields_table">
        <thead>
            <tr>
                <th style="width: 20%;">' . $gL10n->get('SYS_ABR_NO') . '</th>
                <th style="width: 37%;">' . $gL10n->get('SYS_CONTENT') . '</th>
                <th style="width: 18%;">' . $gL10n->get('SYS_ORDER') . '</th>
                <th style="width: 25%;">' . $gL10n->get('SYS_CONDITION') . '
                    <a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal"
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:mylist.php

示例6: HtmlForm

                </div>
            </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">
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:preferences.php

示例7: array

        // Jede Rolle wird nun dem Array hinzugefuegt
        $parentRoleSet[] = array($row_roles->rol_id, $row_roles->rol_name, $row_roles->cat_name);
    }
} else {
    // create new array with numeric keys for logic of method addSelectBox
    $newParentRoleSet = array();
    foreach ($parentRoleSet as $role) {
        $newParentRoleSet[] = array($role['rol_id'], $role['rol_name'], null);
    }
    $parentRoleSet = $newParentRoleSet;
}
// get assigned roles of this folder
$roleSet = $folder->getRoleArrayOfFolder();
// if no roles are assigned then set "all users" as default
if (count($roleSet) === 0) {
    $roleSet[] = 0;
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
// @ptabaden: Changed Icon
$folderConfigMenu = $page->getMenu();
$folderConfigMenu->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_ROLE_ACCESS_PERMISSIONS_DESC', $folder->getValue('fol_name')) . '</p>');
// show form
$form = new HtmlForm('folder_rights_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=7&amp;folder_id=' . $getFolderId, $page);
$form->addSelectBox('adm_allowed_roles', $gL10n->get('DAT_VISIBLE_TO'), $parentRoleSet, array('property' => FIELD_REQUIRED, 'defaultValue' => $roleSet, 'multiselect' => true));
$form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3'));
// add form to html page and show page
$page->addHtml($form->show(false));
$page->show();
开发者ID:sxwid,项目名称:admidio3.1_scoutversion,代码行数:31,代码来源:folder_config.php

示例8: HtmlForm

// 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 . '&amp;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 . '
                  ORDER BY room_name';
    } else {
        $sql = 'SELECT room_id, room_name || \' (\' || room_capacity || \'+\' || COALESCE(room_overhang, \'0\') || \')\'
                      FROM ' . TBL_ROOMS . '
                  ORDER BY room_name';
    }
    $form->addSelectBoxFromSql('dat_room_id', $gL10n->get('SYS_ROOM'), $gDb, $sql, array('defaultValue' => $date->getValue('dat_room_id')));
开发者ID:sxwid,项目名称:admidio3.1_scoutversion,代码行数:31,代码来源:dates_new.php

示例9: array

}
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'));
asort($userFieldText);
if ($userField->getValue('usf_system') == 1) {
    // bei Systemfeldern darf der Datentyp nicht mehr veraendert werden
    $form->addInput('usf_type', $gL10n->get('ORG_DATATYPE'), $userFieldText[$userField->getValue('usf_type')], array('maxLength' => 30, 'property' => FIELD_DISABLED));
} else {
    // fuer jeden Feldtypen einen Eintrag in der Combobox anlegen
    $form->addSelectBox('usf_type', $gL10n->get('ORG_DATATYPE'), $userFieldText, array('property' => FIELD_REQUIRED, 'defaultValue' => $userField->getValue('usf_type')));
}
$form->addMultilineTextInput('usf_value_list', $gL10n->get('ORG_VALUE_LIST'), $userField->getValue('usf_value_list', 'database'), 6, array('property' => FIELD_REQUIRED, 'helpTextIdLabel' => 'ORG_VALUE_LIST_DESC'));
$form->addInput('usf_icon', $gL10n->get('SYS_ICON'), $userField->getValue('usf_icon', 'database'), array('maxLength' => 2000));
$form->addInput('usf_url', $gL10n->get('ORG_URL'), $userField->getValue('usf_url'), array('maxLength' => 2000, 'helpTextIdLabel' => 'ORG_FIELD_URL_DESC'));
$form->closeGroupBox();
$form->openGroupBox('gb_authorization', $gL10n->get('SYS_AUTHORIZATION'));
$form->addCheckbox('usf_hidden', $gL10n->get('ORG_FIELD_NOT_HIDDEN'), $userField->getValue('usf_hidden'), array('helpTextIdLabel' => 'ORG_FIELD_HIDDEN_DESC', 'icon' => 'eye.png'));
$form->addCheckbox('usf_disabled', $gL10n->get('ORG_FIELD_DISABLED', $gL10n->get('ROL_RIGHT_EDIT_USER')), $userField->getValue('usf_disabled'), array('helpTextIdLabel' => 'ORG_FIELD_DISABLED_DESC', 'icon' => 'textfield_key.png'));
if ($userField->getValue('usf_name_intern') === 'LAST_NAME' || $userField->getValue('usf_name_intern') === 'FIRST_NAME') {
    $form->addCheckbox('usf_mandatory', $gL10n->get('ORG_FIELD_REQUIRED'), $userField->getValue('usf_mandatory'), array('property' => FIELD_DISABLED, 'helpTextIdLabel' => 'ORG_FIELD_REQUIRED_DESC', 'icon' => 'asterisk_yellow.png'));
} else {
    $form->addCheckbox('usf_mandatory', $gL10n->get('ORG_FIELD_REQUIRED'), $userField->getValue('usf_mandatory'), array('helpTextIdLabel' => 'ORG_FIELD_REQUIRED_DESC', 'icon' => 'asterisk_yellow.png'));
}
$form->closeGroupBox();
$form->openGroupBox('gb_description', $gL10n->get('SYS_DESCRIPTION'), 'admidio-panel-editor');
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:fields_new.php

示例10: HtmlPage

} 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 . '
         WHERE rol_valid   = 1
           AND rol_visible = 1
           AND rol_cat_id  = cat_id
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:import.php

示例11: CONCAT

     // set array with values and set default value
     if ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name_intern') === 'ROOM_ID') {
         if ($gDbType === 'mysql') {
             $sql = 'SELECT room_id, CONCAT(room_name, \' (\', room_capacity, \'+\', IFNULL(room_overhang, \'0\'), \')\') FROM ' . TBL_ROOMS . ' ORDER BY room_name';
         } else {
             $sql = 'SELECT room_id, room_name || \' (\' || room_capacity || \'+\' || COALESCE(room_overhang, \'0\') || \')\' FROM ' . TBL_ROOMS . ' ORDER BY room_name';
         }
         $defaultValue = '';
         if ($getNewItem == 0) {
             $defaultValue = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id');
         }
         $form->addSelectBoxFromSql('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $gDb, $sql, array('property' => $fieldProperty, 'showContextDependentFirstEntry' => true, 'defaultValue' => $defaultValue));
     } else {
         $arrListValues = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_value_list');
         $defaultValue = $inventory->getValue($field->getValue('inf_name_intern'), 'database');
         $form->addSelectBox('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $arrListValues, $fieldProperty, $defaultValue, true, $helpId, null, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
     }
 } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'RADIO_BUTTON') {
     $arrListValues = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_value_list');
     $showDummyRadioButton = false;
     if ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_mandatory') == 0) {
         $showDummyRadioButton = true;
     }
     $form->addRadioButton('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $arrListValues, $fieldProperty, $inventory->getValue($field->getValue('inf_name_intern'), 'database'), $showDummyRadioButton, $helpId, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
 } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'TEXT_BIG') {
     $form->addMultilineTextInput('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')), 3, 4000, $fieldProperty, $helpId, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
 } else {
     $fieldType = 'text';
     if ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'DATE') {
         $fieldType = 'date';
         $maxlength = '10';
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:item_new.php

示例12: array

     $form->addCheckbox('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $user->getValue($field->getValue('usf_name_intern')), array('property' => $fieldProperty, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'DROPDOWN' || $field->getValue('usf_name_intern') === 'COUNTRY') {
     // set array with values and set default value
     if ($field->getValue('usf_name_intern') === 'COUNTRY') {
         $arrListValues = $gL10n->getCountries();
         $defaultValue = null;
         if ($user->getValue('usr_id') == 0 && strlen($gPreferences['default_country']) > 0) {
             $defaultValue = $gPreferences['default_country'];
         } elseif ($user->getValue('usr_id') > 0 && strlen($user->getValue($field->getValue('usf_name_intern'))) > 0) {
             $defaultValue = $user->getValue($field->getValue('usf_name_intern'), 'database');
         }
     } else {
         $arrListValues = $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_value_list');
         $defaultValue = $user->getValue($field->getValue('usf_name_intern'), 'database');
     }
     $form->addSelectBox('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $arrListValues, array('property' => $fieldProperty, 'defaultValue' => $defaultValue, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'RADIO_BUTTON') {
     $arrListValues = $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_value_list');
     $showDummyRadioButton = false;
     if ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_mandatory') == 0) {
         $showDummyRadioButton = true;
     }
     $form->addRadioButton('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $arrListValues, array('property' => $fieldProperty, 'defaultValue' => $user->getValue($field->getValue('usf_name_intern'), 'database'), 'showNoValueButton' => $showDummyRadioButton, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'TEXT_BIG') {
     $form->addMultilineTextInput('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $user->getValue($field->getValue('usf_name_intern')), 3, array('maxLength' => 4000, 'property' => $fieldProperty, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } else {
     $fieldType = 'text';
     if ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'DATE') {
         if ($field->getValue('usf_name_intern') === 'BIRTHDAY') {
             $fieldType = 'birthday';
         } else {
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:profile_new.php

示例13: HtmlForm

 }
 // edit roles of you are allowed to assign roles
 if ($gCurrentUser->manageRoles()) {
     $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);
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:lists.php

示例14: subfolder

        // add entry to array of all photo albums
        $photoAlbumsArray[$parentPhotoAlbum->getValue('pho_id')] = $vorschub . '&#151; ' . $parentPhotoAlbum->getValue('pho_name') . '&nbsp(' . $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 . '&amp;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();
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:photo_album_new.php

示例15: while

 } else {
     $recept_number = 1;
     // list all roles where guests could send mails to
     $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']);
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:messages_write.php


注:本文中的HtmlForm::addSelectBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。