<?php
if(!function_exists('mimetype'))
{
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Return the mimetype
#
function mimetype($path,$file)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
if($_SESSION[misc][location]!='l') { $file_name_type=mime_content_type($path.$file); }
else
{
# mime_content_type() is NOT installed on the local (Windows) server!
#
$ext=explode('.',$file); $i=count($ext);
switch($ext[($i-1)])
{
case 'rar':
case 'gz':
case 'zip': $file_name_type = 'application/zip'; break;
case 'pdf': $file_name_type = 'application/pdf'; break;
default: $file_name_type = '?';
}
}
return($file_name_type);
}
}
?>