<?php


function display_user_project_access_inquiry_selecting_parameters() {       
    start_table(TABLESTYLE_NOBORDER);
        start_row();
            user_list_cells(_("User:"), 'user_id', null, '', true);
            project_list_cells('Project:', 'project_id', null, '', true);
            value_list_cells('Data Access Group:', 'dag_id', "DATA_ACCESS_GROUPS", null, '', true);
            submit_cells('Search', _("Search"), '', _('Search'), 'default');
        end_row();
    end_table(2);
}

function display_user_project_access_inquiry($project_id, $user_id, $dag_id) { 
    div_start('trans_tbl');

        start_table(TABLESTYLE, "width=80%");

            $th = array(_("User"),_("Inactive"), _("Project Id"),_("Project"),_("Data Access Group"));
            table_header($th);

            $k = $j = 0; //row colour counter

            $result = get_user_project_access_inquiry($project_id, $user_id, $dag_id);
                while ($myrow = db_fetch($result)) {
                    if ($j >= 20) {
                        table_header($th);
                        $j = 0;
                    }
                    alt_table_row_color($k);
                        label_cell($myrow["real_name"]);
                        label_cell(get_yes_no_name($myrow["inactive"]), "align=center");
                        label_cell($myrow["project_id"], "align=center");
                        label_cell($myrow["project_name"]);
                        label_cell($myrow["data_acc_group_name"]);
                    end_row();
                    
                    $j++;
                }

        end_table(2);
        
    div_end();
}     

?>