<?php

	include "library.php";

	$cxn = start_code();
	
    $cxn_common = db_common_login();

    $is_allcompletedinperiod = false;
    
    $is_profitability = false;
	
    if (val( $_GET, "reporttype" ) == "allcompletedinperiod")	
        $is_allcompletedinperiod = true;

    if (val( $_GET, "reporttype" ) == "profitability")	
        $is_profitability = true;
        
 
    $readonly = val( $_GET, "readonly" );
    
 
    if ($is_allcompletedinperiod)
    	page_header( "All Completed in Period", $cxn, $cxn_common );

    if ($is_profitability)
    	page_header( "Profitability Report", $cxn, $cxn_common );
    	
	
//	echo "<br>";

    if ($is_allcompletedinperiod)
    	form_start( "reports.php", "reporttype", "allcompletedinperiod", "readonly", $readonly );

    if ($is_profitability)
    	form_start( "reports.php", "reporttype", "profitability", "readonly", $readonly );

	write_yellow_input_boxes();
	
	echo "<tr></tr><tr><td>&nbsp;</td></tr>";

	$start_date = "01/03/2018";
	
	$end_date = date( "d/m/Y", time()+60*60*24 );

	form_text( "Start Date", "start_date", 10, $start_date, "true" );

	form_text( "End Date", "end_date", 10, $end_date );
	
	form_submit_new( "Go", 50 );

	form_end();

?>

