本文整理汇总了PHP中check_checked函数的典型用法代码示例。如果您正苦于以下问题:PHP check_checked函数的具体用法?PHP check_checked怎么用?PHP check_checked使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_checked函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: helper_alternate_class
?>
</textarea>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('released');
?>
</td>
<td>
<input type="checkbox" name="released" <?php
check_checked($t_version->released, VERSION_RELEASED);
?>
/>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" class="button" value="<?php
echo lang_get('update_version_button');
?>
" />
</td>
</tr>
示例2: print_filter_plugin_field
/**
* Print plugin filter fields as defined by MantisFilter objects.
* @param string $p_field_name Field name.
* @param object $p_filter_object Filter object.
* @return void
*/
function print_filter_plugin_field($p_field_name, $p_filter_object)
{
global $g_select_modifier, $g_filter, $f_view_type;
$t_size = (int) $p_filter_object->size;
switch ($p_filter_object->type) {
case FILTER_TYPE_STRING:
echo '<input name="', string_attribute($p_field_name), '"', $t_size > 0 ? ' size="' . $t_size . '"' : '', ' value="', string_attribute($g_filter[$p_field_name]), '"/>';
break;
case FILTER_TYPE_INT:
echo '<input name="', string_attribute($p_field_name), '"', $t_size > 0 ? ' size="' . $t_size . '"' : '', ' value="', (int) $g_filter[$p_field_name], '"/>';
break;
case FILTER_TYPE_BOOLEAN:
echo '<input name="', string_attribute($p_field_name), '" type="checkbox"', $t_size > 0 ? ' size="' . $t_size . '"' : '', check_checked((bool) $g_filter[$p_field_name]), '"/>';
break;
case FILTER_TYPE_MULTI_STRING:
echo '<select', $g_select_modifier, $t_size > 0 ? ' size="' . $t_size . '"' : '', ' name="', string_attribute($p_field_name), '[]">', '<option value="', META_FILTER_ANY, '"', check_selected($g_filter[$p_field_name], META_FILTER_ANY), '>[', lang_get('any'), ']</option>';
foreach ($p_filter_object->options() as $t_option_value => $t_option_name) {
echo '<option value="', string_attribute($t_option_value), '" ', check_selected($g_filter[$p_field_name], $t_option_value), '>', string_display_line($t_option_name), '</option>';
}
echo '</select>';
break;
case FILTER_TYPE_MULTI_INT:
echo '<select', $g_select_modifier, $t_size > 0 ? ' size="' . $t_size . '"' : '', ' name="', string_attribute($p_field_name), '[]">', '<option value="', META_FILTER_ANY, '"', check_selected($g_filter[$p_field_name], META_FILTER_ANY), '>[', lang_get('any'), ']</option>';
foreach ($p_filter_object->options() as $t_option_value => $t_option_name) {
echo '<option value="', (int) $t_option_value, '" ', check_selected($g_filter[$p_field_name], (int) $t_option_value), '>', string_display_line($t_option_name), '</option>';
}
echo '</select>';
break;
}
}
示例3: print_documentation_link
</tr>
<?php
}
?>
<tr>
<th class="category">
<?php
print_documentation_link('report_stay');
?>
</th>
<td>
<label><input <?php
echo helper_get_tab_index();
?>
type="checkbox" id="report_stay" name="report_stay" <?php
check_checked($f_report_stay);
?>
/> <?php
echo lang_get('check_report_more_bugs');
?>
</label>
</td>
</tr>
<tr>
<td class="left">
<span class="required"> * <?php
echo lang_get('required');
?>
</span>
</td>
<td class="center">
示例4: helper_alternate_class_no_attribute
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for=""><span><?php echo lang_get( 'post_to' ) ?></span></label>
<span class="select">
<select name="project_id"><?php
$t_sitewide = false;
if ( current_user_is_administrator() ) {
$t_sitewide = true;
}
print_project_option_list( $v_project_id, $t_sitewide ); ?>
</select>
</span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for="news-update-announcement"><span><?php echo lang_get( 'announcement' ) ?></span> <span class="help-text"><?php echo lang_get( 'stays_on_top' ) ?></span></label>
<span class="checkbox"><input type="checkbox" id="news-update-announcement" name="announcement" <?php check_checked( $v_announcement, 1 ); ?> /></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<label for=""><span><?php echo lang_get( 'view_status' ) ?></span></label>
<span class="select">
<select name="view_state">
<?php print_enum_string_option_list( 'view_state', $v_view_state ) ?>
</select>
</span>
<span class="label-style"></span>
</div>
<span class="submit-button"><input type="submit" class="button" value="<?php echo lang_get( 'update_news_button' ) ?>" /></span>
</fieldset>
</form>
</div><?php
示例5: edit_account_prefs
//.........这里部分代码省略.........
<label for="refresh-delay"><span><?php
echo lang_get('refresh_delay');
?>
</span></label>
<span class="input"><input id="refresh-delay" type="text" name="refresh_delay" size="4" maxlength="4" value="<?php
echo $t_pref->refresh_delay;
?>
" /> <?php
echo lang_get('minutes');
?>
</span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label for="redirect-delay"><span><?php
echo lang_get('redirect_delay');
?>
</span></label>
<span class="input"><input id="redirect-delay" type="text" name="redirect_delay" size="4" maxlength="3" value="<?php
echo $t_pref->redirect_delay;
?>
" /> <?php
echo lang_get('seconds');
?>
</span>
<span class="label-style"></span>
</div>
<fieldset class="field-container">
<legend><span><?php
echo lang_get('bugnote_order');
?>
</span></legend>
<span class="radio"><input id="bugnote-order-desc" type="radio" name="bugnote_order" value="DESC" <?php
check_checked($t_pref->bugnote_order, 'DESC');
?>
/></span>
<label for="bugnote-order-desc"><span><?php
echo lang_get('bugnote_order_desc');
?>
</span></label>
<span class="radio"><input id="bugnote-order-asc" type="radio" name="bugnote_order" value="ASC" <?php
check_checked($t_pref->bugnote_order, 'ASC');
?>
/></span>
<label for="bugnote-order-asc"><span><?php
echo lang_get('bugnote_order_asc');
?>
</span></label>
<span class="label-style"></span>
</fieldset>
<?php
if (ON == config_get('enable_email_notification')) {
?>
<fieldset class="field-container">
<legend><label for="email-on-new"><?php
echo lang_get('email_on_new');
?>
</label></legend>
<span class="checkbox"><input id="email-on-new" type="checkbox" name="email_on_new" <?php
check_checked((int) $t_pref->email_on_new, ON);
?>
/></span>
<label for="email-on-new-min-severity" class="email-on-severity-label"><span><?php
echo lang_get('with_minimum_severity');
?>
</span></label>
示例6: lang_get
# spacer
echo '<tr class="spacer"><td colspan="6"></td></tr>';
echo '<tr class="hidden"></tr>';
}
# Bugnote Text Box
echo '<tr>';
echo '<th class="category"><label for="bugnote_text">' . lang_get('add_bugnote_title') . '</label></th>';
echo '<td colspan="5"><textarea ', helper_get_tab_index(), ' id="bugnote_text" name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
# Bugnote Private Checkbox (if permitted)
if (access_has_bug_level(config_get('private_bugnote_threshold'), $t_bug_id)) {
echo '<tr>';
echo '<th class="category">' . lang_get('private') . '</th>';
echo '<td colspan="5">';
$t_default_bugnote_view_status = config_get('default_bugnote_view_status');
if (access_has_bug_level(config_get('set_view_status_threshold'), $t_bug_id)) {
echo '<input ', helper_get_tab_index(), ' type="checkbox" id="private" name="private" ', check_checked(config_get('default_bugnote_view_status'), VS_PRIVATE), ' />';
echo lang_get('private');
} else {
echo get_enum_element('view_state', $t_default_bugnote_view_status);
}
echo '</td></tr>';
}
# Time Tracking (if permitted)
if (config_get('time_tracking_enabled')) {
if (access_has_bug_level(config_get('time_tracking_edit_threshold'), $t_bug_id)) {
echo '<tr>';
echo '<th class="category"><label for="time_tracking">' . lang_get('time_tracking') . '</label></th>';
echo '<td colspan="5"><input type="text" id="time_tracking" name="time_tracking" size="5" placeholder="hh:mm" /></td></tr>';
}
}
event_signal('EVENT_BUGNOTE_ADD_FORM', array($t_bug_id));
示例7: helper_alternate_class
</td>
</tr>
<!-- Protected Checkbox -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('protected');
?>
</td>
<td>
<input type="checkbox" name="protected" <?php
check_checked($t_user['protected'], ON);
?>
/>
</td>
</tr>
<!-- Submit Button -->
<tr>
<td colspan="2" class="center">
<?php
if (config_get('enable_email_notification') == ON) {
echo lang_get('notify_user');
?>
<input type="checkbox" name="send_email_notification" checked />
<?php
}
示例8: print_project_option_list
print_project_option_list($v_project_id, $t_sitewide);
?>
</select>
</span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label for="news-update-announcement"><span><?php
echo lang_get('announcement');
?>
</span> <span class="help-text"><?php
echo lang_get('stays_on_top');
?>
</span></label>
<span class="checkbox"><input type="checkbox" id="news-update-announcement" name="announcement" <?php
check_checked((int) $v_announcement, 1);
?>
/></span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label for=""><span><?php
echo lang_get('view_status');
?>
</span></label>
<span class="select">
<select name="view_state">
<?php
print_enum_string_option_list('view_state', $v_view_state);
?>
</select>
示例9: check_checked
?>
</span></label>
<span class="checkbox"><input id="edit-enabled" type="checkbox" name="enabled" <?php
check_checked((int) $t_user['enabled'], ON);
?>
/></span>
<span class="label-style"></span>
</div>
<!-- Protected Checkbox -->
<div class="field-container">
<label for="edit-protected"><span><?php
echo lang_get('protected_label');
?>
</span></label>
<span class="checkbox"><input id="edit-protected" type="checkbox" name="protected" <?php
check_checked((int) $t_user['protected'], ON);
?>
/></span>
<span class="label-style"></span>
</div><?php
if (config_get('enable_email_notification') == ON) {
echo '<div class="field-container">';
echo '<label for="send-email"><span>' . lang_get('notify_user') . '</span></label>';
echo '<span class="checkbox"><input id="send-email" type="checkbox" name="send_email_notification" checked="checked" /></span>';
echo '<span class="label-style"></span>';
echo '</div>';
}
?>
<!-- Submit Button -->
<span class="submit-button"><input type="submit" class="button" value="<?php
echo lang_get('update_user_button');
示例10: helper_alternate_class
</td>
</tr>
<!-- Enabled -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('enabled');
?>
</td>
<td>
<input type="checkbox" name="enabled" <?php
check_checked($row['enabled'], ON);
?>
/>
</td>
</tr>
<!-- View Status (public/private) -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('view_status');
?>
</td>
示例11: check_checked
echo $c_dir;
?>
" />
<input type="hidden" name="save" value="1" />
<input type="hidden" name="filter" value="<?php
echo $c_filter;
?>
" />
<input type="checkbox" name="hideinactive" value="1" <?php
check_checked((int) $c_hide_inactive, 1);
?>
/> <?php
echo lang_get('hide_inactive');
?>
<input type="checkbox" name="showdisabled" value="1" <?php
check_checked((int) $c_show_disabled, 1);
?>
/> <?php
echo lang_get('show_disabled');
?>
<input type="submit" class="button" value="<?php
echo lang_get('filter_button');
?>
" />
</fieldset>
</form>
<table>
<thead>
<tr class="row-category">
<?php
示例12: lang_get
<?php
if (access_has_project_level(config_get('private_bugnote_threshold'), $t_project_id)) {
?>
<tr>
<th class="category">
<?php
echo lang_get('view_status');
?>
</th>
<td>
<?php
$t_default_bugnote_view_status = config_get('default_bugnote_view_status');
if (access_has_project_level(config_get('set_view_status_threshold'), $t_project_id)) {
?>
<input type="checkbox" name="private" <?php
check_checked($t_default_bugnote_view_status, VS_PRIVATE);
?>
/>
<?php
echo lang_get('private');
} else {
echo get_enum_element('project_view_state', $t_default_bugnote_view_status);
}
?>
</td>
</tr>
<?php
}
?>
<?php
示例13: print_filter_do_filter_by_date
function print_filter_do_filter_by_date($p_hide_checkbox = false)
{
global $t_filter;
?>
<table cellspacing="0" cellpadding="0">
<?php
if (!$p_hide_checkbox) {
?>
<tr><td colspan="2">
<input type="checkbox" name="do_filter_by_date" <?php
check_checked($t_filter['do_filter_by_date'], 'on');
if (ON == config_get('use_javascript')) {
print "onclick=\"SwitchDateFields();\"";
}
?>
/>
<?php
echo lang_get('use_date_filters');
?>
</td></tr>
<?php
}
$t_menu_disabled = 'on' == $t_filter['do_filter_by_date'] ? '' : ' disabled ';
?>
<!-- Start date -->
<tr>
<td>
<?php
echo lang_get('start_date');
?>
:
</td>
<td nowrap="nowrap">
<?php
$t_chars = preg_split('//', config_get('short_date_format'), -1, PREG_SPLIT_NO_EMPTY);
foreach ($t_chars as $t_char) {
if (strcasecmp($t_char, "M") == 0) {
print "<select name=\"start_month\" {$t_menu_disabled}>";
print_month_option_list($t_filter['start_month']);
print "</select>\n";
}
if (strcasecmp($t_char, "D") == 0) {
print "<select name=\"start_day\" {$t_menu_disabled}>";
print_day_option_list($t_filter['start_day']);
print "</select>\n";
}
if (strcasecmp($t_char, "Y") == 0) {
print "<select name=\"start_year\" {$t_menu_disabled}>";
print_year_option_list($t_filter['start_year']);
print "</select>\n";
}
}
?>
</td>
</tr>
<!-- End date -->
<tr>
<td>
<?php
echo lang_get('end_date');
?>
:
</td>
<td>
<?php
$t_chars = preg_split('//', config_get('short_date_format'), -1, PREG_SPLIT_NO_EMPTY);
foreach ($t_chars as $t_char) {
if (strcasecmp($t_char, "M") == 0) {
print "<select name=\"end_month\" {$t_menu_disabled}>";
print_month_option_list($t_filter['end_month']);
print "</select>\n";
}
if (strcasecmp($t_char, "D") == 0) {
print "<select name=\"end_day\" {$t_menu_disabled}>";
print_day_option_list($t_filter['end_day']);
print "</select>\n";
}
if (strcasecmp($t_char, "Y") == 0) {
print "<select name=\"end_year\" {$t_menu_disabled}>";
print_year_option_list($t_filter['end_year']);
print "</select>\n";
}
}
?>
</td>
</tr>
</table>
<?php
}
示例14: print_released
function print_released($edit_page, $version_index, $version)
{
echo '<td class="center">';
if ($edit_page) {
?>
<label for="proj-version-released-<?php
echo $version_index;
?>
">
<span class="checkbox"><input type="checkbox" id="proj-version-released-<?php
echo $version_index;
?>
"
name="released<?php
echo $version_index;
?>
" <?php
check_checked((int) $version['released'], ON);
?>
/></span>
</label>
<?php
} else {
echo trans_bool($version['released']);
}
echo '</td>';
}
示例15: helper_alternate_class
</td>
</tr>
<!-- Avatar -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('use_gravatar');
?>
:
</td>
<td>
<input type="checkbox" name="use_gravatar" <?php
check_checked($t_use_gravatar, ON);
?>
/>
</td>
</tr>
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('avatar');
?>
:
</td>
<td>