' : 'style="font-family:monospace">') .
$this->_textFilter(Horde_Mime_Viewer_Translation::t("Archive Name") . ': ' . $name, 'space2html', array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
)) . "\n" .
$this->_textFilter(Horde_Mime_Viewer_Translation::t("Archive File Size") . ': ' . strlen($contents) . ' bytes', 'space2html', array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
)) . "\n" .
$this->_textFilter(sprintf(Horde_Mime_Viewer_Translation::ngettext("File Count: %d file", "File Count: %d files", $fileCount), $fileCount), 'space2html', array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
)) .
"\n\n" .
$this->_textFilter(
Horde_String::pad(Horde_Mime_Viewer_Translation::t("File Name"), 50, ' ', STR_PAD_RIGHT) .
Horde_String::pad(Horde_Mime_Viewer_Translation::t("Attributes"), 10, ' ', STR_PAD_LEFT) .
Horde_String::pad(Horde_Mime_Viewer_Translation::t("Size"), 10, ' ', STR_PAD_LEFT) .
Horde_String::pad(Horde_Mime_Viewer_Translation::t("Modified Date"), 19, ' ', STR_PAD_LEFT) .
Horde_String::pad(Horde_Mime_Viewer_Translation::t("Method"), 10, ' ', STR_PAD_LEFT) .
Horde_String::pad(Horde_Mime_Viewer_Translation::t("Ratio"), 10, ' ', STR_PAD_LEFT),
'space2html',
array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
)
) . "\n" . str_repeat('-', 109) . "\n";
foreach ($rarData as $val) {
$ratio = empty($val['size'])
? 0
: 100 * ($val['csize'] / $val['size']);
$text .= $this->_textFilter(
Horde_String::pad($val['name'], 50, ' ', STR_PAD_RIGHT) .
Horde_String::pad($val['attr'], 10, ' ', STR_PAD_LEFT) .
Horde_String::pad($val['size'], 10, ' ', STR_PAD_LEFT) .
Horde_String::pad(strftime("%d-%b-%Y %H:%M", $val['date']), 19, ' ', STR_PAD_LEFT) .
Horde_String::pad($val['method'], 10, ' ', STR_PAD_LEFT) .
Horde_String::pad(sprintf("%1.1f%%", $ratio), 10, ' ', STR_PAD_LEFT),
'space2html',
array(
'encode' => true,
'encode_all' => true
)
) . "\n";
}
return $this->_renderReturn(
nl2br($text . str_repeat('-', 109) . "\n |