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

PHP string_attribute函数代码示例

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

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



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

示例1: bug_group_action_print_bug_list

/**
 * Print the list of selected issues and the legend for the status colors.
 *
 * @param $p_bug_ids_array   An array of issue ids.
 */
function bug_group_action_print_bug_list($p_bug_ids_array)
{
    $t_legend_position = config_get('status_legend_position');
    if (STATUS_LEGEND_POSITION_TOP == $t_legend_position) {
        html_status_legend();
        echo '<br />';
    }
    echo '<div align="center">';
    echo '<table class="width75" cellspacing="1">';
    echo '<tr class="row-1">';
    echo '<td class="category" colspan="2">';
    echo lang_get('actiongroup_bugs');
    echo '</td>';
    echo '</tr>';
    $t_i = 1;
    foreach ($p_bug_ids_array as $t_bug_id) {
        $t_class = sprintf("row-%d", $t_i++ % 2 + 1);
        echo sprintf("<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n", get_status_color(bug_get_field($t_bug_id, 'status')), string_get_bug_view_link($t_bug_id), string_attribute(bug_get_field($t_bug_id, 'summary')));
    }
    echo '</table>';
    echo '</form>';
    echo '</div>';
    if (STATUS_LEGEND_POSITION_BOTTOM == $t_legend_position) {
        echo '<br />';
        html_status_legend();
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:32,代码来源:bug_group_action_api.php


示例2: kanban_ajax_button_bug_change_status

/**
 * Print Change Status to: AJAXified button
 * This code is similar to button_bug_change_status except that the 
 * button is AJAXified.
 * Uses projax.php
 *
 * @param int $p_bug_id
 * @param int $t_project_id
 * @param int $t_user_id
 * @return null
 */
function kanban_ajax_button_bug_change_status($p_bug_id, $t_project_id, $t_user_id)
{
    global $g_projax;
    $t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
    $t_bug_current_state = bug_get_field($p_bug_id, 'status');
    $t_current_access = access_get_project_level($t_bug_project_id);
    $t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'), $t_bug_project_id);
    if (count($t_enum_list) > 0) {
        # resort the list into ascending order after noting the key from the first element (the default)
        $t_default_arr = each($t_enum_list);
        $t_default = $t_default_arr['key'];
        ksort($t_enum_list);
        reset($t_enum_list);
        echo "<div id=\"ajax_statuschange\"><form method=\"post\" id=\"ajax_status_form\" action=\"xmlhttprequest.php\">";
        # CSRF protection not required here - form does not result in modifications
        echo "<input type=\"hidden\" name=\"project_id\" id=\"project_id\" value=\"{$t_project_id}\" />";
        echo "<input type=\"hidden\" name=\"user_id\" id=\"user_id\" value=\"{$t_user_id}\" />";
        echo "<input type=\"hidden\" name=\"entrypoint\" id=\"entrypoint\" value=\"bug_update_status\" />";
        $t_button_text = lang_get('bug_status_to_button');
        // AJAX button options
        $options = array('url' => plugin_page('kanban_ajax_request'), 'with' => true, 'confirm' => lang_get('confirm_change_status'), 'success' => 'location.reload()', 'failure' => 'alert("Error: " ' + request . status + ')');
        echo $g_projax->submit_to_remote('ajax_status', $t_button_text, $options);
        echo " <select name=\"new_status\">";
        # space at beginning of line is important
        foreach ($t_enum_list as $key => $val) {
            echo "<option value=\"{$key}\" ";
            check_selected($key, $t_default);
            echo ">{$val}</option>";
        }
        echo '</select>';
        $t_bug_id = string_attribute($p_bug_id);
        echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
        echo "</form></div>\n";
    }
}
开发者ID:aberad,项目名称:MantisKanban,代码行数:46,代码来源:kanban_api.php


示例3: print_option_list_from_array

function print_option_list_from_array($p_array, $p_filter_value)
{
    foreach ($p_array as $t_key => $t_value) {
        echo "<option value='{$t_key}'";
        check_selected($p_filter_value, $t_key);
        echo '>' . string_attribute($t_value) . "</option>\n";
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:8,代码来源:adm_config_report.php


示例4: projax_array_serialize_for_autocomplete

function projax_array_serialize_for_autocomplete($p_array)
{
    $t_matches = '<ul>';
    foreach ($p_array as $t_entry) {
        $t_matches .= '<li>' . string_attribute($t_entry) . '</li>';
    }
    $t_matches .= '</ul>';
    return $t_matches;
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:9,代码来源:projax_api.php


示例5: prepare_email_link

/**
 * return the mailto: href string link
 * @param string $p_email
 * @param string $p_text
 * @return string
 */
function prepare_email_link($p_email, $p_text)
{
    if (!access_has_project_level(config_get('show_user_email_threshold'))) {
        return string_display_line($p_text);
    }
    # If we apply string_url() to the whole mailto: link then the @
    #  gets turned into a %40 and you can't right click in browsers to
    #  do Copy Email Address.
    $t_mailto = string_attribute('mailto:' . $p_email);
    $p_text = string_display_line($p_text);
    return '<a href="' . $t_mailto . '">' . $p_text . '</a>';
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:18,代码来源:prepare_api.php


示例6: prepare_email_link

function prepare_email_link($p_email, $p_text)
{
    if (!access_has_project_level(config_get('show_user_email_threshold'))) {
        return $p_text;
    }
    # If we apply string_url() to the whole mailto: link then the @
    #  gets turned into a %40 and you can't right click in browsers to
    #  do Copy Email Address.
    $t_mailto = string_attribute("mailto:{$p_email}");
    $p_text = string_display($p_text);
    return "<a href=\"{$t_mailto}\">{$p_text}</a>";
}
开发者ID:amjadtbssm,项目名称:website,代码行数:12,代码来源:prepare_api.php


示例7: custom_function_default_format_issue_summary

function custom_function_default_format_issue_summary($p_issue_id, $p_context = 0)
{
    switch ($p_context) {
        case SUMMARY_CAPTION:
            $t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
            break;
        case SUMMARY_FIELD:
            $t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
            break;
        case SUMMARY_EMAIL:
            $t_string = bug_format_id($p_issue_id) . ': ' . string_attribute(bug_get_field($p_issue_id, 'summary'));
            break;
        default:
            $t_string = string_attribute(bug_get_field($p_issue_id, 'summary'));
            break;
    }
    return $t_string;
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:18,代码来源:custom_function_api.php


示例8: update_repo_form

    public function update_repo_form($p_repo)
    {
        $t_sf_project = isset($p_repo->info['sf_project']) ? $p_repo->info['sf_project'] : '';
        ?>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
<td class="category"><?php 
        echo lang_get('plugin_SourceSFSVN_sf_project');
        ?>
</td>
<td><input name="sf_project" maxlength="250" size="40" value="<?php 
        echo string_attribute($t_sf_project);
        ?>
"/></td>
</tr>
<?php 
        return parent::update_repo_form($p_repo);
    }
开发者ID:01-Scripts,项目名称:source-integration,代码行数:20,代码来源:SourceSFSVN.php


示例9: cfdef_input_textbox

function cfdef_input_textbox($p_field_def, $t_custom_field_value)
{
    echo '<input ' . helper_get_tab_index() . ' type="text" id="custom_field_' . $p_field_def['id'] . '" name="custom_field_' . $p_field_def['id'] . '" size="80"';
    if (0 < $p_field_def['length_max']) {
        echo ' maxlength="' . $p_field_def['length_max'] . '"';
    } else {
        echo ' maxlength="255"';
    }
    echo ' value="' . string_attribute($t_custom_field_value) . '"></input>';
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:10,代码来源:cfdef_standard.php


示例10: string_attribute

        $t_custom_fields_found = true;
        ?>
	<tr>
		<th class="category">
			<?php 
        if ($t_def['require_report']) {
            ?>
				<span class="required">*</span>
			<?php 
        }
        ?>
			<?php 
        if ($t_def['type'] != CUSTOM_FIELD_TYPE_RADIO && $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX) {
            ?>
				<label for="custom_field_<?php 
            echo string_attribute($t_def['id']);
            ?>
"><?php 
            echo string_display(lang_get_defaulted($t_def['name']));
            ?>
</label>
			<?php 
        } else {
            echo string_display(lang_get_defaulted($t_def['name']));
        }
        ?>
		</th>
		<td>
			<?php 
        print_custom_field_input($t_def, $f_master_bug_id === 0 ? null : $f_master_bug_id);
        ?>
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_report_page.php


示例11: print_bug_attachments_list

function print_bug_attachments_list($p_bug_id)
{
    $t_attachments = file_get_visible_attachments($p_bug_id);
    $t_attachments_count = count($t_attachments);
    $i = 0;
    $image_previewed = false;
    foreach ($t_attachments as $t_attachment) {
        $t_file_display_name = string_display_line($t_attachment['display_name']);
        $t_filesize = number_format($t_attachment['size']);
        $t_date_added = date(config_get('normal_date_format'), $t_attachment['date_added']);
        if ($image_previewed) {
            $image_previewed = false;
            echo '<br />';
        }
        if ($t_attachment['can_download']) {
            $t_href_start = '<a href="' . string_attribute($t_attachment['download_url']) . '">';
            $t_href_end = '</a>';
            $t_href_clicket = " [<a href=\"file_download.php?file_id={$t_attachment['id']}&amp;type=bug\" target=\"_blank\">^</a>]";
        } else {
            $t_href_start = '';
            $t_href_end = '';
            $t_href_clicket = '';
        }
        if (!$t_attachment['exists']) {
            print_file_icon($t_file_display_name);
            echo '&#160;<span class="strike">' . $t_file_display_name . '</span>' . lang_get('word_separator') . '(' . lang_get('attachment_missing') . ')';
        } else {
            echo $t_href_start;
            print_file_icon($t_file_display_name);
            echo $t_href_end . '&#160;' . $t_href_start . $t_file_display_name . $t_href_end . $t_href_clicket . ' (' . $t_filesize . ' ' . lang_get('bytes') . ') ' . '<span class="italic">' . $t_date_added . '</span>';
        }
        if ($t_attachment['can_delete']) {
            echo '&#160;[';
            print_link('bug_file_delete.php?file_id=' . $t_attachment['id'] . form_security_param('bug_file_delete'), lang_get('delete_link'), false, 'small');
            echo ']';
        }
        if ($t_attachment['exists']) {
            if (FTP == config_get('file_upload_method') && $t_attachment['exists']) {
                echo ' (' . lang_get('cached') . ')';
            }
            if ($t_attachment['preview'] && $t_attachment['type'] == 'text') {
                $c_id = db_prepare_int($t_attachment['id']);
                $t_bug_file_table = db_get_table('mantis_bug_file_table');
                echo "<script type=\"text/javascript\" language=\"JavaScript\">\n<!--\nfunction swap_content( span ) {\ndisplayType = ( document.getElementById( span ).style.display == 'none' ) ? '' : 'none';\ndocument.getElementById( span ).style.display = displayType;\n}\n\n -->\n </script>";
                echo " <span id=\"hideSection_{$c_id}\">[<a class=\"small\" href='#' id='attmlink_" . $c_id . "' onclick='swap_content(\"hideSection_" . $c_id . "\");swap_content(\"showSection_" . $c_id . "\");return false;'>" . lang_get('show_content') . "</a>]</span>";
                echo " <span style='display:none' id=\"showSection_{$c_id}\">[<a class=\"small\" href='#' id='attmlink_" . $c_id . "' onclick='swap_content(\"hideSection_" . $c_id . "\");swap_content(\"showSection_" . $c_id . "\");return false;'>" . lang_get('hide_content') . "</a>]";
                echo "<pre>";
                /** @todo Refactor into a method that gets contents for download / preview. */
                switch (config_get('file_upload_method')) {
                    case DISK:
                        if ($t_attachment['exists']) {
                            $v_content = file_get_contents($t_attachment['diskfile']);
                        }
                        break;
                    case FTP:
                        if (file_exists($t_attachment['exists'])) {
                            file_get_contents($t_attachment['diskfile']);
                        } else {
                            $ftp = file_ftp_connect();
                            file_ftp_get($ftp, $t_attachment['diskfile'], $t_attachment['diskfile']);
                            file_ftp_disconnect($ftp);
                            $v_content = file_get_contents($t_attachment['diskfile']);
                        }
                        break;
                    default:
                        $query = "SELECT *\n\t                  \t\t\t\t\tFROM {$t_bug_file_table}\n\t\t\t\t            \t\t\tWHERE id=" . db_param();
                        $result = db_query_bound($query, array($c_id));
                        $row = db_fetch_array($result);
                        $v_content = $row['content'];
                }
                echo htmlspecialchars($v_content);
                echo "</pre></span>\n";
            }
            if ($t_attachment['can_download'] && $t_attachment['preview'] && $t_attachment['type'] == 'image') {
                $t_preview_style = 'border: 0;';
                $t_max_width = config_get('preview_max_width');
                if ($t_max_width > 0) {
                    $t_preview_style .= ' max-width:' . $t_max_width . 'px;';
                }
                $t_max_height = config_get('preview_max_height');
                if ($t_max_height > 0) {
                    $t_preview_style .= ' max-height:' . $t_max_height . 'px;';
                }
                $t_preview_style = 'style="' . $t_preview_style . '"';
                $t_title = file_get_field($t_attachment['id'], 'title');
                $t_image_url = $t_attachment['download_url'] . '&amp;show_inline=1' . form_security_param('file_show_inline');
                echo "\n<br />{$t_href_start}<img alt=\"{$t_title}\" {$t_preview_style} src=\"{$t_image_url}\" />{$t_href_end}";
                $image_previewed = true;
            }
        }
        if ($i != $t_attachments_count - 1) {
            echo "<br />\n";
            $i++;
        }
    }
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:96,代码来源:print_api.php


示例12: print_multivalue_field

/**
 * Prints a multi-value filter field.
 * @param string $p_field_name  Field name.
 * @param mixed  $p_field_value Field value.
 * @return void
 */
function print_multivalue_field($p_field_name, $p_field_value)
{
    $t_output = '';
    $t_any_found = false;
    if (count($p_field_value) == 0) {
        echo lang_get('any');
    } else {
        $t_first_flag = true;
        $t_field_value = is_array($p_field_value) ? $p_field_value : array($p_field_value);
        foreach ($t_field_value as $t_current) {
            $t_current = stripslashes($t_current);
            ?>
				<input type="hidden" name="<?php 
            echo string_attribute($p_field_name);
            ?>
[]" value="<?php 
            echo string_attribute($t_current);
            ?>
" />
				<?php 
            $t_this_string = '';
            if ($t_current == META_FILTER_ANY && is_numeric($t_current) || is_blank($t_current)) {
                $t_any_found = true;
            } else {
                $t_this_string = string_display($t_current);
            }
            if ($t_first_flag != true) {
                $t_output .= '<br />';
            } else {
                $t_first_flag = false;
            }
            $t_output .= $t_this_string;
        }
        if (true == $t_any_found) {
            echo lang_get('any');
        } else {
            echo $t_output;
        }
    }
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:46,代码来源:filter_api.php


示例13: config_get

# --------------------------------------------------------
# $Id: manage_custom_field_delete.php,v 1.17.2.1 2007-10-13 22:33:27 giallu Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'custom_field_api.php';
form_security_validate('manage_custom_field_delete');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_custom_fields_threshold'));
$f_field_id = gpc_get_int('field_id');
$f_return = strip_tags(gpc_get_string('return', 'manage_custom_field_page.php'));
$t_definition = custom_field_get_definition($f_field_id);
if (0 < count(custom_field_get_project_ids($f_field_id))) {
    helper_ensure_confirmed(lang_get('confirm_used_custom_field_deletion') . '<br/>' . lang_get('custom_field') . ': ' . string_attribute($t_definition['name']), lang_get('field_delete_button'));
} else {
    helper_ensure_confirmed(lang_get('confirm_custom_field_deletion') . '<br/>' . lang_get('custom_field') . ': ' . string_attribute($t_definition['name']), lang_get('field_delete_button'));
}
custom_field_destroy($f_field_id);
form_security_purge('manage_custom_field_delete');
html_page_top1();
html_meta_redirect($f_return);
html_page_top2();
?>

<br />
<div align="center">
<?php 
echo lang_get('operation_successful') . '<br />';
print_bracket_link($f_return, lang_get('proceed'));
?>
</div>
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:manage_custom_field_delete.php


示例14: print_documentation_link

print_documentation_link('category');
?>
	</td>
	<td width="70%">
		<?php 
if ($t_changed_project) {
    echo "[" . project_get_field($t_bug->project_id, 'name') . "] ";
}
?>
		<select <?php 
echo helper_get_tab_index();
?>
 name="category">
			<?php 
if (is_blank($f_category)) {
    echo '<option value="" selected="selected">', string_attribute(lang_get('select_option')), '</option>';
}
print_category_option_list($f_category);
?>
		</select>
	</td>
</tr>


<!-- Reproducibility -->
<tr <?php 
echo helper_alternate_class();
?>
>
	<td class="category">
		<?php 
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:bug_report_page.php


示例15: helper_alternate_class

?>
	<tr <?php 
echo helper_alternate_class();
?>
>
		<td class="category">
			<span class="required">*</span><?php 
print_documentation_link('summary');
?>
		</td>
		<td>
			<input <?php 
echo helper_get_tab_index();
?>
 type="text" name="summary" size="105" maxlength="128" value="<?php 
echo string_attribute($f_summary);
?>
" />
		</td>
	</tr>
	<tr <?php 
echo helper_alternate_class();
?>
>
		<td class="category">
			<span class="required">*</span><?php 
print_documentation_link('description');
?>
		</td>
		<td>
			<textarea <?php 
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:bug_report_page.php


示例16: print_column_summary

function print_column_summary($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_icon_path;
    $t_summary = string_attribute($p_row['summary']);
    echo '<td class="left">', $t_summary;
    if (VS_PRIVATE == $p_row['view_state']) {
        printf(' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get('private'), lang_get('private'));
    }
    echo '</td>';
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:10,代码来源:columns_api.php


示例17: lang_get

# lost password feature disabled or reset password via email disabled -> stop here!
if (LDAP != config_get_global('login_method') && ON == config_get('lost_password_feature') && ON == config_get('send_reset_password') && ON == config_get('enable_email_notification')) {
    echo '<li><a href="lost_pwd_page.php">', lang_get('lost_password_link'), '</a></li>';
}
?>
			</ul>
			<div class="field-container">
				<label for="username"><span><?php 
echo lang_get('username');
?>
</span></label>
				<span class="input"><input id="username" type="text" name="username" size="32" maxlength="<?php 
echo DB_FIELD_SIZE_USERNAME;
?>
" value="<?php 
echo string_attribute($f_username);
?>
" class="<?php 
echo $t_username_field_autofocus;
?>
" /></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container">
				<label for="password"><span><?php 
echo lang_get('password');
?>
</span></label>
				<span class="input"><input id="password" type="password" name="password" size="32" maxlength="<?php 
echo auth_get_password_max_size();
?>
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:login_page.php


示例18: get_capability_row_for_email

    }
    get_capability_row_for_email(lang_get('email_on_relationship_changed'), 'relation');
    $t_statuses = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
    foreach ($t_statuses as $t_status => $t_label) {
        get_capability_row_for_email(lang_get('status_changed_to') . ' \'' . get_enum_element('status', $t_status) . '\'', $t_label);
    }
    get_section_end_for_email();
    if ($g_can_change_flags || $g_can_change_defaults) {
        echo '<p>' . lang_get('notify_actions_change_access') . "\n";
        echo '<select name="notify_actions_access">' . "\n";
        print_enum_string_option_list('access_levels', config_get_access('notify_flags'));
        echo "\n</select></p>";
        echo '<input type="submit" class="button" value="' . lang_get('change_configuration') . '" />' . "\n";
        echo "</form>\n";
        echo '<div class="right">' . "\n";
        echo '<form id="mail_config_action" method="post" action="manage_config_revert.php">' . "\n";
        echo form_security_field('manage_config_revert') . "\n";
        echo '<input name="revert" type="hidden" value="notify_flags,default_notify_flags" />' . "\n";
        echo '<input name="project" type="hidden" value="' . $t_project . '" />' . "\n";
        echo '<input name="return" type="hidden" value="' . string_attribute(form_action_self()) . '" />' . "\n";
        echo '<input type="submit" class="button" value="';
        if (ALL_PROJECTS == $t_project) {
            echo lang_get('revert_to_system');
        } else {
            echo lang_get('revert_to_all_project');
        }
        echo '" />' . "\n";
        echo "</form></div>\n";
    }
}
html_page_bottom();
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:manage_config_email_page.php


示例19: require_api

require_api('string_api.php');
require_api('utility_api.php');
# Check if project documentation feature is enabled.
if (OFF == config_get('enable_project_documentation') || !file_is_uploading_enabled() || !file_allow_project_upload()) {
    access_denied();
}
$f_file_id = gpc_get_int('file_id');
$c_file_id = db_prepare_int($f_file_id);
$t_project_id = file_get_field($f_file_id, 'project_id', 'project');
access_ensure_project_level(config_get('upload_project_file_threshold'), $t_project_id);
$t_proj_file_table = db_get_table('project_file');
$query = "SELECT *\n\t\tFROM {$t_proj_file_table}\n\t\tWHERE id=" . db_param();
$result = db_query_bound($query, array($c_file_id));
$row = db_fetch_array($result);
extract($row, EXTR_PREFIX_ALL, 'v');
$v_title = string_attribute($v_title);
$v_description = string_textarea($v_description);
$t_max_file_size = (int) min(ini_get_number('upload_max_filesize'), ini_get_number('post_max_size'), config_get('max_file_size'));
html_page_top();
?>

<br />
<div>
<form method="post" enctype="multipart/form-data" action="proj_doc_update.php">
<?php 
echo form_security_field('proj_doc_update');
?>
<table class="width75" cellspacing="1">
<tr>
	<td class="form-title">
		<input type="hidden" name="file_id" value="<?php 
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:proj_doc_edit_page.php


示例20: mc_project_get_users

/**
 * Get appropriate users assigned to a project by access level.
 *
 * @param string $p_username  The name of the user trying to access the versions.
 * @param string $p_password  The password of the user.
 * @param integer $p_project_id  The id of the project to retrieve the users for.
 * @param integer $p_access Minimum access level.
 * @return Array  representing a ProjectAttachmentDataArray structure.
 */
function mc_project_get_users($p_username, $p_password, $p_project_id, $p_access)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    $t_users = array();
    $t_users = project_get_all_user_rows($p_project_id, $p_access);
    # handles ALL_PROJECTS case
    $t_display = array();
    $t_sort = array();
    $t_show_realname = ON == config_get('show_realname');
    $t_sort_by_last_name = ON == config_get('sort_by_last_name');
    foreach ($t_users as $t_user) {
        $t_user_name = string_attribute($t_user['username']);
        $t_sort_name = strtolower($t_user_name);
        if ($t_show_realname && $t_user['realname'] != "") {
            $t_user_name = string_attribute($t_user['realname']);
            if ($t_sort_by_last_name) {
                $t_sort_name_bits = explode(' ', strtolower($t_user_name), 2);
                $t_sort_name = (isset($t_sort_name_bits[1]) ? $t_sort_name_bits[1] . ', ' : '') . $t_sort_name_bits[0];
            } else {
                $t_sort_name = strtolower($t_user_name);
            }
        }
        $t_display[] = $t_user_name;
        $t_sort[] = $t_sort_name;
    }
    array_multisort($t_sort, SORT_ASC, SORT_STRING, $t_users, $t_display);
    $t_result = array();
    for ($i = 0; $i < count($t_sort); $i++) {
        $t_row = $t_users[$i];
        // This is not very performant - But we have to assure that the data returned is exactly
        // the same as the data that comes with an issue (test for equality - $t_row[] does not
        // contain email fields).
        $t_result[] = mci_account_get_array_by_id($t_row['id']);
    }
    return $t_result;
}
开发者ID:kaos,项目名称:mantisbt,代码行数:48,代码来源:mc_project_api.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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