print "<td class=form-header-l colspan=3>" . lang_get('add_new_user') . "</td>" . NEWLINE; print "</tr>" . NEWLINE; ###################################################################################################### # username label, username field, projects label print "<tr>" . NEWLINE; print "<td class=form-lbl-r width='33%'>" . lang_get('username') . "<span class='required'>*</span></td>" . NEWLINE; print "<td class=form-lbl-l width='33%'><input tabindex=10 type=text name='username_required' maxlength=25 value='" . session_validate_form_get_field("username_required") . "'></td>" . NEWLINE; print "<td class=form-lbl-l width='33%'>" . lang_get('add_to_projects') . "<span class='required'>*</span></td>" . NEWLINE; print "</tr>" . NEWLINE; # first name label, first name field, projects select box print "<tr>" . NEWLINE; print "<td class=form-lbl-r>" . lang_get('first_name') . "<span class='required'>*</span></td>" . NEWLINE; print "<td class=form-lbl-l><input tabindex=20 type=text name='first_name_required' maxlength=50 value='" . session_validate_form_get_field("first_name_required") . "' ></td>" . NEWLINE; # Projects $project_names_array = array(); $projects = project_get_all_projects_details(PROJ_NAME, "ASC"); foreach ($projects as $project_row) { $project_names_array[$project_row[PROJ_ID]] = $project_row[PROJ_NAME]; } # rowspan is the number of rows the select projects box spans print "<td class=form-lbl-l width='33%' rowspan=6 valign=top>" . NEWLINE; print "<select tabindex=100 name='user_add_to_projects_required[]' size=10 multiple>" . NEWLINE; html_print_list_box_from_key_array($project_names_array, session_validate_form_get_field("user_add_to_projects_required")); print "</select>" . NEWLINE; print "</td>" . NEWLINE; print "</tr>" . NEWLINE; ###################################################################################################### print "<tr>" . NEWLINE; print "<td class=form-lbl-r>" . lang_get('last_name') . "<span class='required'>*</span></td>" . NEWLINE; print "<td class=form-lbl-l><input tabindex=25 type=text name='last_name_required' maxlength=50 value='" . session_validate_form_get_field("last_name_required") . "' ></td>" . NEWLINE; print "</tr>" . NEWLINE;
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; }
$project_name = $s_project_properties['project_name']; $project_id = $s_project_properties['project_id']; $s_user_properties = session_get_user_properties(); $user_id = $s_user_properties['user_id']; $row_style = ''; session_validate_form_reset(); html_window_title(); html_print_body(); html_page_title($project_name . " - " . lang_get("manage_projects_page")); html_page_header($db, $project_name); html_print_menu(); admin_menu_print($page, $project_id, $user_id); $s_table_options = session_set_display_options("admin", $_POST); $order_by = $s_table_options['order_by']; $order_dir = $s_table_options['order_dir']; $rows_project_details = project_get_all_projects_details($order_by, $order_dir); print "<br>"; print "<div align=center>" . NEWLINE; if (!empty($rows_project_details)) { print "<table id='sortabletable' class='sortable' rules=cols>" . NEWLINE; print "<thead>" . NEWLINE; print "<tr class=tbl_header>" . NEWLINE; #html_tbl_print_header( lang_get('project_name'), PROJ_NAME, $order_by, $order_dir, $page ); #html_tbl_print_header( lang_get('status'), PROJ_STATUS, $order_by, $order_dir, $page ); #html_tbl_print_header( lang_get('date_created'), PROJ_DATE_CREATED, $order_by, $order_dir, $page ); #html_tbl_print_header( lang_get('description') ); #html_tbl_print_header( lang_get('delete') ); html_tbl_print_header(lang_get('project_name')); html_tbl_print_header_not_sortable(lang_get('status')); html_tbl_print_header(lang_get('date_created')); html_tbl_print_header(lang_get('description'));