當前位置: 首頁>>代碼示例>>PHP>>正文


PHP profile_get_all_for_user函數代碼示例

本文整理匯總了PHP中profile_get_all_for_user函數的典型用法代碼示例。如果您正苦於以下問題:PHP profile_get_all_for_user函數的具體用法?PHP profile_get_all_for_user怎麽用?PHP profile_get_all_for_user使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了profile_get_all_for_user函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mc_user_profiles_get_all

/**
 * Returns all the profiles for the user, including the global ones
 *
 * @param string  $p_username    The user's username.
 * @param string  $p_password    The user's password.
 * @param integer $p_page_number Page number.
 * @param integer $p_per_page    Results per page.
 * @return mixed
 */
function mc_user_profiles_get_all($p_username, $p_password, $p_page_number, $p_per_page)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_results = array();
    $t_start = max(array(0, $p_page_number - 1)) * $p_per_page;
    foreach (profile_get_all_for_user($t_user_id) as $t_profile_row) {
        $t_result = array('id' => $t_profile_row['id'], 'description' => $t_profile_row['description'], 'os' => $t_profile_row['os'], 'os_build' => $t_profile_row['os_build'], 'platform' => $t_profile_row['platform']);
        if ($t_profile_row['user_id'] != 0) {
            $t_result['user_id'] = mci_account_get_array_by_id($t_profile_row['user_id']);
        }
        $t_results[] = $t_result;
    }
    # the profile_api does not implement pagination in the backend, so we emulate it here
    # we can always push the pagination in the database, but this seems unlikely in the
    # near future, as the number of profiles is expected to be small
    $t_paged_results = array_slice($t_results, $t_start, $p_per_page);
    return array('total_results' => count($t_results), 'results' => $t_paged_results);
}
開發者ID:gtn,項目名稱:mantisbt,代碼行數:33,代碼來源:mc_user_profile_api.php

示例2: print_profile_option_list

function print_profile_option_list($p_user_id, $p_select_id = '', $p_profiles = null)
{
    if ('' === $p_select_id) {
        $p_select_id = profile_get_default($p_user_id);
    }
    if ($p_profiles != null) {
        $t_profiles = $p_profiles;
    } else {
        $t_profiles = profile_get_all_for_user($p_user_id);
    }
    print_profile_option_list_from_profiles($t_profiles, $p_select_id);
}
開發者ID:nextgens,項目名稱:mantisbt,代碼行數:12,代碼來源:print_api.php

示例3: lang_get

		</td>
	</tr>
<?php 
}
if ($t_show_platform || $t_show_os || $t_show_os_version) {
    ?>
	<tr>
		<th class="category">
			<label for="profile_id"><?php 
    echo lang_get('select_profile');
    ?>
</label>
		</th>
		<td>
			<?php 
    if (count(profile_get_all_for_user(auth_get_current_user_id())) > 0) {
        ?>
				<select <?php 
        echo helper_get_tab_index();
        ?>
 id="profile_id" name="profile_id">
					<?php 
        print_profile_option_list(auth_get_current_user_id(), $f_profile_id);
        ?>
				</select>
			<?php 
    }
    ?>
		</td>
	</tr>
	<tr>
開發者ID:derrickweaver,項目名稱:mantisbt,代碼行數:31,代碼來源:bug_report_page.php

示例4: lang_get

		<input type="submit" class="button" value="<?php 
echo lang_get('add_profile_button');
?>
" />
	</td>
</tr>
</table>
</form>
</div>
<?php 
# Add Profile Form END
?>

<?php 
# Edit or Delete Profile Form BEGIN
$t_profiles = profile_get_all_for_user($t_user_id);
if ($t_profiles) {
    ?>
<br />
<div align="center">
<form method="post" action="account_prof_update.php">
<?php 
    echo form_security_field('profile_update');
    ?>
<table class="width75" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
    echo lang_get('edit_or_delete_profiles_title');
    ?>
	</td>
開發者ID:amjadtbssm,項目名稱:website,代碼行數:31,代碼來源:account_prof_menu_page.php

示例5: print_profile_option_list

function print_profile_option_list($p_user_id, $p_select_id = '')
{
    if ('' === $p_select_id) {
        $p_select_id = profile_get_default($p_user_id);
    }
    $t_profiles = profile_get_all_for_user($p_user_id);
    print '<option value=""></option>';
    foreach ($t_profiles as $t_profile) {
        extract($t_profile, EXTR_PREFIX_ALL, 'v');
        $v_platform = string_display($v_platform);
        $v_os = string_display($v_os);
        $v_os_build = string_display($v_os_build);
        print "<option value=\"{$v_id}\"";
        check_selected($p_select_id, $v_id);
        print ">{$v_platform} {$v_os} {$v_os_build}</option>";
    }
}
開發者ID:centaurustech,項目名稱:BenFund,代碼行數:17,代碼來源:print_api.php


注:本文中的profile_get_all_for_user函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。