// Need to write out to database that download has been initiated (along with cookie affid if there is one)
include( 'includes/db.inc.php');
// Downloads file from fileserver
//$query = "INSERT INTO `CallTheBall`.`file_downloads` (Counter, FileName) VALUES (1, 'Excavator Installer v1.2')";
$query = "UPDATE `CallTheBall`.`file_downloads` SET Counter = Counter + 1 WHERE FileName = 'Excavator Installer v1.2'";
$result = true; //Query($query);
if ( $result != false )
{
header("Content-Type: application/exe");
header("Content-Disposition: attachment; filename=WebExcavatorInstaller.exe");
header("Cache-control: private");
header("Location: Excavator/WebExcavatorInstaller.exe");
}
else
echo "
Please click here to start download";
?>