# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ---------------------------------------------------------------------
# User Edit Page
#
# $RCSfile: user_edit_page.php,v $  $Revision: 1.5 $
# ---------------------------------------------------------------------
$display_options = session_set_display_options("user_edit", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
$page_number = $display_options['page_number'];
$row_style = '';
$user_assoc_project_names = array();
$rows_user_projects = user_get_projects_info($selected_user_id, $order_by, $order_dir);
$user_info = user_get_info($selected_user_id);
$selected_username = $user_info[USER_UNAME];
$selected_firstname = $user_info[USER_FNAME];
$selected_lastname = $user_info[USER_LNAME];
$selected_email = $user_info[USER_EMAIL];
$selected_phone = $user_info[USER_PHONE];
$selected_email = $user_info[USER_EMAIL];
$selected_admin = $user_info[USER_ADMIN];
$tempest_admin = user_has_rights($project_id, $user_id, ADMIN);
$selected_user_tempest_admin = user_has_rights($project_id, $selected_user_id, ADMIN);
$user_associated_project_names = array();
foreach ($rows_user_projects as $row_user_project) {
    $user_associated_project_names[$row_user_project[PROJ_ID]] = $row_user_project[PROJ_NAME];
}
html_window_title();
Пример #2
0
function user_get_unassociated_projects($user_id, $order_by = null, $order_dir = null)
{
    $match_found = false;
    $all_projects = project_get_all_projects_details($order_by, $order_dir);
    $user_projects = user_get_projects_info($user_id);
    $add_to_projects = array();
    foreach ($all_projects as $project_row) {
        foreach ($user_projects as $user_project_row) {
            if ($project_row[PROJ_NAME] == $user_project_row[PROJ_NAME]) {
                $match_found = true;
            }
        }
        if (!$match_found) {
            $add_to_projects[] = $project_row[PROJ_NAME];
        }
        $match_found = false;
    }
    return $add_to_projects;
}