function print_project_user_list_option_list($p_project_id = null) { $t_users = user_get_unassigned_by_project_id($p_project_id); foreach ($t_users as $t_id => $t_name) { echo '<option value="' . $t_id . '">' . $t_name . '</option>'; } }
<?php # You need global or project-specific permissions to remove users # from this project if (!$f_show_global_users) { print_button("manage_proj_edit_page.php?project_id={$f_project_id}&show_global_users=true", lang_get('show_global_users')); } else { print_button("manage_proj_edit_page.php?project_id={$f_project_id}", lang_get('hide_global_users')); } if ($t_removable_users_exist) { echo ' '; print_button("manage_proj_user_remove.php?project_id={$f_project_id}", lang_get('remove_all_link')); } # We want to allow people with global permissions and people with high enough # permissions on the project we are editing if ($t_can_manage_users) { $t_users = user_get_unassigned_by_project_id($f_project_id); if (count($t_users) > 0) { ?> <form id="manage-project-add-user-form" method="post" action="manage_proj_user_add.php"> <fieldset> <legend><span><?php echo lang_get('add_user_title'); ?> </span></legend> <?php echo form_security_field('manage_proj_user_add'); ?> <input type="hidden" name="project_id" value="<?php echo $f_project_id; ?> " />