本文整理汇总了PHP中mgm_make_combo_options函数的典型用法代码示例。如果您正苦于以下问题:PHP mgm_make_combo_options函数的具体用法?PHP mgm_make_combo_options怎么用?PHP mgm_make_combo_options使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mgm_make_combo_options函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
:</b>
</span>
</div>
</div>
<div class="row">
<div class="cell textalignleft ">
<?php
//issue #1234
if ($data['custom_field']['name'] == 'subscription_options') {
$data['input_types'] = array('select' => 'Select (Drop down box)', 'radio' => 'Radio');
}
?>
<select name="type" id="type">
<?php
echo mgm_make_combo_options($data['input_types'], $data['custom_field']['type'], MGM_KEY_VALUE);
?>
</select>
</div>
</div>
<?php
// issue #1239
if ($data['custom_field']['name'] != 'display_name') {
?>
<div class="row displaynone">
<div class="cell width120px">
<span class="required-field">
<b><?php
示例2: _e
</div>
<div class="cell textalignleft">
<input type="text" name="setting[mailchimp][apikey]" value="<?php
echo $data['module']->setting['apikey'];
?>
" size="40"/>
</div>
</div>
<div class="row">
<div class="cell width26 textalignleft">
<b><?php
_e('Opt-in', 'mgm');
?>
</b>
</div>
<div class="cell width2 textaligncenter">
<b>:</b>
</div>
<div class="cell textalignleft">
<select name="setting[mailchimp][double_optin]" class="width100px">
<?php
echo mgm_make_combo_options(array('1' => __('Double opt-in', 'mgm'), '0' => __('Single opt-in', 'mgm')), $data['module']->setting['double_optin'], MGM_KEY_VALUE);
?>
</select>
</div>
</div>
</div>
</div>
</div>
示例3: _e
</div>
<div class="cell textalignleft">
<input type="text" name="setting[icontact][specialid]" value="<?php
echo $data['module']->setting['specialid'];
?>
" size="40"/>
</div>
</div>
<div class="row">
<div class="cell width26 textalignleft">
<b><?php
_e('Doubleopt Id', 'mgm');
?>
</b>
</div>
<div class="cell width2 textaligncenter">
<b>:</b>
</div>
<div class="cell textalignleft">
<select name="setting[icontact][doubleopt]" class="width100px">
<?php
echo mgm_make_combo_options(array('1' => __('Yes', 'mgm'), '0' => __('No', 'mgm')), $data['module']->setting['doubleopt'], MGM_KEY_VALUE);
?>
</select>
</div>
</div>
</div>
</div>
</div>
示例4: _e
<div class="table">
<div class="row">
<div class="cell width30">
<p><b><?php
_e('Redirection Method', 'mgm');
?>
:</b></p>
</div>
</div>
<div class="row">
<div class="cell width70">
<p>
<select name="redirection_method" class="width150px">
<?php
echo mgm_make_combo_options(array('header' => 'header', 'javascript' => 'javascript', 'meta' => 'meta'), $data['system_obj']->get_setting('redirection_method'), MGM_VALUE_ONLY);
?>
</select>
</p>
<p><div class="tips width90"><?php
_e('Redirection method.<br/>Default: Wordpress wp_redirect<br/>Javascript: Javascript redirection<br/>Meta: Html Meta tag redirection', 'mgm');
?>
</div></p>
</div>
</div>
</div>
<?php
mgm_box_bottom();
?>
示例5: mgm_post_setup_meta_box_form
//.........这里部分代码省略.........
echo $post_obj->get_access_duration();
?>
"/>
</li>
<li>
<label><?php
_e('The number of times that the buyer will have access for, "PAY PER VIEW" (0 for unlimited views).', 'mgm');
?>
</label><br />
<input type="text" name="mgm_post[access_view_limit]" class="mgm_width_50px" value="<?php
echo $post_obj->get_access_view_limit();
?>
"/>
</li>
</ul>
<?php
if ($addons = mgm_get_all_addon_combo()) {
?>
<p class="postpurhase-heading"><?php
_e('Addon Settings', 'mgm');
?>
:</p>
<ul class="mgm_post_setup_meta_box_ul">
<li>
<label><?php
_e('Allow Addons?', 'mgm');
?>
</label> <br />
<select name="mgm_post[addons][]" class="mgm_width_50px">
<option value="">-</option>
<?php
echo mgm_make_combo_options($addons, $post_obj->get_addons(), MGM_KEY_VALUE);
?>
</select>
</li>
</ul>
<?php
}
?>
<p class="postpurhase-heading"><?php
_e('Payment Settings', 'mgm');
?>
:</p>
<p class="fontweightbold"><?php
_e('Allow Modules', 'mgm');
?>
:</p>
<?php
if ($payment_modules = mgm_get_class('system')->get_active_modules('payment')) {
$modue_i = 0;
foreach ($payment_modules as $payment_module) {
if (!in_array($payment_module, array('mgm_trial'))) {
?>
<input type="checkbox" name="mgm_post[allowed_modules][<?php
echo $modue_i;
?>
]" value="<?php
echo $payment_module;
?>
" <?php
示例6: _e
<b><?php
_e('Trial Duration', 'mgm');
?>
:</b>
</span>
</div>
</div>
<div class="row">
<div class="cell">
<input type="text" name="value_is[sub_pack_trial][duration_unit]" size="10" maxlength="50" value="<?php
echo $data['value_is']['sub_pack_trial']['duration_unit'];
?>
"/>
<select name="value_is[sub_pack_trial][duration_type]" class="width80px">
<?php
echo mgm_make_combo_options(array('d' => 'Day', 'm' => 'Month', 'y' => 'Year', 'l' => 'Lifetime'), $data['value_is']['sub_pack_trial']['duration_type'], MGM_KEY_VALUE);
?>
</select>
</div>
</div>
<div class="row">
<div class="cell">
<span class="required">
<b><?php
_e('Trial Occurrences', 'mgm');
?>
:</b>
</span>
</div>
</div>
示例7: _e
</td>
<td valign='top'>
<input autocomplete='off' type='text' size='4' value='' name='mgm_card_code' id='mgm_card_code' maxlength='4' class='input {required: true, minlength:3, maxlength:4, digits:true}'/>
</td>
</tr>
<tr>
<td valign='top'>
<label for='mgm_card_type'><?php
_e('Card Type', 'mgm');
?>
<span class='required'>*</span></label>
</td>
<td valign='top'>
<select name='mgm_card_type' id='mgm_card_type' class='select'>
<?php
echo mgm_make_combo_options($data['card_types'], '', MGM_KEY_VALUE);
?>
</select>
</td>
</tr>
<tr>
<td></td>
<td valign='top'>
<input class="button" type="submit" value="<?php
_e('Submit', 'mgm');
?>
" onClick="return mgm_submit_cc_payment('<?php
echo $data['code'];
?>
')">
示例8: mgm_generate_member_list
//.........这里部分代码省略.........
if (empty($sql_filter)) {
//issue #1327
if (!empty($show_level_members)) {
// common
$members = array_intersect($active_members, $show_level_members);
$members_in = count($members) == 0 ? 0 : implode(',', $members);
} else {
$members_in = count($active_members) == 0 ? 0 : implode(',', $active_members);
}
// set filter
$sql_filter = " AND `ID` IN ({$members_in})";
}
// get members
$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM `{$wpdb->users}` WHERE ID != 1 {$sql_filter} {$sql_order} {$sql_limit}";
// users
$user_list = $wpdb->get_results($sql);
// echo $wpdb->last_query;
// set
if ($custom_sort) {
$data['users'] = $custom_user_list;
} else {
$data['users'] = $user_list;
}
// page url
$data['page_url'] = add_query_arg(array('query' => $search_field_value, 'by' => $search_field_name, 'sort_field' => $sort_field_name, 'sort_order' => $sort_order_type), $current_url);
//$url.'query='.$search_field_value.'&by='.$search_field_name.'&sort_field='.$sort_field_name.'&order_type='.$order_type;
// get page links
$data['page_links'] = $pager->get_pager_links($data['page_url']);
// total pages
$data['page_count'] = $pager->get_page_count();
// total rows/results
$data['row_count'] = $pager->get_row_count();
//sort by filed
$sort_field_html = sprintf('<select id="sort_field" name="sort_field" class="width100px">%s</select>', mgm_make_combo_options($data['sort_fields'], $data['sort_field'], MGM_KEY_VALUE));
//order by asc/desc
$sort_order_html = sprintf('<select id="sort_order" name="sort_order" class="width100px">%s</select>', mgm_make_combo_options($data['order_fields'], $data['sort_type'], MGM_KEY_VALUE));
//search by
$search_by_html = sprintf('<select id="by" name="by" class="width100px">%s</select>', mgm_make_combo_options($data['search_fields'], $data['search_field_name'], MGM_KEY_VALUE));
//search box
$html = '<div>
<form method="get" action="' . $current_url . '">
<h5>' . __('Search Our Members', 'mgm') . ':</h5>
<input type="text" id="query" name="query" value="' . $data['search_field_value'] . '" />
' . __('in', 'mgm') . ' ' . $search_by_html . ' ' . __('sort by', 'mgm') . ' ' . $sort_field_html . ' ' . $sort_order_html . '
<input class="button" type="submit" id="submit" value="' . __('Submit', 'mgm') . '" />
<input type="hidden" name="search" id="search" value="search" />
</form>
</div>';
$html .= '<div><table><tr>';
for ($i = 0; $i < $use_field_len; $i++) {
$html .= sprintf('<th class="th_div mgm_text_align_left mgm_column_%s" id="mgm_column_%s"><label><b>%s</b></label></th>', $use_field[$i], $use_field[$i], ucwords(str_replace('_', ' ', $use_field[$i])));
}
$html .= '</tr>';
$enable_public_profile = mgm_get_class('system')->get_setting('enable_public_profile');
if (!empty($data['users'])) {
foreach ($data['users'] as $user) {
// user object
$user = get_userdata($user->ID);
// mgm member object
$member = mgm_get_member($user->ID);
$html .= '<tr>';
for ($i = 0; $i < $use_field_len; $i++) {
$app_user_filed = 'user_' . $use_field[$i];
if (isset($member->custom_fields->{$use_field}[$i]) || isset($user->{$use_field}[$i]) || isset($user->{$app_user_filed}) || $use_field[$i] == 'image') {
if ($use_field[$i] == 'image') {
//is_multisite,network_home_url
示例9: field_type_select
function field_type_select($field, $name, $value, $options = NULL, $type = MGM_VALUE_ONLY, $sel_match = 'DEFAULT', $size = 1)
{
// get options
$options = $options ? $options : preg_split('/[;,]+/', $field['options']);
// value
$value = $this->_filtered_value($field, $name, $value);
// make options
$options = mgm_make_combo_options($options, $value, $type, false, $sel_match);
// readonly
$readonly = isset($field['attributes']) && $field['attributes']['readonly'] ? 'readonly="readonly"' : '';
// options
if (isset($field['attributes']) && $field['attributes']['readonly'] && is_array($options) && isset($options[$value]) && !empty($options[$value])) {
$options = array(array_search($value, $options) => $value);
}
// classes, default name
$classes = array($name);
// required
if (isset($field['attributes']) && $field['attributes']['required']) {
$classes[] = 'required';
}
// extra
if (isset($field['attributes']) && isset($field['attributes']['class'])) {
$classes[] = $field['attributes']['class'];
}
// join
$class = implode(' ', $classes);
// multiple
$multiple = '';
if ($size > 1) {
$multiple = sprintf('multiple size="%d"', $size);
// return
return sprintf('<select name="%s[]" class="%s" %s %s>%s</select>', $this->_get_element_name($field, $name), $class, $readonly, $multiple, $options);
}
// return
return sprintf('<select name="%s" class="%s" %s %s>%s</select>', $this->_get_element_name($field, $name), $class, $readonly, $multiple, $options);
}
示例10: _e
_e('Add new Posts to this Pack', 'mgm');
?>
</b>
</div>
</div>
<div class="row brBottom">
<div class="cell width10 textalignleft">
<?php
_e('Post', 'mgm');
?>
:
</div>
<div class="cell width70 textalignleft">
<select name="posts[]" class="width80">
<?php
echo mgm_make_combo_options(mgm_get_purchasable_posts($data['exclude_posts']), '', MGM_KEY_VALUE);
?>
</select>
<div class="tips">
<?php
_e("This dropdown will populate with posts as you mark them as purchasable", "mgm");
?>
</div>
</div>
<div class="cell width20 textalignright">
<input class="button" type="button" onclick="mgm_postpack_post_add()" value="<?php
_e('Save', 'mgm');
?>
" />
示例11: mgm_make_combo_options
<?php
echo mgm_make_combo_options(array(20, 40, 50, 100), $data['page_limit'], MGM_VALUE_ONLY);
?>
</select>
</div>
</div>
<div class="row">
<div class="cell width55">
<?php
_e('Search By', 'mgm');
?>
:
<select name='search_field_name' class='width135px'>
<?php
echo mgm_make_combo_options($data['search_fields'], $data['search_field_name'], MGM_KEY_VALUE);
?>
</select>
<span id="fld_wrapper">
<input type="text" name="search_field_value" value="<?php
echo $data['search_field_value'];
?>
">
</span>
<span id="fld_wrapper_two">
<input type="text" name="search_field_value_two" value="<?php
echo $data['search_field_value_two'];
?>
">
</span>
示例12: _e
<input type="checkbox" name="remove_membership_type[]" value="<?php
echo $membership_type['code'];
?>
" />
<?php
_e('Delete and move this membership type\'s members to ', 'mgm');
?>
<br />
<select name="move_membership_type_to[<?php
echo $membership_type['code'];
?>
]" class="width40" disabled="disabled">
<option value="none">--none--</option>
<?php
echo mgm_make_combo_options($data['membership_types_combo'], '', MGM_KEY_VALUE, array('guest', 'trial', $membership_type['code']));
?>
</select>
<?php
}
?>
<br /><br />
<?php
$login_redirect_url = strlen($membership_type['login_redirect']) > 7 ? $membership_type['login_redirect'] : '';
?>
<input type="checkbox" name="update_login_redirect_url[]" value="<?php
echo $membership_type['code'];
?>
" <?php
示例13: mgm_edit_custom_fields
//.........这里部分代码省略.........
}
}
continue;
}
//issue #844
if (in_array($field['name'], $skip_fileds)) {
continue;
}
// init value
$value = '';
//disable readonly for admin user(issue#: 515)
$ro = $field['attributes']['readonly'] == true && !$is_admin ? 'readonly="readonly"' : false;
// value
if (isset($member->custom_fields->{$field}['name'])) {
$value = $member->custom_fields->{$field}['name'];
}
// date
if ($field['name'] == 'birthdate') {
if ($value) {
//convert saved date to input field format
$value = mgm_get_datepicker_format('date', $value);
} else {
$value = '';
}
$element = '<input type="text" name="mgm_profile_field[' . $field['name'] . ']" value="' . $value . '" ' . $ro . ' class="text ' . ($ro ? '' : 'mgm_date') . ' mgm_custom_profile_birthdate"/>';
} else {
if ($field['name'] == 'country') {
$countries = mgm_field_values(TBL_MGM_COUNTRY, 'code', 'name');
if ($ro) {
$countries = !empty($value) ? array($value => $countries[$value]) : array(" " => " ");
}
//issue #1782
$value = !empty($value) ? $value : 'US';
$options = mgm_make_combo_options($countries, $value, MGM_KEY_VALUE);
$element = '<select name="mgm_profile_field[' . $field['name'] . ']" > ' . $options . ' </select>';
} else {
if ($field['type'] == 'text') {
$element = '<input type="text" name="mgm_profile_field[' . $field['name'] . ']" value="' . $value . '" ' . $ro . ' class="text mgm_custom_profile_password"/>';
} else {
if ($field['type'] == 'password') {
continue;
} else {
if ($field['type'] == 'textarea') {
$element = '<textarea name="mgm_profile_field[' . $field['name'] . ']" cols="40" rows="5" ' . $ro . '>' . $value . '</textarea>';
} else {
if ($field['type'] == 'checkbox') {
$options = preg_split('/[;,]/', $field['options']);
//$values = preg_split('/[;,\s]/', $value);
$values = @unserialize($value);
// pass " " as value to prevent the default value getting selected, if no option is selected
$values = empty($values) ? " " : $values;
//Issue # 694
$element = mgm_make_checkbox_group('mgm_profile_field[' . $field['name'] . '][]', $options, $values, MGM_VALUE_ONLY, '', 'div');
} else {
if ($field['type'] == 'checkboxg') {
$options = preg_split('/[;,]/', $field['options']);
if (!is_array($value)) {
$values = @unserialize($value);
} else {
$values = $value;
}
$values = empty($values) ? " " : $values;
$element = mgm_make_checkbox_group('mgm_profile_field[' . $field['name'] . '][]', $options, $values, MGM_VALUE_ONLY, '', 'div');
} else {
if ($field['type'] == 'radio') {
$options = preg_split('/[;,]/', $field['options']);
示例14: mgm_make_combo_options
][cost]" id="packs_cost_<?php
echo $data['pack_ctr'] - 1;
?>
" value="<?php
echo $data['pack']['cost'];
?>
" size="10" maxlength="15"/>
<select name="packs[<?php
echo $data['pack_ctr'] - 1;
?>
][currency]" id="<?php
echo $data['pack_ctr'] - 1;
?>
_currency" class="width200px">
<?php
echo mgm_make_combo_options(mgm_get_currencies(), $data['pack']['currency'], MGM_KEY_VALUE);
?>
</select>
<?php
//echo $data['pack']['currency'];
?>
</div>
</div>
</div>
<div class="row">
<div class="cell">
<div class="marginleft10px">
<p class="fontweightbold"><?php
示例15: _e
_e('Value', 'mgm');
?>
</b>
</div>
</div>
<div class="row brBottom">
<div class="cell width50 textalignleft ">
<p><b><?php
_e('Enable', 'mgm');
?>
?</b></p>
</div>
<div class="cell textalignleft width50 brCellBorderLeft">
<select name="enabled" class="width100px">
<?php
echo mgm_make_combo_options(array('Y' => __('Yes', 'mgm'), 'N' => __('No', 'mgm')), $data['module']->is_enabled('string'), MGM_KEY_VALUE);
?>
</select>
</div>
</div>
</div>
<p><div class="tips width95"><?php
_e('Enable/Disable the GVO module.', 'mgm');
?>
</div></p>
<p> </p>
<h3><b><?php
_e('Primary Settings', 'mgm');