• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP options_for_select函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中options_for_select函数的典型用法代码示例。如果您正苦于以下问题:PHP options_for_select函数的具体用法?PHP options_for_select怎么用?PHP options_for_select使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: enum_values_select_tag

/**
* Determines the possible index/value pairs for the given table/field from their
* Peer objects. Sets the selected index to the value in $selected. Returns the
* HTML for a <select> field accordingly.
*/
function enum_values_select_tag($table, $field, $selected = null)
{
    //Load the options
    $options = call_user_func(array($table . 'Peer', 'get' . $field . 's'));
    //Return the select area
    return select_tag(strtolower($table) . '[' . strtolower($field) . ']', options_for_select($options, $selected), array('style' => 'width: 125px'));
}
开发者ID:rayku,项目名称:rayku,代码行数:12,代码来源:EnumHelper.php


示例2: adv_options_for_select

/**
 * Override of the standard options_for_select, that allows the usage of the 'include_zero_custom' option
 * to insert a custom field returning the 0 value on top of the options
 *
 * @return String
 * @author Guglielmo Celata
 **/
function adv_options_for_select($options = array(), $selected = '', $html_options = array())
{
    $html_options = _parse_attributes($html_options);
    if (is_array($selected)) {
        $selected = array_map('strval', array_values($selected));
    }
    $html = '';
    if ($value = _get_option($html_options, 'include_zero_custom')) {
        $html .= content_tag('option', $value, array('value' => '0')) . "\n";
    } else {
        if ($value = _get_option($html_options, 'include_custom')) {
            $html .= content_tag('option', $value, array('value' => '')) . "\n";
        } else {
            if (_get_option($html_options, 'include_blank')) {
                $html .= content_tag('option', '', array('value' => '')) . "\n";
            }
        }
    }
    foreach ($options as $key => $value) {
        if (is_array($value)) {
            $html .= content_tag('optgroup', options_for_select($value, $selected, $html_options), array('label' => $key)) . "\n";
        } else {
            $option_options = array('value' => $key);
            if (is_array($selected) && in_array(strval($key), $selected, true) || strval($key) == strval($selected)) {
                $option_options['selected'] = 'selected';
            }
            $html .= content_tag('option', $value, $option_options) . "\n";
        }
    }
    return $html;
}
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:38,代码来源:AdvancedOptionsForSelectHelper.php


示例3: object_enum_tag

