File: source.phtml

package info (click to toggle)
icingaweb2-module-businessprocess 2.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,720 kB
  • sloc: php: 10,971; javascript: 2,019; sh: 115; xml: 49; makefile: 18
file content (25 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?= $this->controls->render() ?>

<div class="content">
<?php if ($this->showDiff): ?>
<div class="diff">
<?= $this->diff->render() ?>
</div>
<?php else: ?>
<table class="sourcecode">
<?php

$cnt = 0;
$lines = preg_split('~\r?\n~', $this->source);
$len = ceil(log(count($lines), 10));
$rowhtml = sprintf('<tr><th>%%0%dd: </th><td>%%s<br></td></tr>', $len);

foreach ($lines as $line) {
    $cnt++;
    printf($rowhtml, $cnt, $this->escape($line));
}

?>
</table>
<?php endif ?>
</div>