""
Full path:
File
size: = 1000): ?> ()
MIME-type:
Files in archive:
Total size:
Size in archive:
Compression: %
';
}
// Text info
if ($is_text) {
$is_utf8 = fm_is_utf8($content);
if (function_exists('iconv')) {
if (!$is_utf8) {
$content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content);
}
}
echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '
';
}
?>
';
} else if($online_viewer == 'microsoft') {
echo '
';
}
} elseif ($is_zip) {
// ZIP content
if ($filenames !== false) {
echo '
';
foreach ($filenames as $fn) {
if ($fn['folder']) {
echo '' . fm_enc($fn['name']) . '
';
} else {
echo $fn['name'] . ' (' . fm_get_filesize($fn['filesize']) . ')
';
}
}
echo '
';
} else {
echo '
Error while fetching archive info
';
}
} elseif ($is_image) {
// Image content
if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg'))) {
echo '
';
}
} elseif ($is_audio) {
// Audio content
echo '
';
} elseif ($is_video) {
// Video content
echo '
';
} elseif ($is_text) {
if (FM_USE_HIGHLIGHTJS) {
// highlight
$hljs_classes = array(
'shtml' => 'xml',
'htaccess' => 'apache',
'phtml' => 'php',
'lock' => 'json',
'svg' => 'xml',
);
$hljs_class = isset($hljs_classes[$ext]) ? 'lang-' . $hljs_classes[$ext] : 'lang-' . $ext;
if (empty($ext) || in_array(strtolower($file), fm_get_text_names()) || preg_match('#\.min\.(css|js)$#i', $file)) {
$hljs_class = 'nohighlight';
}
$content = '
' . fm_enc($content) . '
';
} elseif (in_array($ext, array('php', 'php4', 'php5', 'phtml', 'phps'))) {
// php highlight
$content = highlight_string($content, true);
} else {
$content = '
' . fm_enc($content) . '
';
}
echo $content;
}
?>