function object_enum_tag($object, $method, $options)
{
    $enumValues = _get_option($options, 'enumValues', array());
    $currentValue = _get_object_value($object, $method);
    $enumValues = array_combine($enumValues, $enumValues);
    return select_tag(_convert_method_to_name($method, $options), options_for_select($enumValues, $currentValue), $options);
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:7,代码来源:ObjectDoctrineAdminHelper.php


示例4: options_from_collection_for_select

function options_from_collection_for_select($collection, $valueProp, $textProp, $selected = null)
{
    $set = array();
    foreach ($collection as $entity) {
        $set[$entity->{$textProp}] = $entity->{$valueProp};
    }
    return options_for_select($set, $selected);
}
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:8,代码来源:form_options_helper.php


示例5: testOptionsForSelectWithAssociativeArray

 public function testOptionsForSelectWithAssociativeArray()
 {
     $this->assertDomEqual(options_for_select(array('Margharita' => '7€', 'Calzone' => '9€', 'Napolitaine' => '8€')), '<option value="7€">Margharita</option>
         <option value="9€">Calzone</option>
         <option value="8€">Napolitaine</option>');
     $this->assertDomEqual(options_for_select(array('Margharita' => '7€', 'Calzone' => '9€', 'Napolitaine' => '8€'), '9€'), '<option value="7€">Margharita</option>
         <option value="9€" selected="selected">Calzone</option>
         <option value="8€">Napolitaine</option>');
     $this->assertDomEqual(options_for_select(array('Margharita' => '7€', 'Calzone' => '9€', 'Napolitaine' => '8€'), array('9€', '8€')), '<option value="7€">Margharita</option>
         <option value="9€" selected="selected">Calzone</option>
         <option value="8€" selected="selected">Napolitaine</option>');
 }
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:12,代码来源:form_options_helper.test.php


示例6: select_box

function select_box($name, $choices, $selected = null, $options = array())
{
    $options += array('keys' => true, 'multiple' => false, 'groups' => false);
    $options['name'] = $name;
    $ofs_opts = array('groups' => $options['groups'], 'keys' => $options['keys']);
    unset($options['groups']);
    unset($options['keys']);
    if ($options['multiple']) {
        $selected = (array) $selected;
    }
    return tag('select', options_for_select($choices, $selected, $ofs_opts), $options);
}
开发者ID:jaz303,项目名称:php-helpers,代码行数:12,代码来源:form.php


示例7: sf_simple_cms_slot

function sf_simple_cms_slot($page, $slot, $default_text = null, $default_type = 'Text')
{
    $context = sfContext::getInstance();
    $request = $context->getRequest();
    $culture = $request->getAttribute('culture');
    $slot_object = $page->getSlot($slot, constant(sfConfig::get('app_sfSimpleCMS_escaping_strategy', 'ESC_RAW')));
    if (!$slot_object) {
        $slot_object = new sfSimpleCMSSlot();
        $slot_object->setType($default_type);
        $slot_object->setCulture($culture);
    }
    $slot_value = $slot_object->getValue();
    $slot_type_name = $slot_object->getType();
    $slot_type_class = 'sfSimpleCMSSlot' . $slot_type_name;
    $slot_type = new $slot_type_class();
    if ($request->getParameter('edit') == 'true' && !$request->getParameter('preview')) {
        echo '<div class="editable_slot" title="' . __('Double-click to edit') . '" id="slot_' . $slot . '" onDblClick="Element.show(\'edit_' . $slot . '\');Element.hide(\'slot_' . $slot . '\');">';
        if ($slot_value) {
            // Get slot value from the slot type object
            echo $slot_type->getSlotValue($slot_object);
        } else {
            // default text
            echo $default_text ? $default_text : sfConfig::get('app_sfSimpleCMS_default_text', __('[add text here]'));
        }
        echo '</div>';
        echo form_remote_tag(array('url' => 'sfSimpleCMS/updateSlot', 'script' => 'true', 'update' => 'slot_' . $slot, 'success' => 'Element.show(\'slot_' . $slot . '\');
                        Element.hide(\'edit_' . $slot . '\');
                       ' . visual_effect('highlight', 'slot_' . $slot)), array('class' => 'edit_slot', 'id' => 'edit_' . $slot, 'style' => 'display:none'));
        echo input_hidden_tag('slug', $page->getSlug(), 'id=edit_path' . $slot);
        echo input_hidden_tag('slot', $slot);
        if (sfConfig::get('app_sfSimpleCMS_use_l10n', false)) {
            echo input_hidden_tag('sf_culture', $slot_object->getCulture());
        }
        // Get slot editor from the slot type object
        echo $slot_type->getSlotEditor($slot_object);
        echo label_for('slot_type', __('Type: '));
        echo select_tag('slot_type', options_for_select(sfConfig::get('app_sfSimpleCMS_slot_types', array('Text' => __('Simple Text'), 'RichText' => __('Rich text'), 'Php' => __('PHP code'), 'Image' => __('Image'), 'Modular' => __('List of partials/components'))), $slot_type_name));
        if ($rich = sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
            // activate rich text if global rich_editing is true and is the current slot is RichText
            $rich = $slot_type_name == 'RichText';
        }
        echo submit_tag('update', array('onclick' => $rich ? 'tinymceDeactivate()' . ';submitForm(\'edit_' . $slot . '\'); return false' : '', 'class' => 'submit_tag'));
        echo button_to_function('cancel', 'Element.hide(\'edit_' . $slot . '\');Element.show(\'slot_' . $slot . '\');', 'class=submit_tag');
        echo '</form>';
    } else {
        echo $slot_type->getSlotValue($slot_object);
    }
}
开发者ID:net7,项目名称:Talia-CMS,代码行数:48,代码来源:sfSimpleCMSHelper.php


示例8: select_date

function select_date ( $year_name, $month_name, $day_name, $min_year, $max_year, $selected_date = NULL )
{
	$selected = explode('-', $selected_date);

	$years = array_merge(array('Select Year'), range($min_year, $max_year));
	$months = indexed_array(array('Select Month', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'));
	$days = array_merge(array('Select Day'), range(1, 31));

	$year_options = options_for_select($years, $selected[0]);
	$month_options = options_for_select($months, $selected[1]);
	$day_options = options_for_select($days, $selected[2]);

	return "<select id='$year_name' name='$year_name'>$year_options</select>"
	     . "<select id='$month_name' name='$month_name'>$month_options</select>"
	     . "<select id='$day_name' name='$day_name'>$day_options</select>";
}
开发者ID:boochtek,项目名称:php-base,代码行数:16,代码来源:form.php


示例9: object_multiselect_language_tag

/**
 * Returns a <selectize> tag populated with all the languages in the world (or almost).
 *
 * The select_language_tag builds off the traditional select_tag function, and is conveniently populated with
 * all the languages in the world (sorted alphabetically). Each option in the list has a two or three character
 * language/culture code for its value and the language's name as its display title.  The country data is
 * retrieved via the sfCultureInfo class, which stores a wide variety of i18n and i10n settings for various
 * countries and cultures throughout the world. Here's an example of an <option> tag generated by the select_country_tag:
 *
 * <samp>
 *  <option value="en">English</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_language_tag('language', 'de');
 * </code>
 *
 * @param  string $name     field name
 * @param  string $selected selected field values (two or three-character language/culture code)
 * @param  array  $options  additional HTML compliant <select> tag parameters
 *
 * @return string <selectize> tag populated with all the languages in the world.
 * @see select_tag, options_for_select, sfCultureInfo
 */
function object_multiselect_language_tag($name, $selected = null, $options = array())
{
    $c = new sfCultureInfo(sfContext::getInstance()->getUser()->getCulture());
    $languages = $c->getLanguages();
    if ($language_option = _get_option($options, 'languages')) {
        foreach ($languages as $key => $value) {
            if (!in_array($key, $language_option)) {
                unset($languages[$key]);
            }
        }
    }
    asort($languages);
    $option_tags = options_for_select($languages, $selected, $options);
    unset($options['include_blank'], $options['include_custom']);
    return select_tag($name, $option_tags, $options);
}
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:41,代码来源:LanguageHelper.php


示例10: select_state_tag

/**
 * Returns a <select> tag populated with all the states in the country.
 *
 * The select_state_tag builds off the traditional select_tag function, and is conveniently populated with 
 * all the states in the default country (sorted alphabetically). Each option in the list has a state code (two-character 
 * for US and Canada) for its value and the state's name as its display title.
 * The options[] array may also contain the following non-html options:
 *   A states[] array containing a list of states to be added in the form array
 * Here's an example of an <option> tag generated by the select_state_tag:
 *
 * <samp>
 *  <option value="NY">New York</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_state_tag('state', 'NY');
 * </code>
 *
 * @param  string field name 
 * @param  string selected field value (two-character state code)
 * @param  string country (two-character country code)
 * @param  array  additional HTML compliant <select> tag parameters. 
 *                May also include a 'states[]' array containing a list of states to be removed from the list
 *                May also include a 'country' value that will select the states from a country code
 * @return string <select> tag populated with all the states in the default or selected country.
 * @see select_tag, options_for_select
 */
function select_state_tag($name, $value, $options = array())
{
    if (isset($options['country'])) {
        $country = $options['country'];
        unset($options['country']);
    }
    $states = getStates($country);
    if (isset($options['states']) && is_array($options['states'])) {
        foreach ($options['states'] as $key) {
            if (isset($states[$key])) {
                unset($states[$key]);
            }
        }
        unset($options['states']);
    }
    if (isset($options['sort'])) {
        asort($states);
        unset($options['sort']);
    }
    $option_tags = options_for_select($states, $value);
    return select_tag($name, $option_tags, $options);
}
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:50,代码来源:StateHelper.php


示例11: date_select

function date_select($name, $value = null, $options = array())
{
    $months = isset($options['months']) ? $options['months'] : array('January' => 1, 'February' => 2, 'March' => 3, 'April' => 4, 'May' => 5, 'June' => 6, 'July' => 7, 'August' => 8, 'September' => 9, 'October' => 10, 'November' => 11, 'December' => 12);
    if (!isset($options['start_year'])) {
        if (isset($value)) {
            $start_year = (int) date('Y', $value) - 10;
        } else {
            $start_year = (int) date('Y') - 10;
        }
    } else {
        $start_year = $options['start_year'];
    }
    $end_year = isset($options['end_year']) ? $options['end_year'] : (int) date('Y');
    $html = '<select name="' . $name . '[m]">';
    $html .= options_for_select($months, (int) (isset($value) ? date('m', $value) : date('m')));
    $html .= '</select> ';
    $html .= '<select name="' . $name . '[d]">';
    $html .= options_for_select(range(1, 31), (int) (isset($value) ? date('d', $value) : date('d')));
    $html .= '</select> ';
    $html .= '<select name="' . $name . '[y]">';
    $html .= options_for_select(range($end_year, $start_year), (int) (isset($value) ? date('Y', $value) : date('Y')));
    $html .= '</select>';
    return $html;
}
开发者ID:pilaf,项目名称:yarr,代码行数:24,代码来源:form.php


示例12: select_tag

                <label for="ff_city">City</label>
                <input type="text" class="text" value="<?php 
echo $city;
?>
" id="ff_city" name="city"/>
                <br clear="left"/>
                <label for="ff_state">State</label>
                <input type="text" class="text" value="<?php 
echo $state;
?>
" id="ff_state" name="state"/>
              </div>
              <div>
                <label for="ff_country">Country</label>
                <?php 
echo select_tag('country', options_for_select($countries, $country, array('include_custom' => '- any -')), array('id' => 'ff_country', 'class' => 'text narrow'));
?>
                <br clear="left"/>
                <label for="ff_county">County</label>
                <input type="text" class="text" value="<?php 
echo $county;
?>
" id="ff_county" name="county"/>
              </div>
              <div>
                <div class="location-as">
                  <ul>
                    <li>
                      <input type="checkbox" id="ff_deceased" value="1" <?php 
if ($deceased) {
    echo 'checked="checked"';
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:findSuccess.php


示例13: testOptions_for_select_function

 /**
  *  Test options_for_select() function
  */
 public function testOptions_for_select_function()
 {
     //  Test choices with none selected
     $this->assertEquals('<option value="0">foo</option>' . "\n" . '<option value="1">bar</option>', options_for_select(array('foo', 'bar')));
     //  Test choices with one selected by key
     $this->assertEquals('<option value="M">mumble</option>' . "\n" . '<option value="G" selected="selected">grumble</option>', options_for_select(array('M' => 'mumble', 'G' => 'grumble'), 'G'));
 }
开发者ID:phpontrax,项目名称:trax,代码行数:10,代码来源:FormOptionsHelperTest.php


示例14: form_error

    echo form_error('sf_asset{type}', array('class' => 'form-error-msg'));
    ?>
      <?php 
}
?>
      <?php 
foreach (sfConfig::get('app_sfAssetsLibrary_types', array('image', 'txt', 'archive', 'pdf', 'xls', 'doc', 'ppt')) as $type) {
    ?>
        <?php 
    $options[$type] = $type;
    ?>
      <?php 
}
?>
      <?php 
echo select_tag('sf_asset[type]', options_for_select($options, $sf_asset->getType()));
?>
    </div>
  </div>

  <?php 
include_partial('sfAsset/edit_form_custom', array('sf_asset' => $sf_asset));
?>

</fieldset>

<?php 
include_partial('edit_actions', array('sf_asset' => $sf_asset));
?>

</form>
开发者ID:rewrewby,项目名称:propertyx,代码行数:31,代码来源:_edit_form.php


示例15: object_select_tag

?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['CURRICULUM_ID']) ? $filters['CURRICULUM_ID'] : null, null, array('include_blank' => true, 'related_class' => 'Curriculum', 'text_method' => '__toString', 'control_name' => 'filters[CURRICULUM_ID]', 'peer_method' => 'doSelectFiltered'));
?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectFiltered'));
?>
</td>
					<td class='filter'><?php 
echo object_select_tag(isset($filters['CLASS_GROUP_ID']) ? $filters['CLASS_GROUP_ID'] : null, null, array('include_blank' => true, 'related_class' => 'ClassGroup', 'peer_method' => 'doSelectOrdered', 'control_name' => 'filters[CLASS_GROUP_ID]'));
?>
					</td>
					<td class='filter'><?php 
echo select_tag('filters[STATUS]', options_for_select(array(Student::STATUS_ACTIVE => __('_STUDENT_STATUS_ACTIVE_'), Student::STATUS_INACTIVE => __('_STUDENT_STATUS_INACTIVE_'), Student::STATUS_OVERDUE => __('_STUDENT_STATUS_OVERDUE_'), Student::STATUS_FINAL => __('_STUDENT_STATUS_FINAL_'), Student::STATUS_GRADUATE => __('_STUDENT_STATUS_GRADUATE_')), isset($filters['STATUS']) ? $filters['STATUS'] : null, array('include_blank' => true)));
?>
</td>
				</tr>
			</thead>
			<tbody>
			<?php 
if ($pager->getNbResults() < 1) {
    ?>
				<tr class="list">
					<td colspan="100">
					<div class="no_record"><?php 
    echo __('No record found');
    ?>
</div>
					</td>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listStudentSuccess.php


示例16: form_tag

echo form_tag('#', array("id" => "disegni-decreti-filter", "class" => $active ? 'active' : ''));
?>
  <fieldset class="labels">
    <label for="filter_article">articolo:</label>
    <label for="filter_site">sede:</label>
    <label for="filter_presenter">presentatore:</label>
    <label for="filter_status">status:</label>
  </fieldset>
  <p>filtra per</p>
  <fieldset>
    <?php 
echo select_tag('filter_article', options_for_select($available_articles, $selected_article));
?>
                          
    <?php 
echo select_tag('filter_site', options_for_select($available_sites, $selected_site));
?>

    <?php 
echo select_tag('filter_presenter', options_for_select($available_presenters, $selected_presenter));
?>

    <?php 
echo select_tag('filter_status', options_for_select($available_statuses, $selected_status));
?>

    <?php 
echo submit_image_tag('btn-applica.png', array('id' => 'disegni-decreti-filter-apply', 'alt' => 'applica', 'style' => 'display: none;', 'name' => 'disegni-decreti-filter-apply'));
?>
  </fieldset>
</form>
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:31,代码来源:_filter.php


示例17: image_tag

            	<?php 
echo image_tag('indicator.gif');
?>
 Assigning users...
            </p>
          </div>
          
          <div id="task-status-holder">
          <?php 
echo form_remote_tag(array('update' => 'task-' . $task->getUuid() . '-holder', 'url' => 'project/ajaxSetTaskStatus', 'loading' => "Element.show('indicator-" . $task->getUuid() . "-status')", 'complete' => "Element.hide('indicator-" . $task->getUuid() . "-status');" . visual_effect('highlight', 'task-' . $task->getUuid())));
?>
          		<?php 
echo input_hidden_tag('task', $task->getUuid(), array());
?>
          		<?php 
echo select_tag('task-status', options_for_select(array('2' => 'Pending/In Planning', '1' => 'In Progress', '0' => 'Complete'), $task->getStatus()));
?>
          		<?php 
echo submit_tag('go', array());
?>
          	</form>
          </div>
          <div style="height:20px">
            <p id="indicator-<?php 
echo $task->getUuid();
?>
-status" style="display:none">
            	<?php 
echo image_tag('indicator.gif');
?>
 Settings task status...
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:_edit_task_users.php


示例18: select_timezone_tag

/**
 * Returns a <select> tag populated with all the timezones in the world.
 *
 * The select_timezone_tag builds off the traditional select_tag function, and is conveniently populated with 
 * all the timezones in the world (sorted alphabetically). Each option in the list has a unique timezone identifier 
 * for its value and the timezone's locale as its display title.  The timezone data is retrieved via the sfCultureInfo
 * class, which stores a wide variety of i18n and i10n settings for various countries and cultures throughout the world.
 * Here's an example of an <option> tag generated by the select_timezone_tag:
 *
 * <b>Options:</b>
 * - display - 
 *     identifer         - Display the PHP timezone identifier (e.g. America/Denver)
 *     timezone          - Display the full timezone name (e.g. Mountain Standard Time)
 *     timezone_abbr     - Display the timezone abbreviation (e.g. MST)
 *     timzone_dst       - Display the full timezone name with daylight savings time (e.g. Mountain Daylight Time)
 *     timezone_dst_abbr - Display the timezone abbreviation with daylight savings time (e.g. MDT)
 *     city              - Display the city/region that relates to the timezone (e.g. Denver)
 * 
 * <samp>
 *  <option value="America/Denver">America/Denver</option>
 * </samp>
 *
 * <b>Examples:</b>
 * <code>
 *  echo select_timezone_tag('timezone', 'America/Denver');
 * </code>
 *
 * @param  string $name      field name 
 * @param  string $selected  selected field value (timezone identifier)
 * @param  array  $options   additional HTML compliant <select> tag parameters
 *
 * @return string <select> tag populated with all the timezones in the world.
 * @see select_tag, options_for_select, sfCultureInfo
 */
function select_timezone_tag($name, $selected = null, $options = array())
{
    static $display_keys = array('identifier' => 0, 'timezone' => 1, 'timezone_abbr' => 2, 'timezone_dst' => 3, 'timezone_dst_abbr' => 4, 'city' => 5);
    $display = _get_option($options, 'display', 'identifier');
    $display_key = isset($display_keys[$display]) ? $display_keys[$display] : 0;
    $c = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture());
    $timezone_groups = $c->getTimeZones();
    $timezones = array();
    foreach ($timezone_groups as $tz_group) {
        $array_key = isset($tz_group[0]) ? $tz_group[0] : null;
        if (isset($tz_group[$display_key]) and !empty($tz_group[$display_key])) {
            $timezones[$array_key] = $tz_group[$display_key];
        }
    }
    if ($timezone_option = _get_option($options, 'timezones')) {
        $timezones = array_intersect_key($timezones, array_flip((array) $timezone_option));
    }
    // Remove duplicate values
    $timezones = array_unique($timezones);
    asort($timezones);
    $option_tags = options_for_select($timezones, $selected);
    return select_tag($name, $option_tags, $options);
}
开发者ID:habtom,项目名称:uas,代码行数:57,代码来源:DateFormHelper.php


示例19: __

<fieldset >
  <h2><?php 
echo __('filtros');
?>
</h2>
  
  <div class="form-row">
  <?php 
echo label_for("filters[es_evento]", __('tipo') . ":");
?>
    <div class="content">
    <?php 
$opciones = array('0' => __('tareas'), '1' => __('eventos'));
$tipo_tarea = isset($filters['es_evento']) ? $filters['es_evento'] : null;
$value = select_tag('filters[es_evento]', options_for_select($opciones, $tipo_tarea, array('include_custom' => __('tareas y eventos'))));
echo $value ? $value : "&nbsp";
?>
    </div>
  </div>

  
  <div class="form-row">
    <?php 
echo label_for("filters[estado_tarea]", __('estado tarea') . ":");
?>
    <div class="content">
    <?php 
$opciones = TareaPeer::getAllEstadosTareas();
$html = "";
$html .= "<ul class=\"sf_admin_checklist\">\n";
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:30,代码来源:_filters.php


示例20: Stock

include '../../lib/supplier.class.php';
include '../../lib/lc.class.php';
include '../../lib/lot.class.php';
//// Retrive Stock Group Name
$objStockGroupInfo = new Stock();
$stock = new Stock();
$StockGrpInfo = $objStockGroupInfo->retriveStockGroupUnderInfo();
$StockGrpInfo_options = options_for_select($StockGrpInfo, 'stock_group_name', 'stock_group_name', true);
//// Retrive Stock Unit Name
$unitName = options_for_select($stock->retriveStockUnit(), 'stock_item_unit_name', 'stock_item_unit_name', true);
$Supplier = new Supplier();
$outputSupplierItem = options_for_select($Supplier->retriveSupplierInfo(), 'sup_name', 'sup_name', true);
$LC = new LC();
$outputLC = options_for_select($LC->retriveLcInfo(), 'lc_name', 'lc_name', true);
$Lot = new Lot();
$outputLot = options_for_select($Lot->retriveLotInfo(), 'lot_name', 'lot_name', true);
$StockLocationInfo = $stock->retriveLocation();
$rowStockLocation = count($StockLocationInfo);
/////////////////////////////////
@session_start();
$user_level = $_SESSION[user_level];
?>

<div id="test">
<form  id="CreateStockItem" name="CreateStockItem" method="post"   action="includes/model/raw_item_actions.php"><table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>Name</td>
    <td><input name="stkName" type="text" class="inventori_txtfield" id="stkName"></td>
  </tr>
  <tr>
    <td>Code</td>
开发者ID:rajibahmed,项目名称:IIMS,代码行数:31,代码来源:create_raw_item.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP options_typography_get_google_fonts函数代码示例发布时间:2022-05-15
下一篇:
PHP options_allowed_values函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap