|
45 | 45 | case 'server_load': |
46 | 46 | $template = 'templates/show_data.htm'; |
47 | 47 | $output .= showServerLoad(); |
| 48 | + $time = getDataTime('server_load'); |
48 | 49 | $title = $app->lng("Server Load").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
49 | 50 | $description = ''; |
50 | 51 | break; |
51 | 52 | case 'disk_usage': |
52 | 53 | $template = 'templates/show_data.htm'; |
53 | 54 | $output .= showDiskUsage(); |
| 55 | + $time = getDataTime('disk_usage'); |
54 | 56 | $title = $app->lng("Disk usage").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
55 | 57 | $description = ''; |
56 | 58 | break; |
57 | 59 | case 'mem_usage': |
58 | 60 | $template = 'templates/show_data.htm'; |
59 | 61 | $output .= showMemUsage(); |
| 62 | + $time = getDataTime('mem_usage'); |
60 | 63 | $title = $app->lng("Memory usage").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
61 | 64 | $description = ''; |
62 | 65 | break; |
63 | 66 | case 'cpu_info': |
64 | 67 | $template = 'templates/show_data.htm'; |
65 | 68 | $output .= showCpuInfo(); |
| 69 | + $time = getDataTime('cpu_info'); |
66 | 70 | $title = $app->lng("CPU info").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
67 | 71 | $description = ''; |
68 | 72 | break; |
69 | 73 | case 'services': |
70 | 74 | $template = 'templates/show_data.htm'; |
71 | 75 | $output .= showServices(); |
| 76 | + $time = getDataTime('services'); |
72 | 77 | $title = $app->lng("Status of services").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
73 | 78 | $description = ''; |
74 | 79 | break; |
75 | 80 | case 'system_update': |
76 | 81 | $template = 'templates/show_data.htm'; |
77 | 82 | $output .= showSystemUpdate(); |
| 83 | + $time = getDataTime('system_update'); |
78 | 84 | $title = "Update State" . ' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
79 | 85 | $description = ''; |
80 | 86 | break; |
81 | 87 | case 'mailq': |
82 | 88 | $template = 'templates/show_data.htm'; |
83 | 89 | $output .= showMailq(); |
| 90 | + $time = getDataTime('mailq'); |
84 | 91 | $title = "Mailq" . ' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
85 | 92 | $description = ''; |
86 | 93 | break; |
87 | 94 | case 'raid_state': |
88 | 95 | $template = 'templates/show_data.htm'; |
89 | 96 | $output .= showRaidState(); |
| 97 | + $time = getDataTime('raid_state'); |
90 | 98 | $title = "RAID-State" . ' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
91 | 99 | $description = ''; |
92 | 100 | break; |
93 | 101 | case 'rkhunter': |
94 | 102 | $template = 'templates/show_data.htm'; |
95 | 103 | $output .= showRKHunter(); |
| 104 | + $time = getDataTime('rkhunter'); |
96 | 105 | $title = "RKHunter-Log" . ' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; |
97 | 106 | $description = ''; |
98 | 107 | break; |
|
105 | 114 | // Loading the template |
106 | 115 | $app->uses('tpl'); |
107 | 116 | $app->tpl->newTemplate("form.tpl.htm"); |
108 | | -$app->tpl->setInclude('content_tpl',$template); |
109 | | - |
110 | | -$app->tpl->setVar("output",$output); |
111 | | -$app->tpl->setVar("title",$title); |
112 | | -$app->tpl->setVar("description",$description); |
| 117 | +$app->tpl->setInclude('content_tpl', $template); |
113 | 118 |
|
| 119 | +$app->tpl->setVar("output", $output); |
| 120 | +$app->tpl->setVar("title", $title); |
| 121 | +$app->tpl->setVar("description", $description); |
| 122 | +$app->tpl->setVar("time", $time); |
114 | 123 |
|
115 | 124 | $app->tpl_defaults(); |
116 | 125 | $app->tpl->pparse(); |
|
0 commit comments