<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_PROJECT_TRANSVIEW';
$path_to_root = "../..";

include($path_to_root . "/includes/session.inc");



include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/gl/includes/gl_db.inc");
include_once($path_to_root . "/includes/db/approval_functions_db.inc");

$js = '';
if ($SysPrefs->use_popup_windows) {
	$js .= get_js_open_window(900, 500);
}

if (user_use_date_picker()) {
	$js .= get_js_date_picker();
}

page(_($help_context = "View Approval Group"), true, false, "", $js);


if (isset($_GET["trans_no"]))
{
	$trans_no = $_GET["trans_no"];
}
function display_row($name, $value)
{
    start_row();        
    label_cells($name, $value, "width=70px class='tableheader2'", "width=60px");
    end_row();
    
}
if (isset($_GET["type_id"]))
{
    $type_id = $_GET["type_id"];
}

if (isset($_GET["source_type_id"]))
{
    $source_type_id = $_GET["source_type_id"];
}
global $approval_statuses;

$approval_group = get_approval_group($trans_no);

//start_table(TABLESTYLE, "width=90%");
//
//$th = array(_(""), _(""),_(""));
//
//display_heading('Approval Group' . " #$trans_no");
////table_header($th);

//display_row("Id:",$approval_group['approval_group_id']);
//display_row("Approval Group Code:",$approval_group['approval_group_code']);
//display_row("Approval Group Name:",$approval_group['approval_group_description']);
//
//end_table(1);

$approval_group_text  = $approval_group['approval_group_code']." - ".$approval_group['approval_group_description'];
display_heading2('Approval Group: ' .$approval_group_text);

br();

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

$th = array(_("User Name"));

display_heading('Approvers');
table_header($th);
$approver_data = get_approvers($trans_no);
$k = 0;
while ($app_line = db_fetch($approver_data))
{
    label_cell($app_line['real_name']);
    end_row();
	
}

end_table(1);
//
//is_voided_display(ST_LOCTRANSFER, $trans_no, _("This transfer has been voided."));

end_page(true, false, false, ST_MATERIAL_REQ, $trans_no);
?>