filebot/website/download.php

33 lines
1.0 KiB
PHP
Raw Normal View History

<?php
2011-12-27 18:57:11 +00:00
$version = isset($_GET['version']) ? $_GET['version'] : '@{version}'; // default version is hard-coded via deployment script
$arch = $_GET['arch'];
$type = $_GET['type'];
2014-07-13 15:03:28 +00:00
$folder = 'https://downloads.sourceforge.net/project/filebot/filebot/FileBot_'.$version;
$file = 'undefined';
2013-08-08 02:59:27 +00:00
if ($type == 'nsis') {
2014-07-13 15:03:28 +00:00
$folder = 'https://downloads.sourceforge.net/project/filebot/filebot/HEAD';
2013-08-08 02:59:27 +00:00
$file = 'FileBot-setup.exe';
} else if ($type == 'msi')
$file = 'FileBot_'.$version.'_'.$arch.'.msi';
2013-08-08 02:59:27 +00:00
else if ($type == 'deb')
$file = 'filebot_'.$version.'_'.$arch.'.deb';
2013-08-08 02:59:27 +00:00
else if ($type == 'app')
$file = 'FileBot_'.$version.'.app.tar.gz';
2013-08-08 02:59:27 +00:00
else if ($type == 'jar')
$file = 'FileBot_'.$version.'.jar';
2013-08-08 02:59:27 +00:00
else if ($type == 'portable')
2011-12-28 13:51:36 +00:00
$file = 'FileBot_'.$version.'-portable.zip';
2013-08-08 02:59:27 +00:00
else if ($type == 'ipkg')
2012-05-08 01:23:32 +00:00
$file = 'filebot_'.$version.'_'.$arch.'.ipk';
2013-08-08 02:59:27 +00:00
else if ($type == 'src')
$file = 'filebot-'.$version.'-src.zip';
$downloadPage = $folder.'/'.$file.'/download';
header('HTTP/1.1 302 Found');
header('Location: '.$downloadPage);
?>