isLoggedIn())
{
header ("location: ../login.php");
exit();
}
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$lang->manageSales");
$f1=new form('manage_sales.php','POST','sales','450',$cfg_theme,$lang);
$f1->createInputField("$lang->searchForSale",'text','search',"$lang->highID".'-'."$lang->lowID",'24','350');
$f1->endForm();
if(isset($_POST['search']))
{
$search=$_POST['search'];
$temp_search=explode('-',$search);
if(!(ereg('-',$search)))
{
echo '';
exit();
}
$id1=$temp_search[0];
$id2=$temp_search[1];
if($id1 < $id2)
{
echo "$lang->incorrectSearchFormat(ex: $id2-$id1)";
exit();
}
echo "$lang->searchedForSales id's $id1 $lang->and $id2:";
$display->displaySaleManagerTable("$cfg_tableprefix",$id2,$id1,'id');
}
else
{
$display->displaySaleManagerTable("$cfg_tableprefix",'','','id');
}
$dbf->closeDBlink();
?>