charset" /> HEAD; ?> XCache Coverage Viewer
{$percent}
EOS; } function dir_head() { global $cycle; $cycle = new Cycle('class="col1"', 'class="col2"'); return << DirectoryPercentHitsLinesTODO EOS; } function dir_row($info, $srcdir) { global $cycle; if ($info['files'] || $info['todos']) { $srcdir .= DIRECTORY_SEPARATOR; $c = $cycle->next(); $srcdir_html = htmlspecialchars($srcdir); $todos = number_format($info['todos']); if ($info['total']) { $srcdir_url = urlencode($srcdir); $hits = number_format($info['hits']); $total = number_format($info['total']); calc_percent($info, $percent, $class); $bar = bar($percent, $class); return << {$srcdir_html} $bar {$hits} {$total} {$todos} EOS; } else { return << {$srcdir_html} {$todos} EOS; } } } function dir_foot() { return << EOS; } function file_head() { global $cycle; $cycle = new Cycle('class="col1"', 'class="col2"'); return << EOS; } function file_row($info, $srcfile) { global $cycle; $c = $cycle->next(); $srcfile_html = htmlspecialchars($srcfile); $total = number_format($info['total']); if ($info['total']) { $hits = number_format($info['hits']); $srcfile_url = urlencode($srcfile); calc_percent($info, $percent, $class); $bar = bar($percent, $class); return << EOS; } else { return << EOS; } } function file_foot() { return << EOS; } if ($action == 'dir') { $path_html = htmlspecialchars($path); echo <<root $path
EOS; echo dir_head($dirinfo); echo dir_row($dirinfo, $path); echo dir_foot($dirinfo); if ($dirinfo['subdirs']) { echo dir_head(); foreach ($dirinfo['subdirs'] as $srcdir => $info) { echo dir_row($info, $srcdir); } echo dir_foot(); } if ($dirinfo['files']) { echo file_head(); foreach ($dirinfo['files'] as $srcfile => $info) { echo file_row($info, $srcfile); } echo file_foot(); } } else if ($action == 'file') { $dir_url = urlencode($dir); $dir_html = htmlspecialchars($dir); echo <<root {$dir_html}/{$filename}
EOS; echo file_head(); echo file_row($fileinfo, $path); echo file_foot(); if ($tplfile) { $tplfile_html = htmlspecialchars($tplfile); echo <<{$tplfile_html}
EOS; } echo <<
    {$filecov}
EOS; if ($tplfile) { echo <<{$tplfile}
    {$tplcov}
EOS; } } else { echo htmlspecialchars($action); } ?>
FilePercentHitsLines
{$srcfile_html} $bar {$hits} {$total}
{$srcfile_html} {$total}