' : 'style="font-family:monospace">') .
$this->_textFilter(
Horde_Mime_Viewer_Translation::t("Archive Name") . ': ' . $name . "\n" .
Horde_Mime_Viewer_Translation::t("Archive File Size") . ': ' . strlen($contents) .
" bytes\n" .
sprintf(Horde_Mime_Viewer_Translation::ngettext("File Count: %d file", "File Count: %d files", $fileCount), $fileCount) .
"\n\n" .
str_repeat(' ', 15) .
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) .
"\n",
'Space2html',
array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
)
) . str_repeat('-', 74) . "\n";
foreach ($zipInfo as $key => $val) {
$ratio = (empty($val['size']))
? 0
: 100 * ($val['csize'] / $val['size']);
$val['name'] = Horde_String::pad(Horde_String::truncate($val['name'], 15), 15, ' ', STR_PAD_RIGHT);
$val['attr'] = Horde_String::pad($val['attr'], 10, ' ', STR_PAD_LEFT);
$val['size'] = Horde_String::pad($val['size'], 10, ' ', STR_PAD_LEFT);
$val['date'] = Horde_String::pad(strftime("%d-%b-%Y %H:%M", $val['date']), 19, ' ', STR_PAD_LEFT);
$val['method'] = Horde_String::pad($val['method'], 10, ' ', STR_PAD_LEFT);
$val['ratio'] = Horde_String::pad(sprintf("%1.1f%%", $ratio), 10, ' ', STR_PAD_LEFT);
foreach ($val as &$v) {
$v = $this->_textFilter($v, 'Space2html', array(
'charset' => $charset,
'encode' => true,
'encode_all' => true
));
}
if (!is_null($this->_callback)) {
$val = call_user_func($this->_callback, $key, $val);
}
$text .= $val['name'] . $val['attr'] . $val['size'] .
$val['date'] . $val['method'] . $val['ratio'] .
"\n";
}
return $this->_renderReturn(
nl2br($text . str_repeat('-', 74) . "\n |