<?php
$current_software = array(
'datatrac3' =>array('download_name'=>"DataTrac installer v3.9.latest.exe",'file'=>'DataTrac installer v3.9.3667.exe'),
'aqualink4' =>array('download_name'=>"Aqualink4.latest.exe","file"=>"Aqualink4.latest.exe"),
'aqualink4part11' =>array('download_name'=>"Aqualink4part11.latest.exe","file"=>"Aqualink4part11.latest.exe"),
'vsadownloader' =>array('download_name'=>"VSADownloader.latest.exe","file"=>"VSADownloader.latest.exe"),
'report_tool' => array('download_name'=>"DecagonReportTool.exe","file"=>"DecagonReportTool.exe"),
);
	


$download = $current_software[$_GET['p']];;



// function safe_name($s){
	// return preg_replace(" ","_",$s);
// }
include 'path';

$current_download = $download["download_name"];
$download_file = $download['file'];
// #$fname =  safe_name($current_download);
header("Content-disposition: attachment; filename=\"$current_download\"");
header('Content-type: application/exe');
readfile("$base_path/$download_file");
?>