Vergleich attachment.php - 1.4.7 - 1.4.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: attachment.php 4304 2009-01-02 01:11:56Z chris $

 * $Id: attachment.php 4388 2009-06-26 03:46:33Z RyanGordon $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 113Zeile 113
{
$ext = get_extension($attachment['filename']);


{
$ext = get_extension($attachment['filename']);


 
	switch($attachment['filetype'])
{
case "application/pdf":
case "image/bmp":
case "image/gif":
case "image/jpeg":
case "image/pjpeg":
case "image/png":
case "text/plain":
header("Content-type: {$attachment['filetype']}");
$disposition = "inline";
break;

default:
header("Content-type: application/force-download");
$disposition = "attachment";
}


	if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie") !== false)
{
header("Content-disposition: attachment; filename=\"{$attachment['filename']}\"");
}
else
{

	if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie") !== false)
{
header("Content-disposition: attachment; filename=\"{$attachment['filename']}\"");
}
else
{

		header("Content-disposition: inline; filename=\"{$attachment['filename']}\"");

		header("Content-disposition: {$disposition}; filename=\"{$attachment['filename']}\"");

	}

if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie 6.0") !== false)

	}

if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "msie 6.0") !== false)

Zeile 127Zeile 145
		header("Expires: -1");
}


		header("Expires: -1");
}


	header("Content-type: {$attachment['filetype']}");

 
	header("Content-length: {$attachment['filesize']}");
header("Content-range: bytes=0-".($attachment['filesize']-1)."/".$attachment['filesize']);
echo file_get_contents($mybb->settings['uploadspath']."/".$attachment['attachname']);

	header("Content-length: {$attachment['filesize']}");
header("Content-range: bytes=0-".($attachment['filesize']-1)."/".$attachment['filesize']);
echo file_get_contents($mybb->settings['uploadspath']."/".$attachment['attachname']);