OSX Firefox Spezial "return true" eingefügt; typo fixed;
This commit is contained in:
parent
e4c3e2e1f4
commit
a3656f432b
@ -6,8 +6,8 @@ class VinylDownload {
|
|||||||
public $database, $file, $code;
|
public $database, $file, $code;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
@set_time_limit(0);
|
// @set_time_limit(0);
|
||||||
ini_set('memory_limit', '512M');
|
// ini_set('memory_limit', '512M');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function db_connect(){
|
private function db_connect(){
|
||||||
@ -61,15 +61,16 @@ class VinylDownload {
|
|||||||
|
|
||||||
<div id="1">
|
<div id="1">
|
||||||
<form method=POST id="dl-trigger" action="https://www.rainervonvielen.de/digital-download"><p>
|
<form method=POST id="dl-trigger" action="https://www.rainervonvielen.de/digital-download"><p>
|
||||||
<input type="hidden" value="'. $this->code . '" name="c"</input>
|
<input type="hidden" value="'. $this->code . '" name="c">
|
||||||
<input type="hidden" value="'. $f . '" name="sel_format"</input>
|
<input type="hidden" value="'. $f . '" name="sel_format">
|
||||||
<input type="submit" class ="btn middle" value="Start"></input>
|
<input type="submit" class ="btn middle" value="Start">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
jQuery("#dl-trigger").submit(function(e) {
|
jQuery("#dl-trigger").submit(function(e) {
|
||||||
jQuery("#1").html( "<p><strong>Download ist gestartet.</strong> Du hast noch <strong>' . ( self::MAXDOWNLOADS - $row['count'] - 1 ) .'</strong> Downloads zur Verfügung bis der Code ungültig wird." );
|
jQuery("#1").html( "<p><strong>Download ist gestartet.</strong> Du hast noch <strong>' . ( self::MAXDOWNLOADS - $row['count'] - 1 ) .'</strong> Downloads zur Verfügung bis der Code ungültig wird." );
|
||||||
});
|
});
|
||||||
|
return true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
';
|
';
|
||||||
@ -85,11 +86,11 @@ class VinylDownload {
|
|||||||
switch ($format) {
|
switch ($format) {
|
||||||
case 'mp3':
|
case 'mp3':
|
||||||
$file = $this->mp3_file;
|
$file = $this->mp3_file;
|
||||||
$filename = 'Rainer_von_Vielen-Überall_Chaos_2017-MP3.zip';
|
$filename = "Rainer_von_Vielen-Überall_Chaos_2017-MP3.zip";
|
||||||
break;
|
break;
|
||||||
case 'wav':
|
case 'wav':
|
||||||
$file = $this->wav_file;
|
$file = $this->wav_file;
|
||||||
$filename = 'Rainer_von_Vielen-Überall_Chaos_2017-WAV.zip';
|
$filename = "Rainer_von_Vielen-Überall_Chaos_2017-WAV.zip";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,10 +108,8 @@ class VinylDownload {
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$mm_type='application/zip';
|
header("Content-Type: application/octet-stream");
|
||||||
|
header("Content-Disposition: attachment; filename=".$filename."");
|
||||||
header("Content-Type: ".$mm_type);
|
|
||||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header("Content-Length: " .(string)(filesize($file)) );
|
header("Content-Length: " .(string)(filesize($file)) );
|
||||||
header("Cache-Control: public, must-revalidate");
|
header("Cache-Control: public, must-revalidate");
|
||||||
|
Loading…
Reference in New Issue
Block a user