<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_EST_COMPETITOR_INQ';
if (!@$_GET['popup'])
	$path_to_root = "../..";
else	
	$path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_types_db.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");
//include_once($path_to_root . "/inventory/includes/inventory_db.inc");
include_once($path_to_root . "/estimation/includes/db/est_project_competitors_db.inc");
include_once($path_to_root . "/includes/ui/ui_lists_estimation.inc");
include_once($path_to_root . "/includes/db/group_companies_db.inc");

include_once($path_to_root . "/estimation/includes/ui/est_project_status_view_ui.inc");



$js = '';

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


        page(_($help_context = "Estimation Project Competitor Inquiry"),false,false,"",$js);

//---------------------------------------------------------------------------------------------------

//check_db_has_projects(_("There are no projects defined in the system."));

simple_page_mode(true);
//---------------------------------------------------------------------------------------------------
$input_error = 0;

if (isset($_GET['est_project_id']))
{
	$_POST['est_project_id'] = $_GET['est_project_id'];
}



//--------------------------------------------------------------------------------------------------------
//$tasks = get_task($_POST['project_id']);

if (!@$_GET['popup'])
	start_form();

	br(2);
    
        
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    est_project_list_cells(_("Estimated Project:"), 'est_project_id', null, _('Select an Estimated Project'), true);


    end_row();
    end_table();

    br();

        
$est_project_id = $_POST['est_project_id'];
display_competitors_inquiry($est_project_id);
//------------------------------------------------------------------------------------------------

echo "<br>";

//if ($Mode == 'Edit')
//{
//	$myrow = get_competitor_details($selected_id);
//                
//        $_POST['est_project_id'] = $myrow["est_project_id"];
//        $_POST['competitor'] = $myrow["competitor"];
//        $_POST['value'] = $myrow["value"];
//        $_POST['bid_winner'] = $myrow["bid_winner"];
//        $_POST['comment'] = $myrow["comment"];
//}

hidden('selected_id', $selected_id);
if (@$_GET['popup'])
{
	hidden('_tabs_sel', $_POST['_tabs_sel']);
	hidden('popup', @$_GET['popup']);
}
//div_start('price_details');
//
//    start_table(TABLESTYLE2);
//
//    text_row(_("Competitor:"), 'competitor', null, 50, 50);
//    amount_row(_("Value:"), 'value');
//    yesno_list_row("Bid Winner", 'bid_winner');
//    textarea_row(_("Comment:"), 'comment', null, 42, 3);
//    
//    end_table(1);
//
//    submit_add_or_update_center($selected_id == -1, '', 'both');
//
//div_end();

if (!@$_GET['popup'])
{
	end_form();
	end_page(@$_GET['popup'], false, false);
}	
?>







































































































































