format, add one cache header

This commit is contained in:
Miles Lott 2002-04-13 21:38:34 +00:00
parent 90341cace9
commit bfc712116d

View File

@ -61,14 +61,12 @@
$this->BROWSER_VER = $log_version[1];
$this->BROWSER_AGENT = 'Netscape';
}
elseif(ereg('Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
ereg( 'Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
{
$this->BROWSER_VER = $log_version[1];
$this->BROWSER_AGENT = 'Konqueror';
}
elseif(ereg('Mozilla/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
{
$this->BROWSER_VER = $log_version[1];
@ -110,33 +108,26 @@
/*
echo "\n\nAgent: $HTTP_USER_AGENT";
echo "\nIE: ".browser_is_ie();
echo "\nMac: ".browser_is_mac();
echo "\nWindows: ".browser_is_windows();
echo "\nPlatform: ".browser_get_platform();
echo "\nVersion: ".browser_get_version();
echo "\nAgent: ".browser_get_agent();
echo "\nIE: " . $this->is_ie();
echo "\nMac: " . $this->is_mac();
echo "\nWindows: " . $this->is_windows();
echo "\nPlatform: " . $this->get_platform();
echo "\nVersion: " . $this->get_version();
echo "\nAgent: " . $this->get_agent();
*/
// The br and p functions are supposed to return the correct
// The br and p vars are supposed to return the correct
// value for tags that do not need to be closed. This is
// per the xhmtl spec, so we need to fix this to include
// all compliant browsers we know of.
if($this->BROWSER_AGENT == 'IE')
{
$this->br = '<br/>';
}
else
{
$this->br = '<br>';
}
if ($this->BROWSER_AGENT =='IE')
{
$this->p = '<p/>';
}
else
{
$this->br = '<br>';
$this->p = '<p>';
}
}
@ -272,18 +263,18 @@
}
if($fn)
{
if ($this->get_agent() == 'IE') // && browser_get_version() == "5.5")
if($this->get_agent() == 'IE')
{
$attachment = '';
header('Cache-control: private');
}
else
{
$attachment = ' attachment;';
}
// Show this for all
header('Content-disposition:'.$attachment.' filename="'.$fn.'"');
header('Content-type: ' . $mime);
header('Content-disposition:' . $attachment . ' filename="' . $fn . '"');
if($length)
{