conn,$cfg_theme,$cfg_currency_symbol,$lang);
if(!$sec->isLoggedIn())
{
header ("location: ../login.php");
exit();
}
//set default values, these will change if $action==update.
$paid_with_value='';
$comment_value='';
$id=-1;
//decides if the form will be used to update or add a user.
$display->displayTitle("Update Sale");
if(isset($_GET['id']))
{
$id=$_GET['id'];
$tablename = "$cfg_tableprefix".'sales';
$result = mysql_query("SELECT * FROM $tablename WHERE id=\"$id\"",$dbf->conn);
$row = mysql_fetch_assoc($result);
$paid_with_value=$row['paid_with'];
$comment_value=$row['comment'];
}
//creates a form object
$f1=new form('process_update_sale.php','POST','sale','325',$cfg_theme,$lang);
//creates form parts.
echo "