isLoggedIn())
{
header ("location: ../login.php");
exit();
}
if(isset($_POST['selected_employee']))
{
$selected_employee=$_POST['selected_employee'];
$date_range=$_POST['date_range'];
$dates=explode(':',$date_range);
$date1=$dates[0];
$date2=$dates[1];
}
$first_name=$dbf->idToField($cfg_tableprefix.'users','first_name',$selected_employee);
$last_name=$dbf->idToField($cfg_tableprefix.'users','last_name',$selected_employee);
$display_name=$first_name.' '.$last_name;
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$cfg_company $lang->employeeReport");
$tableheaders=array("$lang->rowID","$lang->date","$lang->customer","$lang->itemsPurchased","$lang->paidWith","$lang->saleSubTotal","$lang->saleTotalCost","$lang->showSaleDetails");
$tablefields=array('id','date','customer_id','items_purchased','paid_with','sale_sub_total','sale_total_cost','sale_details');
$display->displayReportTable("$cfg_tableprefix",'sales',$tableheaders,$tablefields,'sold_by',"$selected_employee","$date1","$date2",'date',"$lang->listOfSaleBy $display_name
$lang->between $date1 and $date2");
?>