-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplain_template.php
More file actions
43 lines (34 loc) · 1.16 KB
/
plain_template.php
File metadata and controls
43 lines (34 loc) · 1.16 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
class plain_template implements template
{
public function miniheader ()
{
printf("Queries by type:\n================\n");
}
public function minirow ($type, $num, $percent)
{
printf("% -20s % -10s [%5s%%] \n", $type, number_format($num, 0, '', ' '), number_format($percent, 2));
}
public function minifooter ($total)
{
printf("---------------\nTotal: %s queries\n\n\n", number_format($total, 0, '', ' '));
}
public function mainheader ()
{
printf("Queries by pattern:\n===================\n");
}
public function mainrow ($ornum, $num, $percent, $query, $sort = false, $smpl = false)
{
if ($sort)
printf("%d.\t% -10s [%10s] - %s\n", $ornum, number_format($num, 0, '', ' '), number_format($percent, 2), $query);
else
printf("%d.\t% -10s [% 5s%%] - %s\n", $ornum, number_format($num, 0, '', ' '), number_format($percent, 2), $query);
if ($smpl)
printf("%s\n\n", $smpl);
}
public function mainfooter ($total)
{
printf("---------------\nTotal: %s patterns", number_format($total, 0, '', ' '));
}
}
?>